2014-09-22 133 views
1

在最新的gcc 4.9.1包,在./configure之後我跑令,並將其與錯誤消息失敗:gcc 4.9.1有什麼問題?

checking for x86_64-unknown-linux-gnu-gcc... /root/tar/gcc-4.9.1/host-x86_64-unknown-linux-gnu/gcc/xgcc -B/root/tar/gcc-4.9.1/host-x86_64-unknown-linux-gnu/gcc/ -B/usr/local/x86_64-unknown-linux-gnu/bin/ -B/usr/local/x86_64-unknown-linux-gnu/lib/ -isystem /usr/local/x86_64-unknown-linux-gnu/include -isystem /usr/local/x86_64-unknown-linux-gnu/sys-include 
checking for suffix of object files... configure: error: in `/root/tar/gcc-4.9.1/x86_64-unknown-linux-gnu/libgcc': 
configure: error: cannot compute suffix of object files: cannot compile 
See `config.log' for more details. 

我檢查的config.log在x86_64的未知-Linux的GNU/libgcc的/,它說,

configure:3389: /root/tar/gcc-4.9.1/host-x86_64-unknown-linux-gnu/gcc/xgcc -B/root/tar/gcc-4.9.1/host-x86_64-unknown-linux-gnu/gcc/ -B/usr/local/x86_64-unknown-linux-gnu/bin/ -B/usr/local/x86_64-unknown-linux-gnu/lib/ -isystem /usr/local/x86_64-unknown-linux-gnu/include -isystem /usr/local/x86_64-unknown-linux-gnu/sys-include -o conftest -g -O2 conftest.c >&5 
/root/tar/gcc-4.9.1/host-x86_64-unknown-linux-gnu/gcc/cc1: error while loading shared libraries: libmpc.so.2: cannot open shared object file: No such file or directory 
configure:3392: $? = 1 
configure:3580: checking for suffix of object files 
configure:3602: /root/tar/gcc-4.9.1/host-x86_64-unknown-linux-gnu/gcc/xgcc -B/root/tar/gcc-4.9.1/host-x86_64-unknown-linux-gnu/gcc/ -B/usr/local/x86_64-unknown-linux-gnu/bin/ -B/usr/local/x86_64-unknown-linux-gnu/lib/ -isystem /usr/local/x86_64-unknown-linux-gnu/include -isystem /usr/local/x86_64-unknown-linux-gnu/sys-include -c -g -O2 conftest.c >&5 
/root/tar/gcc-4.9.1/host-x86_64-unknown-linux-gnu/gcc/cc1: error while loading shared libraries: libmpc.so.2: cannot open shared object file: No such file or directory 
configure:3606: $? = 1 
configure: failed program was: 

但很明顯,我有libmpc.so.2在/ usr/local/lib中。怎麼了??

+0

https://gcc.gnu.org/wiki/FAQ#Configuration_fails_with_.27.27configure:_error:_cannot_compute_suffix_of_object_files:_cannot_compile.27.27._What_is_the_problem.3F – 2014-09-22 19:24:18

回答

1

看起來問題是由於缺省路徑/ usr/local/lib未包含在$ LD_LIBRARY_PATH環境變量中。對不起,這個愚蠢的問題...

+0

可以刪除,如果一個問題你不不認爲這對其他人有用。 – l0b0 2014-09-22 11:46:05