+ -
当前位置:首页 → 问答吧 → 帮忙进拉看看(已解决)

帮忙进拉看看(已解决)

时间:2007-11-17

来源:互联网

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);

作者: smallman   发布时间: 2007-11-17

呵呵,你连gcc等开发工具都没安装怎么LFS啊。
首先把gcc g++ make 等装上

作者: 不开花   发布时间: 2007-11-17

唉~~说了 N 多次要先详细阅读 LFS 手册後再动手,总是没有人愿意看~~

作者: d00m3d   发布时间: 2007-11-17

推荐使用LFS的LiveCD进行编译

作者: 红烧鸟   发布时间: 2007-11-17

引用:
作者: 红烧鸟
推荐使用LFS的LiveCD进行编译
强烈支持..........

作者: beyond1314   发布时间: 2007-11-23

不是没装GCC 是被我搞坏了 重装 就没问题了

作者: smallman   发布时间: 2007-11-23

楼主请问一下你是怎么解决的这个问题?
注明:我是在编译交叉编译工具链
我在第一次编译binutils的时候也出现了这个问题,但是可以编译过去。
但是我在第一次编译gcc的时候就编译不过去了,请问你是怎么解决的?

作者: kicoo   发布时间: 2007-12-04

难道是宿主环境中的gcc给破坏或者版本不对?
我宿主中的gcc版本跟当前编译的版本一样的
难道把gcc重新安装到宿主环境里再重新编译这些

作者: kicoo   发布时间: 2007-12-04

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这两个选项了!!

作者: kicoo   发布时间: 2007-12-04

我用liveCD第一次编译binutils-2.17
和楼主出现同样的问题
请问我怎么解决啊???

作者: awnun   发布时间: 2008-01-01