Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
28757 Discussions

oneAPI on Big Sur : ld: library not found for -lSystem

khaledi
Beginner
1,609 Views

I just upgraded to macOS Big Sur. Then I installed the latest FORTRAN compiler, OneAPI. 

 

The installation has gone smoothly but when I try to compile a program I get the following error 

 ld : library not found for -lSystem

I do appreciate quick help on this issue. 

I have that online that doing the following will solve the problem, but it did not work for me 

ponyc --linker="ld -L /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib -lSystem"

 

0 Kudos
3 Replies
Ron_Green
Moderator
1,576 Views

what is 'ponyc' ? Where is your ifort command?

You can try Jose's solution


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

Then accept the license (only if you previously haven't) by:

sudo xcodebuild -license


0 Kudos
khaledi
Beginner
1,568 Views

Thanks a lot for your reply. 

This solved the problem. 

I recommend adding this to the installation page since I assume all Big Sur users will have the issue. 

 

(The only other place that this error is discussed is on this page for https://github.com/ponylang/ponyc/issues/3684 which is for ponyc programming language)

0 Kudos
khaledi
Beginner
1,565 Views

One more question which I have is the following 

each time I open a terminal I need to do 

source /opt/intel/oneapi/setvars.sh

I assume there is a way to make this permanent, but not sure how?

I added "source /opt/intel/oneapi/setvars.sh " to the bash_profile file, and each time I open a terminal I get a message which I do not like.

0 Kudos
Reply