Alex Rivera | Logout

Error compiling gcc 4.6.2 under ubuntu 11.10

Asked 2011-12-19T18:28:20.587
14

I have one problem compiling gcc 4.6.2 under ubuntu 11.10. The error is quite popular i.e. /usr/bin/ld: cannot find crti.o: No such file or directory I tried to LIBRARY_PATH=/usr/lib/x86_64-linux-gnu where crti.o could be found by the linker but then the configuration complains that LIBRARY_PATH should not contain the path of the current directory when building gcc

checking LIBRARY_PATH variable... contains current directory
configure: error: 
*** LIBRARY_PATH shouldn't contain the current directory when
*** building gcc. Please change the environment variable
*** and run configure again.
make[2]: *** [configure-stage2-gcc] Error 1
make[2]: Leaving directory `/home/abdul/cc02/gcc-4.6.2/src-infra/obj-gcc'
make[1]: *** [stage2-bubble] Error 2
make[1]: Leaving directory `/home/abdul/cc02/gcc-4.6.2/src-infra/obj-gcc'

I have also tried to set LD_LIBRARY_PATH but no avail.

Thanks in advance.

Edit
Report

1 Answer

33

Apparently, your LIBRARY_PATH ends in a colon:

/usr/lib/x86_64-linux-gnu/:
#  -----------------------^

Get rid of that:

export LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/
answered 2011-12-20T15:04:44.013

Your Answer