LinuxSir.cn,穿越时空的Linuxsir!

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

configure: error: C preprocessor "/lib/cpp" fails sanity che

[复制链接]
发表于 2011-6-14 13:07:23 | 显示全部楼层 |阅读模式
学做LFS6.6,在编译glibc的时候出错了。

手册上没有说。

网上只说要装某包,然后我都装了。

并且我检查了工具的版本,没有不推荐的版本存在。

手册地址:http://www.ha97.com/book/lfs-book-6.6/chapter06/glibc.html

求解。。


  1. [lfs@LK glibc-build]$ ../../lfs-6.6-sources/glibc-2.11.1/configure --prefix=/usr --disable-profile --enable-add-ons --enable-kernel=2.6.32.8 --libexecdir=/usr/lib/glibc
  2. checking build system type... i686-pc-linux-gnulibc1
  3. checking host system type... i686-pc-linux-gnulibc1
  4. checking for gcc... gcc
  5. checking for suffix of object files... o
  6. checking whether we are using the GNU C compiler... yes
  7. checking whether gcc accepts -g... yes
  8. checking for gcc option to accept ISO C89... unsupported
  9. checking how to run the C preprocessor... /lib/cpp
  10. configure: error: in `/lfs/build/glibc-build':
  11. configure: error: C preprocessor "/lib/cpp" fails sanity check
  12. See `config.log' for more details.
  13. [root@LK ~]# rpm -qa | egrep '(gcc|glibc|headers)'
  14. glibc-devel-2.5-49
  15. gcc44-4.4.0-6.el5
  16. gcc-gnat-4.1.2-48.el5
  17. gcc44-gfortran-4.4.0-6.el5
  18. glibc-common-2.5-49
  19. libgcc-4.1.2-48.el5
  20. compat-libgcc-296-2.96-138
  21. glibc-headers-2.5-49
  22. glibc-utils-2.5-49
  23. gcc-4.1.2-48.el5
  24. gcc-c++-4.1.2-48.el5
  25. gcc-java-4.1.2-48.el5
  26. gcc-objc++-4.1.2-48.el5
  27. gcc44-c++-4.4.0-6.el5
  28. glibc-2.5-49
  29. kernel-headers-2.6.18-194.el5
  30. gcc-objc-4.1.2-48.el5
  31. gcc-gfortran-4.1.2-48.el5
  32. [root@LK ~]# ll /lib/cpp
  33. lrwxrwxrwx 1 root root 14 May 19 02:49 /lib/cpp -> ../usr/bin/cpp
复制代码
发表于 2011-6-14 13:38:22 | 显示全部楼层
/lib/cpp 这个链接是在第六章安装完 gcc 后才建立的, 而第六章安装 glibc 是在这前面, 这个时候 /lib/cpp 应该是不存在的
回复 支持 反对

使用道具 举报

 楼主| 发表于 2011-6-14 14:54:52 | 显示全部楼层
那我该怎么做呢,我把/lib/cpp重命名后问题依旧呢。
回复 支持 反对

使用道具 举报

发表于 2011-6-25 12:50:44 | 显示全部楼层
编译glibc 时带上参数 --disable-shared
回复 支持 反对

使用道具 举报

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

本版积分规则

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