Opened 3 years ago

Last modified 20 months ago

#61953 closed defect

gcc-devel: SDK version mismatch — at Version 3

Reported by: aivazis (Michael Aivazis) Owned by:
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc:
Port: gcc-devel

Description (last modified by ryandesign (Ryan Carsten Schmidt))

the gcc/g++ that come with gcc-devel are unable to find the system headers due to a mismatch in the name of the SDK:

~/tmp/c++>gcc -v -v -v str.c -o str
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/opt/local/libexec/gcc/arm64-apple-darwin20/11.0.0/lto-wrapper
Target: arm64-apple-darwin20
Configured with: /opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_lang_gcc-devel/gcc-devel/work/gcc-darwin-arm64-f335f738078a35dd48a0aaacbe58a0b7b11c86ce/configure --prefix=/opt/local --build=arm64-apple-darwin20 --enable-languages=c,c++,objc,obj-c++,lto,fortran,jit --libdir=/opt/local/lib/gcc-devel --includedir=/opt/local/include/gcc-devel --infodir=/opt/local/share/info --mandir=/opt/local/share/man --datarootdir=/opt/local/share/gcc-devel --with-local-prefix=/opt/local --with-system-zlib --disable-nls --program-suffix=-mp-devel --with-gxx-include-dir=/opt/local/include/gcc-devel/c++/ --with-gmp=/opt/local --with-mpfr=/opt/local --with-mpc=/opt/local --with-isl=/opt/local --enable-stage1-checking --disable-multilib --enable-lto --enable-libstdcxx-time --with-build-config=bootstrap-debug --with-as=/opt/local/bin/as --with-ld=/opt/local/bin/ld --with-ar=/opt/local/bin/ar --with-bugurl=https://trac.macports.org/newticket --enable-host-shared --disable-tls --with-pkgversion='MacPorts gcc-devel 11-20201205_0' --with-sysroot=/Library/Developer/CommandLineTools/SDKs/MacOSX11.0.sdk

but

~/tmp/c++>ls /Library/Developer/CommandLineTools/SDKs/MacOSX
MacOSX.sdk/      MacOSX10.15.sdk/ MacOSX11.1.sdk/

Change History (3)

comment:1 Changed 3 years ago by kencu (Ken)

We have no good plan for this just yet.

We have up until now tried to use an SDK that matches the system version we are building on, but that plan no longer seems viable.

While we debate the alternative, you will have to rebuild gcc (and many other ports) from source to pick up the name of your current SDK.

And whenever you upgrade your Xcode / CLTs, the same thing will happen.

We may decide to bake in MacOSX.sdk instead of a system-specific sdk, but this is still under debate.

comment:2 Changed 3 years ago by kencu (Ken)

Keywords: sysroot macOS 11.0 11.1 removed
Port: gcc-devel added
Summary: SDK version mismatch in gcc-develgcc-devel: SDK version mismatch

comment:3 Changed 3 years ago by ryandesign (Ryan Carsten Schmidt)

Description: modified (diff)
Note: See TracTickets for help on using tickets.