Xcode 11.2 on Mojave and gcc7 or gcc9

Christopher Jones jonesc at hep.phy.cam.ac.uk
Sun Nov 10 20:28:04 UTC 2019



> On 10 Nov 2019, at 6:33 pm, Fielding, Eric J (US 329A) via macports-users <macports-users at lists.macports.org> wrote:
> 
> My employer automatically installs the latest versions of MacOS software, including now Xcode 11.2. I have been seeing several suggestions that we should go back to Xcode 10.3, which I tried a few weeks ago when I was on Xcode 11.1. That was OK and all my ports were working until they upgraded my machine to Xcode 11.2. At first, there was an incompatibility between the version of the Swift library from my 10.3 installation that was still in the Xcode directories and the system Swift library so nothing in the compiler would 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

https://trac.macports.org/wiki/ProblemHotlist#reinstall-clt

>  
> 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.

Chris

>  
> This is the output of ‘cpp -v’ from gcc7 (it is similar if I select gcc9):
> Using built-in specs.
> COLLECT_GCC=cpp
> Target: x86_64-apple-darwin18
> Configured with: /opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_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 <https://trac.macports.org/newticket> --disable-tls --with-pkgversion='MacPorts gcc7 7.4.0_3' --with-sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/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 "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/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 "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include"
> ignoring nonexistent directory "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks"
> ignoring nonexistent directory "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/Library/Frameworks"
> #include "..." search starts here:
> #include <...> search starts here:
> /opt/local/lib/gcc7/gcc/x86_64-apple-darwin18/7.4.0/include
> /opt/local/lib/gcc7/gcc/x86_64-apple-darwin18/7.4.0/include-fixed
> End of search list.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macports.org/pipermail/macports-users/attachments/20191110/6500179d/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 1930 bytes
Desc: not available
URL: <http://lists.macports.org/pipermail/macports-users/attachments/20191110/6500179d/attachment.bin>


More information about the macports-users mailing list