Search code examples
macosfortranfortran90intel-fortran

Installing a package and getting error - ld: library not found for -lSystem


I'm trying to install a package through ifort on Mac since it requires ifort to compile and run the code and I am and getting error

ld: library not found for -lSystem 

I don't know if oneAPI comes with that library.

ifort -O3 -warn all -fpp -free -assume byterecl -heap-arrays -nogen-interface -static-intel  /opt/intel/oneapi/compiler/latest/mac/compiler/include generate_inpmat.F90 -o generate_inpmat

Solution

  • I corrected this error by pointing the correct library path. The correct path is at

    /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib
    

    In place of

    /opt/intel/oneapi/compiler/latest/mac/compiler/include