libSystem not found using gfortran

Guillaume Houzeaux @ BSC guillaume.houzeaux at bsc.es
Fri Oct 11 13:37:20 UTC 2019


On 11/10/2019 15:34 PM, Chris Jones wrote:
> Hi,
>
> Are you *really* sure you rebuilt *all* your ports natively for 
> Darwin19 (macOS10.15) ? Your output suggests not, i.e. from the first 
> part
>
> > Driving: gfortran test.f90 -v -mmacosx-version-min=10.15.0
> > -asm_macosx_version_min=10.15 -l gfortran -shared-libgcc
> > Using built-in specs.
> > COLLECT_GCC=gfortran
> > 
> COLLECT_LTO_WRAPPER=/opt/local/libexec/gcc/x86_64-apple-darwin18/9.2.0/lto-wrapper
> > Target: x86_64-apple-darwin18
>
> See Darwin 18 there. That is wrong, it should be 19, as in my output
>
> Oberon ~/cernbox/MacPorts > gfortran-mp-9 -v test.f90
> Driving: gfortran-mp-9 -v test.f90 -mmacosx-version-min=10.15.0 
> -asm_macosx_version_min=10.15 -l gfortran -shared-libgcc
> Using built-in specs.
> COLLECT_GCC=gfortran-mp-9
> COLLECT_LTO_WRAPPER=/opt/local/libexec/gcc/x86_64-apple-darwin19/9.2.0/lto-wrapper 
>
> Target: x86_64-apple-darwin19
>
>
> I suspect you are using a gcc build (and probably others as well) that 
> where built for macOS10.14, not macOS10.15.
>
> Following the migration guide exactly is not optional I am afraid....


This is what I did supposingly but with xcode11.0... but anyway, I will 
try again with the new xcode.

I will maintain you informed... it happened to other people in the 
office so if I solve this many people will be happy ;o)

Thanks a lot,

g.

