LinuxSir.cn,穿越时空的Linuxsir!

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

LFS6.4编译GCC都时候报错说找不到头文件,麻烦大侠帮忙看下

[复制链接]
发表于 2009-5-17 23:23:11 | 显示全部楼层 |阅读模式
就是这一段:
tar -jxf ../mpfr-2.3.2.tar.bz2
mv mpfr-2.3.2 mpfr
tar -jxf ../gmp-4.2.4.tar.bz2
mv gmp-4.2.4 gmp
The GCC documentation recommends building GCC outside of the source directory in a dedicated build directory:
mkdir -v ../gcc-build
cd ../gcc-build
Prepare GCC for compilation:
前面都弄好了编译下面命令时出错:
CC="gcc -B/usr/bin/" ../gcc-4.3.2/configure \
     --prefix=/tools --with-local-prefix=/tools --disable-nls \
     --disable-shared --disable-libssp --enable-languages=c
我的文件摆放路径如下:
lfs:/mnt/lfs$ ls
gcc-4.3.2  gcc-build  gmp  lost+found  mpfr  sources  tools



切换到 gcc-build 目录下编译gcc报错:
lfs:/mnt/lfs/gcc-build$ CC="gcc -B/usr/bin/" ../gcc-4.3.2/configure     --prefix=/tools --with-local-prefix=/tools --disable-nls     --disable-shared --disable-libssp --enable-languages=c
中间是正确的………………
checking for correct version of gmp.h... yes
checking for correct version of mpfr.h... no
configure: error: Building GCC requires GMP 4.1+ and MPFR 2.3.0+.
Try the --with-gmp and/or --with-mpfr options to specify their locations.
Copies of these libraries' source code can be found at their respective
hosting sites as well as at ftp://gcc.gnu.org/pub/gcc/infrastructure/.
See also http://gcc.gnu.org/install/prerequisites.html for additional info.
If you obtained GMP and/or MPFR from a vendor distribution package, make
sure that you have installed both the libraries and the header files.
They may be located in separate packages.

说明书上说需要gmp和mpfr两个包,我两个包都解压改名字放做同一级目录下,结果gmp.h能找到,mpfr.h找不到,麻烦大侠帮忙看下。
再发一下我的目录,我的母系统是fedora10
lfs:/mnt/lfs$ ls
gcc-4.3.2  gcc-build  gmp  lost+found  mpfr  sources  tools
 楼主| 发表于 2009-5-17 23:34:52 | 显示全部楼层
mv mpfr  gcc-4.3.2  就可以了,晕死
  gmp和gcc-4.3.2要评级目录,mpfr要做gcc-4.3.2目录里面……………………
回复 支持 反对

使用道具 举报

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

本版积分规则

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