我實際上正在閱讀LFS書籍(版本7.1),並在第53頁被封鎖。嘗試編譯gcc,我嘗試了以下命令:Gcc編譯「無法計算目標文件的後綴:無法編譯」
./configure --target=$LFS_TGT --prefix=$LFS/build/gcc-build --disable-nls\
--disable-shared --disable-multilib --disable-decimal-float --disable-threads\
--disable-libmudflap --disable-libssp --disable-libgomp --disable-libquadmath\
--disable-target-libiberty --disable-target-zlib\
--enable-languages=c\
--without-ppl --without-cloog\
--with-mpfr-include=$LFS/source/mpfr/src
--with-mpfr-lib=$LFS/source/mpfr/src/.libs\
--with-gmp-include=/mnt/LFS/source/gmp\
--with-gmp-lib=/mnt/LFS/source/gmp/.libs\
--with-mpc-include=/mnt/LFS/source/mpc/src\
--with-mpc-lib=/mnt/LFS/source/mpc/src/.libs
運行gcc的配置腳本(當然我已經編譯了mpfr,mpc和gmp)。 但是,一旦我推出:
make -j4
我得到以下錯誤:
checking for suffix of object files... configure: error: in `/mnt/LFS/source/gcc-4.6.2/x86_64-lfs-linux-gnu/libgcc':
configure: error: cannot compute suffix of object files: cannot compile
See `config.log' for more details.
make[1]: *** [configure-target-libgcc] Error 1
我想谷歌它,並試圖找到我的解決方案,但毫無效果。有誰知道我爲什麼會遇到這個錯誤?
當配置嘗試編寫一些測試程序發生的情況。 [此鏈接](http://gcc.gnu.org/wiki/FAQ#configure_suffix)可能會有用。 – ArjunShankar 2012-07-16 10:10:49
*有關更多詳細信息,請參閱'config.log'。* - 好建議,這就是它出現在錯誤消息中的原因。 – DevSolar 2012-07-16 12:26:40
感謝您的鏈接。但是我嘗試了所有的東西,而且我也沒有弄清楚問題可能來自哪裏。一些論壇說這是一個GCC的錯誤,它不讀取mpc或mpfr的庫文件。我會再試一次。無論如何感謝 – 2012-07-19 21:53:26