>
> cheers Chris
>
> On 11/10/2019 1:41 pm, Guillaume Houzeaux @ BSC wrote:
>> Chris, thanks a lot for your very quick answer!
>>
>> 1. I followed the path for migration and reinstalled all packages. I 
>> will try to do it once more to be sure.
>> 2. Xcode version: 11.0
>> 3. My test program is minimum:
>>
>> program test
>>    print*,'a'
>> end program test
>>
>> 4. The output with -v option is:
>>
>> Driving: gfortran test.f90 -v -mmacosx-version-min=10.15.0 
>> -asm_macosx_version_min=10.15 -l gfortran -shared-libgcc
>> Using built-in specs.
>> COLLECT_GCC=gfortran
>> COLLECT_LTO_WRAPPER=/opt/local/libexec/gcc/x86_64-apple-darwin18/9.2.0/lto-wrapper 
>>
>> Target: x86_64-apple-darwin18
>> Configured with: 
>> /opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_lang_gcc9/gcc9/work/gcc-9.2.0/configure 
>> --prefix=/opt/local --build=x86_64-apple-darwin18 
>> --enable-languages=c,c++,objc,obj-c++,lto,fortran 
>> --libdir=/opt/local/lib/gcc9 --includedir=/opt/local/include/gcc9 
>> --infodir=/opt/local/share/info --mandir=/opt/local/share/man 
>> --datarootdir=/opt/local/share/gcc-9 --with-local-prefix=/opt/local 
>> --with-system-zlib --disable-nls --program-suffix=-mp-9 
>> --with-gxx-include-dir=/opt/local/include/gcc9/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 gcc9 9.2.0_0' 
>> --with-sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk
>> Thread model: posix
>> gcc version 9.2.0 (MacPorts gcc9 9.2.0_0)
>> COLLECT_GCC_OPTIONS='-v' '-mmacosx-version-min=10.15.0' 
>> '-asm_macosx_version_min=10.15' '-shared-libgcc' '-mtune=core2'
>>   /opt/local/libexec/gcc/x86_64-apple-darwin18/9.2.0/f951 test.f90 
>> -fPIC -quiet -dumpbase test.f90 -mmacosx-version-min=10.15.0 
>> -mtune=core2 -auxbase test -version -fintrinsic-modules-path 
>> /opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.2.0/finclude -o 
>> /var/folders/1z/j0r1q88d2_95cj4fd50r39mr0000gr/T//ccZubFPj.s
>> GNU Fortran (MacPorts gcc9 9.2.0_0) version 9.2.0 
>> (x86_64-apple-darwin18)
>>      compiled by GNU C version 9.2.0, GMP version 6.1.2, MPFR version 
>> 4.0.2, MPC version 1.1.0, isl version isl-0.21-GMP
>>
>> GGC heuristics: --param ggc-min-expand=100 --param 
>> ggc-min-heapsize=131072
>> GNU Fortran2008 (MacPorts gcc9 9.2.0_0) version 9.2.0 
>> (x86_64-apple-darwin18)
>>      compiled by GNU C version 9.2.0, GMP version 6.1.2, MPFR version 
>> 4.0.2, MPC version 1.1.0, isl version isl-0.21-GMP
>>
>> GGC heuristics: --param ggc-min-expand=100 --param 
>> ggc-min-heapsize=131072
>> COLLECT_GCC_OPTIONS='-v' '-mmacosx-version-min=10.15.0' 
>> '-shared-libgcc' '-mtune=core2'
>>   /opt/local/bin/as -arch x86_64 -v -force_cpusubtype_ALL 
>> -mmacosx-version-min=10.15 -o 
>> /var/folders/1z/j0r1q88d2_95cj4fd50r39mr0000gr/T//cce0rRJI.o 
>> /var/folders/1z/j0r1q88d2_95cj4fd50r39mr0000gr/T//ccZubFPj.s
>> Apple clang version 11.0.0 (clang-1100.0.33.8)
>> Target: x86_64-apple-darwin19.0.0
>> Thread model: posix
>> InstalledDir: 
>> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
>>   "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang" 
>> -cc1as -triple x86_64-apple-macosx10.15.0 -filetype obj 
>> -main-file-name ccZubFPj.s -target-cpu penryn -fdebug-compilation-dir 
>> /Users/houzeaux/Desktop -dwarf-debug-producer Apple clang version 
>> 11.0.0 (clang-1100.0.33.8) -dwarf-version=4 -mrelocation-model pic -o 
>> /var/folders/1z/j0r1q88d2_95cj4fd50r39mr0000gr/T//cce0rRJI.o 
>> /var/folders/1z/j0r1q88d2_95cj4fd50r39mr0000gr/T//ccZubFPj.s
>> Reading specs from 
>> /opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.2.0/../../../libgfortran.spec
>> rename spec lib to liborig
>> COLLECT_GCC_OPTIONS='-v' '-mmacosx-version-min=10.15.0' 
>> '-shared-libgcc' '-mtune=core2'
>> COMPILER_PATH=/opt/local/libexec/gcc/x86_64-apple-darwin18/9.2.0/:/opt/local/libexec/gcc/x86_64-apple-darwin18/9.2.0/:/opt/local/libexec/gcc/x86_64-apple-darwin18/:/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.2.0/:/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/ 
>>
>> LIBRARY_PATH=/usr/lib/:/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.2.0/:/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.2.0/../../../ 
>>
>> COLLECT_GCC_OPTIONS='-v' '-mmacosx-version-min=10.15.0' 
>> '-shared-libgcc' '-mtune=core2'
>>   /opt/local/libexec/gcc/x86_64-apple-darwin18/9.2.0/collect2 
>> -syslibroot 
>> /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/ 
>> -dynamic -arch x86_64 -macosx_version_min 10.15.0 
>> -weak_reference_mismatches non-weak -o a.out 
>> -L/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.2.0 
>> -L/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.2.0/../../.. 
>> /var/folders/1z/j0r1q88d2_95cj4fd50r39mr0000gr/T//cce0rRJI.o 
>> -lgfortran -no_compact_unwind -lSystem -lgcc_ext.10.5 -lgcc 
>> -lquadmath -lm -lgcc_ext.10.5 -lgcc -lSystem -v
>> collect2 version 9.2.0
>> /opt/local/bin/ld -syslibroot 
>> /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/ 
>> -dynamic -arch x86_64 -macosx_version_min 10.15.0 
>> -weak_reference_mismatches non-weak -o a.out 
>> -L/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.2.0 
>> -L/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.2.0/../../.. 
>> /var/folders/1z/j0r1q88d2_95cj4fd50r39mr0000gr/T//cce0rRJI.o 
>> -lgfortran -no_compact_unwind -lSystem -lgcc_ext.10.5 -lgcc 
>> -lquadmath -lm -lgcc_ext.10.5 -lgcc -lSystem -v
>> @(#)PROGRAM:ld  PROJECT:ld64-512.4
>> BUILD 05:06:53 Aug 16 2019
>> configured to support archs: armv6 armv7 armv7s arm64 arm64e arm64_32 
>> i386 x86_64 x86_64h armv6m armv7k armv7m armv7em
>> Library search paths:
>>      /opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.2.0
>>      /opt/local/lib/gcc9
>> Framework search paths:
>> ld: library not found for -lSystem
>> collect2: error: ld returned 1 exit status
>>
>>
>>>
>>> one more request.
>>>
>>> please post the full output from compiling your test code with the 
>>> -v option.
>>>
>>> cheers Chris
>>>
>>> On 11/10/2019 12:59 pm, Chris Jones wrote:
>>>>
>>>> can you please direct us to the exact test application code you are 
>>>> using ?
>>>>
>>>> Also, can you confirm the exact Xcode version you are using ?
>>>>
>>>> Have you correctly followed the macports migration guide after 
>>>> updating your OS ?
>>>>
>>>> https://trac.macports.org/wiki/Migration
>>>>
>>>> cheers Chris
>>>>
>>>> On 11/10/2019 12:55 pm, Guillaume Houzeaux @ BSC wrote:
>>>>> Hello,
>>>>>
>>>>> I'm compiling with gfortran9 on catalina and get this error:
>>>>>
>>>>> gfortran test.f90
>>>>> ld: library not found for -lSystem
>>>>> collect2: error: ld returned 1 exit status
>>>>>
>>>>> Seems that it does not find the library libSystem. I changed all 
>>>>> the library paths in my bash_profile
>>>>>
>>>>> to include /usr/lib but does not work. The only solution for the 
>>>>> moment is to compile with
>>>>>
>>>>> gfortran test.f90-L/usr/lib
>>>>>
>>>>> but this is not a practical option... Any idea on how to fix this?
>>>>>
>>>>> Thanks in advance
>>>>>
>>>>> -- 
>>>>> Guillaume Houzeaux
>>>>> Team Leader
>>>>> Dpt. Computer Applications in Science and Engineering
>>>>> Barcelona Supercomputing Center (BSC-CNS)
>>>>> Edificio NEXUS II - Office 3A, c) Jordi Girona 29
>>>>> 08034 Barcelona, Spain
>>>>>
>>>>> Location: 
>>>>> <https://www.google.es/maps/place/Carrer+de+Jordi+Girona,+08034+Barcelona/@41.3881175,2.1132195,17z/data=!3m1!4b1!4m8!1m2!10m1!1e2!3m4!1s0x12a4985099390467:0xd9abcf1987739b3e!8m2!3d41.3881175!4d2.1154135?hl=en> 
>>>>>
>>>>> Tel: +34 93 413 7781
>>>>> Skype user: guillaume_houzeaux_bsc
>>>>> WWW: BSC profile <https://www.bsc.es/houzeaux-guillaume>
>>>>> ResearcherID: D-4950-2012
>>>>> Scientific Profile: 
>>>>> <https://www.researchgate.net/profile/Guillaume_Houzeaux> 
>>>>> <http://scholar.google.es/citations?user=cL9khdYAAAAJ&hl=en> 
>>>>> <http://orcid.org/0000-0002-2592-1426> 
>>>>> <http://www.researcherid.com/rid/D-4950-2012>
>>>>>
>>
>> -- 
>> Guillaume Houzeaux
>> Team Leader
>> Dpt. Computer Applications in Science and Engineering
>> Barcelona Supercomputing Center (BSC-CNS)
>> Edificio NEXUS II - Office 3A, c) Jordi Girona 29
>> 08034 Barcelona, Spain
>>
>> Location: 
>> <https://www.google.es/maps/place/Carrer+de+Jordi+Girona,+08034+Barcelona/@41.3881175,2.1132195,17z/data=!3m1!4b1!4m8!1m2!10m1!1e2!3m4!1s0x12a4985099390467:0xd9abcf1987739b3e!8m2!3d41.3881175!4d2.1154135?hl=en> 
>>
>> Tel: +34 93 413 7781
>> Skype user: guillaume_houzeaux_bsc
>> WWW: BSC profile <https://www.bsc.es/houzeaux-guillaume>
>> ResearcherID: D-4950-2012
>> Scientific Profile: 
>> <https://www.researchgate.net/profile/Guillaume_Houzeaux> 
>> <http://scholar.google.es/citations?user=cL9khdYAAAAJ&hl=en> 
>> <http://orcid.org/0000-0002-2592-1426> 
>> <http://www.researcherid.com/rid/D-4950-2012>
>>

