Sunday, December 14, 2008

The dread -lcrt0.o error on Mac OS X

I periodically run into this problem compiling software on the mac:

ld_classic: can't locate file for: -lcrt0.o
collect2: ld returned 1 exit status
make: *** [muscle] Error 1

In this case, I was compiling MUSCLE, a multiple alignment program.

The solution is to track the -static flag down in your Makefile, and remove it. GCC/OSX does NOT like -static.

6 comments:

Anonymous said...

I just fixed this in another bioinformatics app. (nhPhyml) by removing the -static flag.

Kris Kowal said...

Confirmed.

Anonymous said...

Many thanks.

Anonymous said...

Fixed my problems with Augustus (gene predictor) too. Thanks

Anonymous said...

THANK YOU!

Izra said...

Excellent, thanks for the trick