1
我想在CentOS 5.5操作系統上使用gcc版本4.1.2 20080704(Red Hat 4.1.2-50)來編譯gcc版本gcc4.3.2。最初,編譯器抱怨需要gmp和mpfr庫,然後下載,編譯並安裝成功。編譯舊版本的gcc
安裝後,使用新的配置命令爲:
../gcc4.3.2/gcc-4.3.2/configure前綴= /家庭/ shahw/gccdir/--with- GMP =的/ usr /本地/ --with-MPFR =的/ usr /本地/
我現在遇到以下錯誤:
checking for x86_64-unknown-linux-gnu-strip... strip
checking whether ln -s works... yes
checking for x86_64-unknown-linux-gnu-gcc... /home/shahw/gccobj/./gcc/xgcc -
B/home/shahw/gccobj/./gcc/ -B/home/shahw/gccdir//x86_64-unknown-linux-gnu/bin/
B/home/shahw/gccdir//x86_64-unknown-linux-gnu/lib/ -isystem /home/shahw/gccdir//x86_64-
unknown-linux-gnu/include -isystem /home/shahw/gccdir//x86_64-unknown-linux-gnu/sys-include
checking for suffix of object files... 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 `/home/shahw/gccobj'
make[1]: *** [stage1-bubble] Error 2
make[1]: Leaving directory `/home/shahw/gccobj'
make: *** [all] Error 2
的config.log在末端包含以下內容:
## ----------- ##
## confdefs.h. ##
## ----------- ##
#define PACKAGE_BUGREPORT ""
#define PACKAGE_NAME ""
#define PACKAGE_STRING ""
#define PACKAGE_TARNAME ""
#define PACKAGE_VERSION ""
#endif
#ifdef __cplusplus
extern "C" void std::exit (int) throw(); using std::exit;
configure: exit 0
任何暗示可能的解決方案將不勝感激。
我重新編譯使用--with-GMP =在/ usr/local選項MPFR。我做的另一個改變是將LD_LIBRARY_PATH設置爲/ usr/local/lib而不是/ usr/local。那就是訣竅。謝謝! – 2011-06-08 15:53:23