centos – 用古董glibc编译现代海湾合作委员会的麻烦

我想在Centos 6.4上编译一个现代的GCC.问题是Centos没有现代的glibc和GCC 4.8.x和4.7.x继续给我以下编译错误
... -DL_gcov -c ../../.././libgcc/libgcov.c
In file included from /usr/include/features.h:385:0,from /usr/include/stdio.h:28,from ../../.././libgcc/../gcc/tsystem.h:88,from ../../.././libgcc/libgcov.c:29:
/usr/include/gnu/stubs.h:7:27: Fatal error: gnu/stubs-32.h: No such file or directory

这里的问题是gnu / stubs-32.h是现代glibc的一部分,Centos 6.4似乎没有它.我已经尝试构建自己的glibc,但是一旦安装它并且在我的本地LD_LIBRARY_PATH中我就无法运行任何其他程序,因为系统上的所有现有可执行文件都试图链接它并且它们失败了.

我想使用新的编译器,因为它可以更好地处理C STL代码,并且因为GCC 4.8中的优化器使我的代码运行时间是Centos附带的GCC 4.4.7编译器的1/2.

有关如何做到这一点的任何建议?

在Centos上构建gcc编译器,目标只有64位.
摘自 documentation

C standard library and headers
In order to build GCC,the C standard library and headers must be present for all target variants for which target libraries will be built (and not only the variant of the host C++ compiler).
This affects the popular ‘x86_64-unkNown-linux-gnu’ platform (among other multilib targets),for which 64-bit (‘x86_64’) and 32-bit (‘i386’) libc headers are usually packaged separately. If you do a build of a native compiler on ‘x86_64-unkNown-linux-gnu’,make sure you either have the 32-bit libc developer package properly installed (the exact name of the package depends on your distro) or you must build GCC as a 64-bit only compiler by configuring with the option –disable-multilib. Otherwise,you may encounter an error such as ‘Fatal error: gnu/stubs-32.h: No such file’

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐


Centos下搭建性能监控Spotlight
CentOS 6.3下Strongswan搭建IPSec VPN
在CentOS6.5上安装Skype与QQ
阿里云基于centos6.5主机VPN配置
CentOS 6.3下配置multipah
CentOS安装、配置APR和tomcat-native
centos6.5下postgres-XC集群安装与配置
CentOS 6使用openssl搭建根CA
CentOS6.6中安装VNC server
CentOS下更新Python最新版本
Centos安装pycurl
CentOS 7 安装PostGIS
CentOS 7.1PXE网络自动化安装
CentOS下ffmpeg与第三方编码编译安装
CentOS 6.4安装配置squid
CentOS6.5 安装配置drbd
CentOS6.4 安装jenkins
centos安装增强工具
CentOS6.4安装配置redis
CentOS 6上部署OpenVPN Server