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

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

digest:

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.
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?
1 Like

Could you try text from GitHub? It bundles a newer simdutf, maybe it helps.

As of aee6924eee2a604dbc1141f80c34f696c9dc1922 I get the same error:

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)

I checked the latest release of simdutf, there does not seem to be any changes to simdutf.h:

/* 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

1 Like

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

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

1 Like

But Xcode is provided by Apple - why wasn’t it automatically upgraded with the rest of OSX?

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

1 Like

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