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

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

khaledi
Beginner
535 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
502 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


khaledi
Beginner
494 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)

khaledi
Beginner
491 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.

Reply