【发布时间】:2012-01-23 20:10:52
【问题描述】:
我在 ubuntu 11.10 下编译 gcc 4.6.2 时遇到一个问题。 该错误非常流行,即 /usr/bin/ld: cannot find crti.o: No such file or directory 我尝试在链接器可以找到 crti.o 的 LIBRARY_PATH=/usr/lib/x86_64-linux-gnu 但随后配置抱怨 LIBRARY_PATH 在构建 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'
我也尝试过设置 LD_LIBRARY_PATH 但无济于事。
提前致谢。
【问题讨论】:
-
感谢@larsmans 正确编辑我的问题。
-
env | grep '^LIBRARY_PATH='报告什么? -
IBRARY_PATH=/usr/lib/x86_64-linux-gnu/: