编译旧版本的 gcc
我正在尝试在 CentOS 5.5 操作系统上使用 gcc 版本 4.1.2 20080704 (Red Hat 4.1.2-50) 编译 gcc 版本 gcc4.3.2。最初,编译器抱怨需要 gmp 和 mpfr 库,然后成功下载、编译并安装了这些库。
安装后,使用的新配置命令为:
../gcc4.3.2/gcc-4.3.2/configure --prefix=/home/shahw/gccdir/ --with-gmp=/usr/local/ - -with-mpfr=/usr/local/
我现在遇到以下错误:
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
任何有关潜在解决方案的提示将不胜感激。
I am trying to compile gcc version gcc4.3.2 using gcc version 4.1.2 20080704 (Red Hat 4.1.2-50) on a CentOS 5.5 os. Initially the compiler complained about needing gmp and mpfr libraries which were then downloaded, compiled and installed successfully.
After the installation, the new configure command that was used was:
../gcc4.3.2/gcc-4.3.2/configure --prefix=/home/shahw/gccdir/ --with-gmp=/usr/local/ --with-mpfr=/usr/local/
I now encounter the following error:
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 contains the following at the end:
## ----------- ##
## 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
Any hint towards a potential solution would be greatly appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是一个看起来不错的开始链接:
http://www.linuxquestions.org/questions/linux-from-scratch-13/why-cannot-compute-suffix-of-object-files-350753/
Here is a link that seems good to start with:
http://www.linuxquestions.org/questions/linux-from-scratch-13/why-cannot-compute-suffix-of-object-files-350753/