Xcode 11.2 on Mojave and gcc7 or gcc9
Fielding, Eric J (US 329A)
eric.j.fielding at jpl.nasa.gov
Mon Nov 11 03:02:51 UTC 2019
Thanks for the hints. I did the suggested method of forcing the Command-Line Tools installation by Software Update and it told me that it was going to install the Xcode 10.3 CLT. It seems that Xcode 11 now has the CLT included inside Xcode, so that version is not installed by Software Update.
From: Christopher Jones <jonesc at hep.phy.cam.ac.uk>
Date: Sunday, November 10, 2019 at 12:28 PM
work. I deleted my whole Xcode.app directory and reinstalled Xcode 11.2. Now that I have a clean Xcode 11.2, it does not have the MacOSX10.14.sdk installed and the gcc7 and gcc9 installations from MacPorts are still depending on that. I tried reinstalling the command-line tools, as someone suggested yesterday, but it tells me that they are already installed.
You might need to manually force a CLT update, as its possible it is not being correctly updated. See
The CLT update did not fix the problem with gcc7 not finding the SDK.
I uninstalled my gcc7 port and reinstalled it to see if it would update the libraries. The port install command installed the precompiled binaries that are linked to the MacOSX10.14.sdk, so it won’t run correctly. Can I force MacPorts to recompile gcc7 instead of using the precompiled binaries?
Yes. Use the ‘-s’ option with port.
I ran the full build from source of gcc7. Good thing I had my MacBook battery replaced as it was down below 20% by the time the compilation finished. Now when I can see that the gcc7 is linked to the Command-Line Tools version of the MacOSX10.14.sdk, which works well. Maybe MacPorts will need to use this path for people on Mojave 10.14.6 that have Xcode 11.x
Using built-in specs.
Configured with: /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_gcc7/gcc7/work/gcc-7.4.0/configure --prefix=/opt/local --build=x86_64-apple-darwin18 --enable-languages=c,c++,objc,obj-c++,lto,fortran --libdir=/opt/local/lib/gcc7 --includedir=/opt/local/include/gcc7 --infodir=/opt/local/share/info --mandir=/opt/local/share/man --datarootdir=/opt/local/share/gcc-7 --with-local-prefix=/opt/local --with-system-zlib --disable-nls --program-suffix=-mp-7 --with-gxx-include-dir=/opt/local/include/gcc7/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 --disable-tls --with-pkgversion='MacPorts gcc7 7.4.0_3' --with-sysroot=/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk
Thread model: posix
gcc version 7.4.0 (MacPorts gcc7 7.4.0_3)
COLLECT_GCC_OPTIONS='-E' '-v' '-mmacosx-version-min=10.14.7' '-asm_macosx_version_min=10.14' '-mtune=core2'
/opt/local/libexec/gcc/x86_64-apple-darwin18/7.4.0/cc1 -E -quiet -v -D__DYNAMIC__ - -fPIC -mmacosx-version-min=10.14.7 -mtune=core2
ignoring nonexistent directory "/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/opt/local/include"
ignoring nonexistent directory "/opt/local/lib/gcc7/gcc/x86_64-apple-darwin18/7.4.0/../../../../../x86_64-apple-darwin18/include"
ignoring nonexistent directory "/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/Library/Frameworks"
#include "..." search starts here:
#include <...> search starts here:
It seems Apple is tryinghard to push people to move on to 10.15.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the macports-users