Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

ld: library not found for -lSystem

1,360 views
Skip to first unread message

Paul

unread,
Sep 14, 2021, 4:26:54 PM9/14/21
to
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 !

Arjen Markus

unread,
Sep 17, 2021, 4:09:41 AM9/17/21
to
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

Ron Shepard

unread,
Sep 17, 2021, 11:42:44 AM9/17/21
to
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

spectrum

unread,
Sep 18, 2021, 3:33:44 AM9/18/21
to
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
0 new messages