gcc 編譯安裝 - Linux

Table of Contents

在編譯 gcc-4.5.2 的過程中,出現下列錯誤訊息

checking whether ln -s works... yes
checking for x86_64-unknown-linux-gnu-gcc... /usr1/wzlu/download/gcc/gccobj/./gcc/xgcc -B/usr1/wzlu/download/gcc/gccobj/./gcc/ -B/usr1/wzlu/gcc/x86_64-unknown-linux-gnu/bin/ -B/usr1/wzlu/gcc/x86_64-unknown-linux-gnu/lib/ -isystem /usr1/wzlu/gcc/x86_64-unknown-linux-gnu/include -isystem /usr1/wzlu/gcc/x86_64-unknown-linux-gnu/sys-include
checking for suffix of object files... configure: error: in `/usr1/wzlu/download/gcc/gccobj/x86_64-unknown-linux-gnu/libgcc':
configure: error: cannot compute suffix of object files: cannot compile
See `config.log' for more details.
make[2]: *** [configure-stage1-target-libgcc] Error 1
make[2]: Leaving directory `/usr1/wzlu/download/gcc/gccobj'
make[1]: *** [stage1-bubble] Error 2
make[1]: Leaving directory `/usr1/wzlu/download/gcc/gccobj'
make: *** [all] Error 2

依照說明文件的指示 另開一個新目錄進行編譯
而不在 source code 的目錄中編譯 應該就能避免出現上面的錯誤

但依照指示做了 仍出現上述的錯誤
請問 還有其他建議嘛 謝謝

--

All Comments

Olive avatarOlive2011-02-28
請去看 config.log 的錯誤訊息有啥然後再貼上來吧
Ina avatarIna2011-02-28
記得連 configure 的參數一起貼
Joe avatarJoe2011-03-03
找到原因了,gmp mpc mpfr的lib include path放到configure中