gcc-darwin-arm64 icon indicating copy to clipboard operation
gcc-darwin-arm64 copied to clipboard

Fixed includes broken with Xcode 16 on MacOS 15 (Sequoia)

Open rhdtownsend opened this issue 4 months ago • 1 comments

Further to this report:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116980

...it seems that Xcode 16 has broken the fixed includes with gcc 13.3.0 on MacOS 15. Compiling the hello.c demo program on the bugzilla page yields the following (snipped for brevity):

In file included from hello-world.c:4: /Applications/mesasdk/lib/gcc/aarch64-apple-darwin20/13.3.0/include-fixed/stdio.h:80:14: error: expected ';' before 'extern' 80 | __BEGIN_DECLS | ^ | ; 81 | extern FILE *__stdinp; | ~~~~~~
/Applications/mesasdk/lib/gcc/aarch64-apple-darwin20/13.3.0/include-fixed/stdio.h:81:8: error: unknown type name 'FILE' 81 | extern FILE *__stdinp; | ^~~~ /Applications/mesasdk/lib/gcc/aarch64-apple-darwin20/13.3.0/include-fixed/stdio.h:82:8: error: unknown type name 'FILE' 82 | extern FILE *__stdoutp; | ^~~~ /Applications/mesasdk/lib/gcc/aarch64-apple-darwin20/13.3.0/include-fixed/stdio.h:83:8: error: unknown type name 'FILE' 83 | extern FILE *__stderrp; | ^~~~ /Applications/mesasdk/lib/gcc/aarch64-apple-darwin20/13.3.0/include-fixed/stdio.h:84:1: error: unknown type name '__END_DECLS' 84 | __END_DECLS | ^~~~~~~~~~~

The compiler was built using --with-sysroot=/Applications/mesasdk/sysroot; that sysroot file is a symlink to /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk. When I upgraded to Xcode 16, MacOSX.sdk (also a symlink) switched from pointing at MacOSX14.5.sdk, to pointing at MacOSX15.0.sdk. It seems this causes the breakage; switching the MacOSX.sdk symlink back gets things working again. Re-running mkheaders doesn't appear to fix the problem.

rhdtownsend avatar Oct 07 '24 18:10 rhdtownsend