Missing crt1

Kevan Hashemi hashemi at brandeis.edu
Thu Sep 15 17:34:16 CEST 2011

Dear GPC Users,

I think I have it all sorted now. It turns out that cctools installs 
eighteen files in /usr/bin. Among these are "ld" that takes precedence 
over the XCode2.5 "ld" if /usr/bin comes first in your directory search 

Searching the likely directories on my hard drive with "ls -R | grep 
crt1.o" I find no crt1.o installed except in the Xcode2.5 directory 
tree. This leads me to conclude that cctools may install "ld" and "as" 
but they do not install the "crt1.o" library required by GPC to make an 
executable. So installing Xcode appears to be necessary on MacOSX10.5.

Of the eighteen files installed by cctools in /usr/bin, sixteen are 
available in /Xcode2.5/usr/bin/. Only "lipo" and "strings" are unique to 
/usr/bin. I deleted the uneccessary 16, leaving "lipo" and "strings". 
The pre-cctools version of these files are no longer available to me. 
But I built a universal binary with "lipo" and it seems to work.

After this removing the sixteen duplicate files from /usr/bin, my 
compile works fine with the library search directive that Adriaan suggested:


and I can even add the convenient:


which is the flag that the cctools "ld" would not accept.

As to uninstalling XCode2.5, just deleting the XCode2.5 folder does not 
remove the devtools files in the main UNIX file structure, so you have 
to run XCode2.5/Library/uninstall-devtools, which gets rid of 
everything. After that, you can re-install XCode2.5. But it still gives 
me no UNIX Tools option.

Yours, Kevan

Kevan Hashemi, President
Open Source Instruments Inc.

More information about the Gpc mailing list