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

前端之家收集整理的这篇文章主要介绍了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@H_502_2@ 
 

这里的问题是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’

猜你在找的CentOS相关文章