-- 
Guillaume Houzeaux
Team Leader
Dpt. Computer Applications in Science and Engineering
Barcelona Supercomputing Center (BSC-CNS)
Edificio NEXUS II - Office 3A, c) Jordi Girona 29
08034 Barcelona, Spain

Location: 
<https://www.google.es/maps/place/Carrer+de+Jordi+Girona,+08034+Barcelona/@41.3881175,2.1132195,17z/data=!3m1!4b1!4m8!1m2!10m1!1e2!3m4!1s0x12a4985099390467:0xd9abcf1987739b3e!8m2!3d41.3881175!4d2.1154135?hl=en> 

Tel: +34 93 413 7781
Skype user: guillaume_houzeaux_bsc
WWW: BSC profile <https://www.bsc.es/houzeaux-guillaume>
ResearcherID: D-4950-2012
Scientific Profile: 
<https://www.researchgate.net/profile/Guillaume_Houzeaux> 
<http://scholar.google.es/citations?user=cL9khdYAAAAJ&hl=en> 
<http://orcid.org/0000-0002-2592-1426> 
<http://www.researcherid.com/rid/D-4950-2012>



http://bsc.es/disclaimer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macports.org/pipermail/macports-users/attachments/20191011/c974f532/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: google-maps.png
Type: image/png
Size: 695 bytes
Desc: not available
URL: <http://lists.macports.org/pipermail/macports-users/attachments/20191011/c974f532/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rg-15.png
Type: image/png
Size: 3370 bytes
Desc: not available
URL: <http://lists.macports.org/pipermail/macports-users/attachments/20191011/c974f532/attachment-0001.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gs-15.png
Type: image/png
Size: 507 bytes
Desc: not available
URL: <http://lists.macports.org/pipermail/macports-users/attachments/20191011/c974f532/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: orcid-15.png
Type: image/png
Size: 603 bytes
Desc: not available
URL: <http://lists.macports.org/pipermail/macports-users/attachments/20191011/c974f532/attachment-0003.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: r-15.png
Type: image/png
Size: 605 bytes
Desc: not available
URL: <http://lists.macports.org/pipermail/macports-users/attachments/20191011/c974f532/attachment-0004.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: BSC.gif
Type: image/gif
Size: 7495 bytes
Desc: not available
URL: <http://lists.macports.org/pipermail/macports-users/attachments/20191011/c974f532/attachment.gif>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SO.png
Type: image/png
Size: 6172 bytes
Desc: not available
URL: <http://lists.macports.org/pipermail/macports-users/attachments/20191011/c974f532/attachment-0005.png>


More information about the macports-users mailing list