【问题标题】:Compile older version of gcc编译旧版本的 gcc
【发布时间】:2011-06-08 05:21:39
【问题描述】:

我正在尝试在 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

任何关于潜在解决方案的提示将不胜感激。

【问题讨论】:

    标签: gcc compiler-construction gmp mpfr


    【解决方案1】:

    【讨论】:

    • 我用 --with-gmp=/usr/local 选项重新编译了 mpfr。我所做的另一项更改是将 LD_LIBRARY_PATH 设置为 /usr/local/lib 而不仅仅是 /usr/local。那成功了。谢谢!
    猜你喜欢
    • 1970-01-01
    • 2020-01-18
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-10-19
    • 1970-01-01
    • 2011-02-20
    相关资源
    最近更新 更多