在RHEL6上构建GCC 5.2
Building GCC 5.2 on RHEL6
由于我们的一个项目需要C++14支持,我尝试使用中描述的步骤在RHEL6实例上构建GCC5.2http://en.librehat.com/blog/build-gcc-5-dot-2-on-rhel-6/.然而,尽管这些步骤在RHEL5实例上运行良好,但在AmazonLinux上构建libgomp:的步骤中,我会遇到以下错误
configure:3688: checking for C compiler default output file name
configure:3710: /home/samudra/gcc/./gcc/xgcc -B/home/samudra/gcc/./gcc/ -B/home/samudra/gcc5/x86_64-redhat-linux/bin/ -B/home/samudra/gcc5/x86_64-redhat-linux/lib/ -isystem /home/samudra/gcc5/x86_64-redhat-linux/include -isystem /home/samudra/gcc5/x86_64-redhat-linux/sys-include -g -O2 conftest.c >&5
/usr/lib/../lib64/crt1.o: In function `_start':
(.text+0x12): undefined reference to `__libc_csu_fini'
/usr/lib/../lib64/crt1.o: In function `_start':
(.text+0x19): undefined reference to `__libc_csu_init'
collect2: error: ld returned 1 exit status
configure:3714: $? = 1
configure:3751: result:
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "GNU Offloading and Multi Processing Runtime Library"
| #define PACKAGE_TARNAME "libgomp"
| #define PACKAGE_VERSION "1.0"
| #define PACKAGE_STRING "GNU Offloading and Multi Processing Runtime Library 1.0"
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL "http://www.gnu.org/software/libgomp/"
| #define PACKAGE "libgomp"
| #define VERSION "1.0"
| /* end confdefs.h. */
|
| int
| main ()
| {
|
| ;
| return 0;
| }
configure:3757: error: in `/home/samudra/gcc/x86_64-redhat-linux/libgomp':
configure:3761: error: C compiler cannot create executables
四处狩猎(http://gcc.1065356.n5.nabble.com/Build-gcc-4-8-2-error-gcc-4-8-1-x86-64-unknown-linux-gnu-libgomp-td977436.html)表明编译器无法找到libc库。然而,我无法找到解决问题的方法。之前有人遇到过类似的问题吗?知道发生了什么事吗?
另一种选择是使用RH开发工具集,这是订阅的一部分。它现在支持RHEL 6和7上的GCC 5.2:http://developerblog.redhat.com/2015/11/17/gcc-5-developer-toolset-4-generally-available/
以下是关于它的更多信息:http://developerblog.redhat.com/2015/10/16/5-things-need-know-gcc-5-developer-toolset-beta/
HTH
相关文章:
- 在使用 GCC 4.8.5 构建的应用中对 cxx11 函数的未定义引用
- 无法使用 devtoolsets-8-gcc 构建提升?
- 使用 CMake (make) 和 GCC 构建和编译 gSOAP 项目
- 使用 gcc 6 构建 OpenJDK8 时出现链接错误
- 使用 CodeBlocks + GCC 构建的可执行文件是否可以在任何 Windows 上运行?
- 使用GCC 4.8构建错误:数组用作初始化器
- 无法在 Windows 7、32 位上使用 tdm-gcc 构建 cpp 文件(表示 exe 不兼容)
- 如何在Windows上为GCC构建curlpp
- GCC 构建时间不会从预编译标头中受益太多
- 无法使用 GCC 构建 C 应用程序,因为未定义对'deflateEnd'的引用
- 用于回归测试的快速 GCC 构建
- gcc 4.7.1构建以未定义的引用结束
- GCOV:使用GCC构建时,覆盖率和最新覆盖率之间的区别是什么
- 使用从导入库(.lib)转换的库文件(.a),使用gcc构建dll
- 使用gcc构建poco时,Recipe失败
- 在Windows 7上使用Cygwin为GCC构建提升 - 引导错误
- 树莓派 GCC 4.8.2 构建提升 1.56 原子错误
- 静态初始化期间将 gcc 构建的 Boost 链接到英特尔 C++ 编译程序时出现 Segfault
- 使用GCC 5.2.0构建Chromium: - strict-overflow=1警告
- 在Xcode中使用gcc构建时,如何删除不需要的命令行选项?