• ld: library not found for -lSystem

    From Paul@21:1/5 to All on Tue Sep 14 13:26:52 2021
    Hey, i am new to fortran on MAC.
    I just installed Xcode, fortran via GitHub, and when I want to build my program ( gfortran Helloworld.f95), it says :

    clang: error: invalid version number in '-mmacosx-version-min=11.5'

    I saw on the blog kind of a solution and typed :

    sudo xcode-select --switch /Library/Developer/CommandLineTools

    Now it says another error when I want to build :

    ld: library not found for -lSystem
    collect2: erreur: ld a retourné le statut de sortie 1
    (in french sorry)

    I don't know how to solve this error, any advices ? I can't train on my computer that's so annoying
    Thank you in advance !

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Arjen Markus@21:1/5 to paul on Fri Sep 17 01:09:39 2021
    On Tuesday, September 14, 2021 at 10:26:54 PM UTC+2, paul wrote:
    Hey, i am new to fortran on MAC.
    I just installed Xcode, fortran via GitHub, and when I want to build my program ( gfortran Helloworld.f95), it says :

    clang: error: invalid version number in '-mmacosx-version-min=11.5'

    I saw on the blog kind of a solution and typed :

    sudo xcode-select --switch /Library/Developer/CommandLineTools

    Now it says another error when I want to build :

    ld: library not found for -lSystem
    collect2: erreur: ld a retourné le statut de sortie 1
    (in french sorry)

    I don't know how to solve this error, any advices ? I can't train on my computer that's so annoying
    Thank you in advance !

    I have seen messages about this before, perhaps a search in this newsgroup will help. As I do not use MacOSX, I cannot help with more concrete advice.

    Regards,

    Arjen

    Regards,

    Arjen

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Ron Shepard@21:1/5 to Arjen Markus on Fri Sep 17 10:42:41 2021
    On 9/17/21 3:09 AM, Arjen Markus wrote:
    On Tuesday, September 14, 2021 at 10:26:54 PM UTC+2, paul wrote:
    Hey, i am new to fortran on MAC.
    I just installed Xcode, fortran via GitHub, and when I want to build my program ( gfortran Helloworld.f95), it says :

    clang: error: invalid version number in '-mmacosx-version-min=11.5'

    I saw on the blog kind of a solution and typed :

    sudo xcode-select --switch /Library/Developer/CommandLineTools

    Now it says another error when I want to build :

    ld: library not found for -lSystem
    collect2: erreur: ld a retourné le statut de sortie 1
    (in french sorry)

    I don't know how to solve this error, any advices ? I can't train on my computer that's so annoying
    Thank you in advance !

    I have seen messages about this before, perhaps a search in this newsgroup will help. As I do not use MacOSX, I cannot help with more concrete advice.

    I am running an older version of MacOS and Xcode. In the older version,
    the command line tools are installed with the command

    sudo xcode-select --install

    Also, the switch command that I have always used is

    sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer

    The command given in the original post would be appropriate if you have multiple versions of Xcode installed, and you wanted to switch to a
    nondefault version.

    Also, before you actually use Xcode, you need to run the command

    sudo xcodebuild -license

    or you need to click the license agreement within the Xcode app itself. Otherwise, I think you do get those types of ld errors because of file permission errors.

    However, perhaps some or all of this has changed in the most recent
    version of MacOS.

    $.02 -Ron Shepard

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From spectrum@21:1/5 to All on Sat Sep 18 00:33:42 2021
    I am also using an old version of MacOS, so no experience with this issue,
    but I guess some Q/A pages might also have some info (e.g. below).

    https://stackoverflow.com/search?tab=newest&q=%5bfortran%5d%20lSystem

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)