LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1618|回复: 10

"unable to detect exception model"

[复制链接]
发表于 2007-3-1 18:26:59 | 显示全部楼层 |阅读模式
编译gcc的时候出错了! 请帮忙一下.

checking whether to build shared libraries... yes
checking whether to build static libraries... yes
creating libtool
updating cache ./config.cache
configure: loading cache ./config.cache
checking how to run the C++ preprocessor... /lib/cpp
loading cache ./config.cache within ltconfig
checking host system type... i686-pc-linux-gnu
checking build system type... i686-pc-linux-gnu
ltcf-cxx.sh: error: problem compiling test program
checking for objdir... .libs
checking for /home/looking/MiniLinux/toolchains/toolsrc/gcc-4.1.1/host-i686-pc-linux-gnu/gcc/xgcc option to produce PIC...  -DPIC
checking if /home/looking/MiniLinux/toolchains/toolsrc/gcc-4.1.1/host-i686-pc-linux-gnu/gcc/xgcc PIC flag  -DPIC works... no
checking if /home/looking/MiniLinux/toolchains/toolsrc/gcc-4.1.1/host-i686-pc-linux-gnu/gcc/xgcc static flag  works... no
finding the maximum length of command line arguments... (cached) 49153
checking if /home/looking/MiniLinux/toolchains/toolsrc/gcc-4.1.1/host-i686-pc-linux-gnu/gcc/xgcc supports -c -o file.o... (cached) yes
checking whether the linker (/home/looking/MiniLinux/toolchains/toolsrc/gcc-4.1.1/host-i686-pc-linux-gnu/gcc/collect-ld) supports shared libraries...
checking how to hardcode library paths into programs... unsupported
checking whether stripping libraries is possible... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking command to parse /home/looking/MiniLinux/toolchains/toolsrc/gcc-4.1.1/host-i686-pc-linux-gnu/gcc/nm output... failed
checking if libtool supports shared libraries... no
checking whether to build shared libraries... no
checking whether to build static libraries... yes
appending configuration tag "CXX" to libtool
checking for exception model to use... configure: error: unable to detect exception model
make[2]: *** [configure-target-libstdc++-v3] Error 1
make[2]: Leaving directory `/home/looking/MiniLinux/toolchains/toolsrc/gcc-4.1.1'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/looking/MiniLinux/toolchains/toolsrc/gcc-4.1.1'
make: *** [build_full_gcc] Error 2
发表于 2007-3-1 18:48:29 | 显示全部楼层
gcc 原目录编译?还是?
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-3-2 09:24:24 | 显示全部楼层
对,就是编译gcc-4.1.1的时候出现的.
makefile 中是这样的
        ./configure --prefix=$(PREFIX) --target=$(ARCH) \
            --enable-clocale=gnu --enable-shared \
            --enable-threads=posix --enable-__cxa_atexit \
            --enable-languages=c,c++ --disable-libstdcxx-pch \
                --disable-nls
        $(MAKE) -C $(SRC_DIR)/$(GCC_NAME)
        $(MAKE) -C $(SRC_DIR)/$(GCC_NAME) install

config.log 中是这样的:
configure:2301: checking for MPFR
configure:2314: gcc -o conftest -g -O2    conftest.c  -lmpfr -lgmp 1>&5
configure:2308:18: mpfr.h: No such file or directory
configure: In function `main':
configure:2310: `mpfr_t' undeclared (first use in this function)
configure:2310: (Each undeclared identifier is reported only once
configure:2310: for each function it appears in.)
configure:2310: parse error before "n"
configure:2310: `n' undeclared (first use in this function)
configure: failed program was:
#line 2306 "configure"
#include "confdefs.h"
#include <gmp.h>
#include <mpfr.h>
int main() {
mpfr_t n; mpfr_init(n);
; return 0; }

这个mpfr.h是个什么文件呀!
回复 支持 反对

使用道具 举报

发表于 2007-3-2 10:04:31 | 显示全部楼层
看清楚我的问题
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-3-2 10:45:43 | 显示全部楼层
"gcc 原目录编译?还是?"
不懂!!!! 啥意思叫 原目录?

我是解压gcc-core-4.1.1.tar.bz2 gcc-g++-4.1.1.tar.bz2
然后使用下面命令编译的.
./configure --prefix=$(PREFIX) --target=$(ARCH) \
--enable-clocale=gnu --enable-shared \
--enable-threads=posix --enable-__cxa_atexit \
--enable-languages=c,c++ --disable-libstdcxx-pch \
--disable-nls
$(MAKE) -C $(SRC_DIR)/$(GCC_NAME)
$(MAKE) -C $(SRC_DIR)/$(GCC_NAME) install
回复 支持 反对

使用道具 举报

发表于 2007-3-2 10:49:13 | 显示全部楼层
"GCC 的安装指南推荐用一个新建的目录来编译它,而不是在源码目录中"
这句话注意到了没有?
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-3-2 11:04:05 | 显示全部楼层
哦! 请问,如何新建一个目录来编译.
我使用make -C GCC_DIR 这样可以么?
呵呵,有些迷惑,请帮忙
回复 支持 反对

使用道具 举报

发表于 2007-3-2 11:16:24 | 显示全部楼层
假设你在gcc-core-4.1.1目录下, 执行
$ mkdir -v ../gcc-core-build
$ cd ../gcc-core-build
$ ../gcc-core-4.1.1/configure --prefix=$(PREFIX) --target=$(ARCH) \
--enable-clocale=gnu --enable-shared \
--enable-threads=posix --enable-__cxa_atexit \
--enable-languages=c,c++ --disable-libstdcxx-pch \
--disable-nls
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-3-2 11:53:08 | 显示全部楼层
明白你的意思了! 我在修改!
回复 支持 反对

使用道具 举报

发表于 2007-12-4 10:43:52 | 显示全部楼层
我在F8环境下编译lfs6.3里的binutils-2.7和gcc-4.1.2的时候都再config.log里发现有找不到mpfr.h这个错误.
我是在另外的build目录下编译的,也是交叉编译的时候出现的错误.
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表