# Cabal can't find C++ headers for digest/text on Mac (Sequoia)

**URL:** https://discourse.haskell.org/t/cabal-cant-find-c-headers-for-digest-text-on-mac-sequoia/10422
**Category:** Learn
**Created:** [September 26, 2024, 4:48pm UTC](https://discourse.haskell.org/t/cabal-cant-find-c-headers-for-digest-text-on-mac-sequoia/10422 "2024-09-26T16:48:35Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![vmchale](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/vmchale/32/86_2.png) [@vmchale](https://discourse.haskell.org/u/vmchale)
#### Post date: [September 26, 2024, 4:48pm UTC](https://discourse.haskell.org/t/cabal-cant-find-c-headers-for-digest-text-on-mac-sequoia/10422/1 "2024-09-26T16:48:35Z")

</div>

I upgraded to OSX 15.0/Sequoia and it seems to have some breaking changes.

digest:

```haskell
In file included from external/crc32c/src/crc32c.cc:5:0: error:

external/crc32c/include/crc32c/crc32c.h:12:10: error:
     fatal error: 'cstddef' file not found
       12 | #include <cstddef>
          | ^ ~~~~~~~~
   |
12 | #include <cstddef>
   | ^
1 error generated.

```

````haskell
Text/Lazy/IO.dyn_o )
In file included from simdutf/simdutf.cpp:4:0: error:

simdutf/simdutf.h:6:10: error:
     fatal error: 'string' file not found
        6 | #include <string>
          | ^ ~~~~~~~
  |
6 | #include <string>
  | ^
```

This arises with cabal-install, e.g. `cabal install pandoc-cli`.

Anyone managed to work around this?
````

---

<div class="post-metadata">

### Author: ![Bodigrim](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/bodigrim/32/1457_2.png) [@Bodigrim](https://discourse.haskell.org/u/Bodigrim)
#### Post date: [September 26, 2024, 8:18pm UTC](https://discourse.haskell.org/t/cabal-cant-find-c-headers-for-digest-text-on-mac-sequoia/10422/2 "2024-09-26T20:18:20Z")

</div>

Could you try `text` from GitHub? It bundles [a newer `simdutf`](https://github.com/haskell/text/blob/master/simdutf/simdutf.h), maybe it helps.

---

<div class="post-metadata">

### Author: ![vmchale](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/vmchale/32/86_2.png) [@vmchale](https://discourse.haskell.org/u/vmchale)
#### Post date: [September 26, 2024, 9:12pm UTC](https://discourse.haskell.org/t/cabal-cant-find-c-headers-for-digest-text-on-mac-sequoia/10422/3 "2024-09-26T21:12:29Z")

</div>

As of `aee6924eee2a604dbc1141f80c34f696c9dc1922` I get the same error:

```haskell
In file included from simdutf/simdutf.cpp:3:0: error:

simdutf/simdutf.h:5:10: error:
     fatal error: 'cstring' file not found
        5 | #include <cstring>
          | ^ ~~~~~~~~
  |
5 | #include <cstring>
  | ^

1 error generated.
`g++' failed in phase `C++ Compiler'. (Exit code: 1)

```

---

<div class="post-metadata">

### Author: ![Bodigrim](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/bodigrim/32/1457_2.png) [@Bodigrim](https://discourse.haskell.org/u/Bodigrim)
#### Post date: [September 26, 2024, 9:49pm UTC](https://discourse.haskell.org/t/cabal-cant-find-c-headers-for-digest-text-on-mac-sequoia/10422/4 "2024-09-26T21:49:42Z")

</div>

I checked [the latest release of `simdutf`](https://github.com/simdutf/simdutf/releases/tag/v5.5.0), there does not seem to be any changes to `simdutf.h`:

```haskell
/* auto-generated on 2024-09-04 18:13:32 +0200. Do not edit! */
/* begin file include/simdutf.h */
#ifndef SIMDUTF_H
#define SIMDUTF_H
#include <cstring>

```

I’d suggest raising an issue at [Issues · simdutf/simdutf · GitHub](https://github.com/simdutf/simdutf/issues)

---

<div class="post-metadata">

### Author: ![vmchale](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/vmchale/32/86_2.png) [@vmchale](https://discourse.haskell.org/u/vmchale)
#### Post date: [September 26, 2024, 11:31pm UTC](https://discourse.haskell.org/t/cabal-cant-find-c-headers-for-digest-text-on-mac-sequoia/10422/5 "2024-09-26T23:31:35Z")

</div>

Oh I see! Yes the issue appears with cmake as well, thank you!

---

<div class="post-metadata">

### Author: ![vmchale](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/vmchale/32/86_2.png) [@vmchale](https://discourse.haskell.org/u/vmchale)
#### Post date: [September 27, 2024, 11:18am UTC](https://discourse.haskell.org/t/cabal-cant-find-c-headers-for-digest-text-on-mac-sequoia/10422/6 "2024-09-27T11:18:57Z")

</div>

In case anyone encounters the same, I had to remove and reinstall XCode command-line tools.

---

<div class="post-metadata">

### Author: ![atravers](https://avatars.discourse-cdn.com/v4/letter/a/45deac/32.png) [@atravers](https://discourse.haskell.org/u/atravers)
#### Post date: [September 27, 2024, 11:47am UTC](https://discourse.haskell.org/t/cabal-cant-find-c-headers-for-digest-text-on-mac-sequoia/10422/7 "2024-09-27T11:47:11Z")

</div>

> [@vmchale](#):
>
> I upgraded to OSX 15.0/Sequoia […]

> [@vmchale](#):
>
> I had to remove and reinstall XCode command-line tools.

But Xcode [is provided by Apple](https://developer.apple.com/xcode/) - why wasn’t it _automatically_ upgraded with the rest of OSX?

---

<div class="post-metadata">

### Author: ![jaror](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/jaror/32/3271_2.png) [@jaror](https://discourse.haskell.org/u/jaror)
#### Post date: [September 27, 2024, 11:52am UTC](https://discourse.haskell.org/t/cabal-cant-find-c-headers-for-digest-text-on-mac-sequoia/10422/8 "2024-09-27T11:52:04Z")

</div>

I think I also sometimes have had to do `xcode-select --install` after a MacOS upgrade.

---

<div class="post-metadata">

### Author: ![vmchale](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/vmchale/32/86_2.png) [@vmchale](https://discourse.haskell.org/u/vmchale)
#### Post date: [September 28, 2024, 2:28pm UTC](https://discourse.haskell.org/t/cabal-cant-find-c-headers-for-digest-text-on-mac-sequoia/10422/9 "2024-09-28T14:28:16Z")

</div>

They just released an update today! I expected it’d be a breaking change rather than a bug on their end but… :\
