Quantcast
Channel: Active questions tagged gcc - Stack Overflow
Viewing all articles
Browse latest Browse all 22067

Missing system headers while installing GCC 9.1.0 on macOS 10.15.5

$
0
0

I'm trying to build GCC from source and have managed to build all the dependencies, however right now I'm struggling with building GCC itself. In macOS 10.15 Apple deprecated the location /usr/include, and the build script is trying to locate the headers there, however the headers are located at /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include

The error:

The directory that should contain system headers does not exist:  /usr/includemake[3]: *** [stmp-fixinc] Error 1make[2]: *** [all-stage1-gcc] Error 2make[1]: *** [stage1-bubble] Error 2make: *** [all] Error 2

What I've tried:

  1. https://developer.apple.com/forums/thread/104296 (outdated, in macOS 10.15 Apple doesn't provide package to install system headers in /usr/include)
  2. configure options:

    • --with-native-system-header-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include (Trouble building gcc on Mac - can't find system headers)
    • --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include
    • --with-build-sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include
    • --with-sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79885)
    • --with-build-sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79885)
  3. Changing the oldincludedir variable in the Makefile (generated by the configure script) from /usr/include to the correct path.

  4. SYSTEM_HEADER_DIR=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/

  5. CPATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include

  6. Symlinking /usr/include with /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include is unfeasible.

Any suggestions are much appreciated!Thanks in advance!


Viewing all articles
Browse latest Browse all 22067

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>