How to Avoid Error 'ld: library not found' macOS* Big Sur

ID 662798
Updated 8/6/2021
Version Latest



Error `ld: library not found for <LIBRARY_NAME>`  where LIBRARY_NAME might be -lpthread, -System etc occurs when building projects with Intel® Fortran compiler from Intel® oneAPI HPC Toolkit 2021.3.

Adding the -L/........Developers.....  leads to a successful build that can be executed but the user still observes multiple warnings from LD that IPO library files not found


There are two solutions, the simpler one (1)  and more complicated (2):

1.    Install command-line tools only
a)    Install the Xcode command-line utilities:   xcode-select --install
b)    Run: sudo xcode-select -s /Applications/
c)    You may be prompted to accept a license.  If so, accept the license with: sudo xcodebuild -license

2.    Install the full  Xcode* system from the App Store*

As a result, the linker runs successfully. -L/......./Developers/...   and  -lpthread -lm -ldl that was required for Catalina is no longer required as well.

Please, note that Fortran Integration into Xcode Removed.