Hi Chris, 

thanks for the reply. I got a feeling that the problem you describe is behind 
this error but I didn’t know how to fix it. 
I’ve added the export you suggest in my profile and it worked. 

Thanks again for the help, much appreciated! 

Andreas  


Dr. Seismologist

> On Dec 15, 2020, at 2:12 PM, Christopher Jones <[email protected]> 
> wrote:
> 
> Hi,
> 
> This is another consequence of a change Apple has introduced with macOS11 
> which is the SDK version now changes on every incremental OS update. So 
> updating from 11.0 to 11.1 (and I presume Xcode 12.3) you now have SDK 11.1, 
> not 11.0, and thus the current build of gcc, which has the sys root to the 
> 11.0 baked into it, now fails.
> 
> A quick workaround is to set in your shell SDKROOT to point to the new path 
> to the 11.1 SDK. I use
> 
> export SDKROOT=`xcrun --show-sdk-path`
> 
> in my ~/.profile which does this for each shell.
> 
> This is almost certainly not the only issue this change in SDK versioning is 
> going to cause, and its likely going to take a while to figure out what to do 
> in MacPorts. One option, for ports which have this problem is to configure 
> them to use the versionless SDK path at configuration time, at least on macOS 
> 11 and newer… This has other issues, but for now it seems the lesser evil to 
> me…
> 
> Chris
> 
>> On 15 Dec 2020, at 9:23 pm, Andreas Skarlatoudis via macports-users 
>> <[email protected] 
>> <mailto:[email protected]>> wrote:
>> 
>> Hello all, 
>> 
>> I’m working on a MBP, 2018 model and yesterday I updated to the latest 
>> version of BigSur. Since then I cannot compile any fortran code and the 
>> error I get is 
>> 
>> ld: library not found for -lSystem
>> collect2: error: ld returned 1 exit status
>> 
>> 
>> I have tried both gcc9 and gcc10
>> 
>> gfortran -v gives this output :
>> 
>> Using built-in specs.
>> COLLECT_GCC=gfortran
>> COLLECT_LTO_WRAPPER=/opt/local/libexec/gcc/x86_64-apple-darwin20/10.2.0/lto-wrapper
>> Target: x86_64-apple-darwin20
>> Configured with: 
>> /opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_lang_gcc10/gcc10/work/gcc-10.2.0/configure
>>  --prefix=/opt/local --build=x86_64-apple-darwin20 
>> --enable-languages=c,c++,objc,obj-c++,lto,fortran,jit 
>> --libdir=/opt/local/lib/gcc10 --includedir=/opt/local/include/gcc10 
>> --infodir=/opt/local/share/info --mandir=/opt/local/share/man 
>> --datarootdir=/opt/local/share/gcc-10 --with-local-prefix=/opt/local 
>> --with-system-zlib --disable-nls --program-suffix=-mp-10 
>> --with-gxx-include-dir=/opt/local/include/gcc10/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> --enable-host-shared --disable-tls 
>> --with-pkgversion='MacPorts gcc10 10.2.0_4' 
>> --with-sysroot=/Library/Developer/CommandLineTools/SDKs/MacOSX11.0.sdk
>> Thread model: posix
>> Supported LTO compression algorithms: zlib
>> gcc version 10.2.0 (MacPorts gcc10 10.2.0_4) 
>> 
>> I’ve removed and reinstalled MacPorts and all packages but it didn’t help.
>> 
>> Any ideas what may be the problem here? 
>> 
>> Thanks in advance for your help
>> 
>> Andreas 
>> 
>> Dr. Seismologist
>> 
> 

Reply via email to