LinuxSir.cn,穿越时空的Linuxsir!

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

帮忙进拉看看(已解决)

[复制链接]
发表于 2007-11-17 02:11:49 | 显示全部楼层 |阅读模式
checking whether the C compiler works... configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details.
make[1]: *** [configure-libiberty] 错误 1
make[1]: Leaving directory `/mnt/lfs/sources/binutils-build'
make: *** [all] 错误 2
lfs6.3宿主是suse10.2第一次编译binutils
config.log
configure:2187: checking whether compiler driver understands Ada
configure:2219: checking how to compare bootstrapped objects
configure:2317: checking for correct version of gmp.h
configure:2330: gcc -B/usr/bin/ -c -g -O2   conftest.c 1>&5
configure:2343: checking for MPFR
configure:2356: gcc -B/usr/bin/ -o conftest -g -O2    conftest.c  -lmpfr -lgmp 1>&5
configure:2350:18: error: mpfr.h: No such file or directory
configure: In function 'main':
configure:2352: error: 'mpfr_t' undeclared (first use in this function)
configure:2352: error: (Each undeclared identifier is reported only once
configure:2352: error: for each function it appears in.)
configure:2352: error: expected ';' before 'n'
configure:2352: error: 'n' undeclared (first use in this function)
configure: failed program was:
#line 2348 "configure"
#include "confdefs.h"
#include <gmp.h>
#include <mpfr.h>
int main() {
mpfr_t n; mpfr_init(n);
发表于 2007-11-17 08:45:24 | 显示全部楼层
呵呵,你连gcc等开发工具都没安装怎么LFS啊。
首先把gcc g++ make 等装上
回复 支持 反对

使用道具 举报

发表于 2007-11-17 10:55:48 | 显示全部楼层
唉~~说了 N 多次要先详细阅读 LFS 手册後再动手,总是没有人愿意看~~
回复 支持 反对

使用道具 举报

发表于 2007-11-17 12:22:22 | 显示全部楼层
推荐使用LFS的LiveCD进行编译
回复 支持 反对

使用道具 举报

发表于 2007-11-22 22:06:02 | 显示全部楼层
Post by 红烧鸟;1783626
推荐使用LFS的LiveCD进行编译


强烈支持..........
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-11-23 00:55:20 | 显示全部楼层
不是没装GCC 是被我搞坏了 重装 就没问题了
回复 支持 反对

使用道具 举报

发表于 2007-12-3 23:40:23 | 显示全部楼层
楼主请问一下你是怎么解决的这个问题?
注明:我是在编译交叉编译工具链
我在第一次编译binutils的时候也出现了这个问题,但是可以编译过去。
但是我在第一次编译gcc的时候就编译不过去了,请问你是怎么解决的?
回复 支持 反对

使用道具 举报

发表于 2007-12-3 23:51:59 | 显示全部楼层
难道是宿主环境中的gcc给破坏或者版本不对?
我宿主中的gcc版本跟当前编译的版本一样的
难道把gcc重新安装到宿主环境里再重新编译这些
回复 支持 反对

使用道具 举报

发表于 2007-12-4 11:01:40 | 显示全部楼层
The MPFR library is a C library for multiple-precision floating-point computations with correct rounding.
-----------------------------------------------------------------------------------------------
在configure里面也说
-------------------------------------------------------------------------------------------------
  --with-mpfr-dir=PATH    this option has been REMOVED
  --with-mpfr=PATH        specify prefix directory for installed MPFR package.
                          Equivalent to --with-mpfr-include=PATH/include
                          plus --with-mpfr-lib=PATH/lib
  --with-mpfr-include=PATH
                          specify directory for installed MPFR include files
  --with-mpfr-lib=PATH    specify directory for the installed MPFR library
  --with-gmp-dir=PATH     this option has been REMOVED
  --with-gmp=PATH         specify prefix directory for the installed GMP package.
                          Equivalent to --with-gmp-include=PATH/include
                          plus --with-gmp-lib=PATH/lib
  --with-gmp-include=PATH specify directory for installed GMP include files
  --with-gmp-lib=PATH     specify directory for the installed GMP library

-----------------------------------------------------------------------------------------------
是不是应该用上--without-mpfr --without-gmp这两个选项了!!
回复 支持 反对

使用道具 举报

发表于 2008-1-1 12:34:44 | 显示全部楼层
我用liveCD第一次编译binutils-2.17
和楼主出现同样的问题
请问我怎么解决啊???
回复 支持 反对

使用道具 举报

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

本版积分规则

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