Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ld: file not found: /usr/lib/crt1.o

When trying to compile Fortran using PGI on Mac OS X Sierra, I get the error

ld: file not found: /usr/lib/crt1.o

I found a workaround for older Mac OS X versions (http://www.pgroup.com/userforum/viewtopic.php?t=4578)

sudo ln -s /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/lib/crt1.o /usr/lib/crt1.o 

However, with Sierra, System Integrity Protection prevents writing in /usr/bin. How can I solve this problem?

I tried linking into /usr/local/bin/ (which is permitted), but then, how can I make sure the compiler searches for library in that path?

like image 479
stineb Avatar asked May 23 '17 17:05

stineb


2 Answers

Installing just the Command Line Tools for Mac OS X solved the problem. Do this in your terminal:

xcode-select --install
like image 98
stineb Avatar answered Sep 18 '22 17:09

stineb


Installing Lazarus on MacOS X : worked for me

http://wiki.lazarus.freepascal.org/Installing_Lazarus_on_MacOS_X#Xcode_5.0.2B_compatibility_.28Mac_OS_X_10.8_and_10.9.29

like image 31
Or Davidi Avatar answered Sep 20 '22 17:09

Or Davidi