问题标签 [devtoolset]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
419 浏览

gcc - red hat devtoolset-3 中的 g++ 找不到 -lelf

嗨,我在 centos 6.5 上运行 devtoolset-3。

当我运行 g++ 时,ld 失败,因为它找不到 -lelf

我使用 -v 标志编译以查找 g++ 用于查找库的库路径,并将 libelf.so 移动到每个文件夹中,但它仍然无法正常工作。

我想知道是否有人有任何想法?-lelf 不是 libelf.so 吗?该文件是否应该位于库路径之外的其他位置?

谢谢!

0 投票
1 回答
1849 浏览

node.js - 在 centos 6.8 上编译 nodejs v4

我在安装需要在 centos 6.8 上编译的 nodejs 库时遇到问题。看起来 node v4 依赖项应该使用较新版本的 gcc-c++ 编译。我按照许多帖子中的建议安装了 devtoolset v3,以便能够使用 gcc-4.9。但它仍然失败并显示相同的错误消息,表明我仍在使用不支持 c++11 的编译器。我做了 strace ,看起来 devtools 没有提供 libgcc 安装过程期望找到它,所以它最终采用常规的,即 gcc-4.4

设置:

没有开发工具集:

npm 安装

开发工具集:

npm 安装

追踪:

节点gyp重建

所以,问题是 - 在centos6上应用devtoolset使用gcc-4.9时我缺少什么?还是有另一种方法可以在 centos6 上连接 v4 和 pcap2 节点?

0 投票
2 回答
100 浏览

c++ - 仅在 GCC 4.8.2 x86 (devtoolset-2) 上使用前导包扩展的模板推导失败

这是我的 C++11 项目中一些模板元黑客的 MCVE:

它在 GCC 6.1 使用 Coliru、GCC 4.8.5 和 GCC 4.8.2 x86_64 (使用GodBolt中构建良好,但是当我将它插入我的开发环境时(在 CentOS 6 x86 上通过 devtoolset-2 是 GCC 4.8.2 ) 我得到错误:

我可以通过在第二个重载onSuccess之后timeoutonExpiry第二个重载中解决这个问题,但我认为原始排序更容易让开发人员使用,如果可以的话,我宁愿保留它。

那么还有其他方法吗?

而且,对于奖励积分,实际发生了什么?

0 投票
0 回答
748 浏览

linux - 有什么方法可以在 CentOS 6.8 上离线安装 Devtoolset-3?

Devtoolset-3yum 在 CentOS上安装的步骤在这里

但是我的 CentOS 6.8 服务器没有网络访问能力。(我可以在其他PC上访问网络。)是否有Devtoolset-3安装程序可以下载以进行离线安装?

我想binutils通过安装来升级Devtoolset-3binutils如果我没有连接,还有其他方法可以升级吗?

0 投票
1 回答
680 浏览

c++ - 如何配置 Qt Creator 以在 centos 6.7 上使用 RH 的 devtoolset-2?

我已经在我的 Centos 6.7 64 位上安装了 devtoolset-2 软件包。根据 RH 的建议,当我想从 gcc 4.4.7 切换到 gcc 4.8.2 时,我打开一个终端并输入scl enable devtoolset-2 'bash'如果我想在另一个 shell 中运行 gcc 或者source /opt/rh/devtoolset-2/enable如果我想在当前 shell 中运行 gcc,这样就可以了美好的。

现在我想使用 Qt 5.7 中的 gcc 4.8.2 ,所以我设置了一个新的工具包并通过在编译器路径中添加位于/opt/rh/devtoolset-2/root/usr/bin/g++(与 gcc 相同)中的 g++ 和 gcc 编译器的路径来添加新的编译器版本。而且我能够使用新工具包运行弹性节点示例来构建它。

但我仍然对这个过程有疑问,因为从 Qt Creator 开始,我没有使用命令,scl enable devtoolset-2 'bash'或者source /opt/rh/devtoolset-2/enable只添加编译器路径,那么将 devtoolset-2 与 Qt 一起使用是正确的方法吗?

0 投票
1 回答
1202 浏览

rpm - 如何安装下载的 devtoolset-6 rpms?

我下载了上面的 devtoolset-6 rpm 软件包,但是当我尝试安装所有软件包时,它显示如下:-

我知道这些是正确的,但这取决于彼此,有没有办法找出应该先安装哪个 rpm?

我正在设置离线模式(将这些 rpm 文件物理复制到 RHEL 服务器 6.4 中)

当我使用此命令安装所有软件包时

它显示这样的错误

我该怎么做,帮帮我。

0 投票
0 回答
1817 浏览

visual-studio-2015 - VS 2015 的 MSBuild

我的机器上安装了 VS 2010 和 VS 2015。我有一个全局级别的道具文件。

如果我提到

<PropertyGroup> <PlatformToolset Condition="'$(VisualStudioVersion)'=='14.0'">v140</PlatformToolset> <PlatformToolset Condition="'$(VisualStudioVersion)'=='10.0'">v100</PlatformToolset> </PropertyGroup>

使用 VS 2015 构建时出现以下错误。

1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Platforms\Win32\Microsoft.Cpp.Win32.Targets(518,5): error MSB8008: Specified platform toolset (v140) is not installed或无效。请确保选择了受支持的 PlatformToolset 值。

但是如果在相应的 Vcxproj 中输入相同的条目,它会使用 VS 2015 成功构建。

任何一点都可以解决这个问题吗?

0 投票
0 回答
394 浏览

c++ - 将 G++ 升级到 Centos 6 兼容的最低版本

我们的大型遗留应用程序在 32 位 Centos-6 中使用 g++ 4.4.7 编译。

但是,我想使用 Address Sanitizer 来解决glibc 损坏的问题;MALLOC_CHECK_ 不起作用,但 g++ 4.4.7 不支持 Address Sanitizer。

我安装了 devtoolset-2 来获取 g++v4.8.2 20140120 (Red Hat 4.8.2-15)但现在程序无法编译,因为exception_ptr.h 不支持异常传播

所以想也许更新版本的 g++ 会起作用。我找不到任何要devtoolset-3在 32 位 Centos 上安装的存储库。(有吗?)

否则,如果我从源代码重新编译 g++,选择哪个版本?GCC 主页列出了一直到 v8 的所有方式 。

编译 v8 会破坏盒子上的其他应用程序(因为 ABI 不兼容吗? - 我不完全理解)?还是最好选择最高的 v4.x 版本?

0 投票
0 回答
261 浏览

precision - 使用 devtoolset-6 链接 gfortran 中的错误

我有带有 CentOS 6.4 的系统,它带有 GNU Fortran (GCC) 4.4.7 20120313 (Red Hat 4.4.7-18)。

我正在做四倍精度计算,为此我安装了 devtoolset-6 w/oa 问题。由于系统安装了默认的 gcc/gfortran,我清除了 shell

然后我设置了 devtoolset-6 环境

如果我检查已安装的 gcc 和 gfortran 版本,它们如下

gcc (GCC) 6.3.1 20170216 (Red Hat 6.3.1-3)
GNU Fortran (GCC) 6.3.1 20170216 (Red Hat 6.3.1-3)

到目前为止,一切都很好。我还有一个下面给出的测试示例

编译

当我尝试编译时,出现以下错误

(.text+0x20): 对main' /tmp/cc7n6vIv.o: In functionljacoeff_':test.F:(.text+0xf0) 的未定义引用: 对_gfortran_transfer_real128_write' test.F:(.text+0x16b): undefined reference to_gfortran_transfer_complex128_write' 的未定义引用 test.F:(.text+0x1ea): 对 `_gfortran_transfer_complex128_write' 的未定义引用 collect2: 错误: ld 返回 1 个退出状态

起初,我认为 _gfortran_transfer_real128_write 函数未定义,并使用默认的“nm”命令检查了 devtoolset-6 附带的库,并且确实该函数是在 libgfortran.a 中定义的。经过一些调试和更多调试后,我发现了“-v”选项并重新编译了代码,然后发现一些令人困惑的东西看起来像是 ld 检查系统旧库而不是 devtoolset-6 附带的库。LIBRARY_PATH 包括 /usr/lib/../lib64/ 文件夹,这会导致错误。无论如何,如果链接器找不到这些函数,它还应该检查 devtoolset-6 库。看起来这不会发生。我该如何解决这个链接错误?

驱动:gfortran -v -fdefault-real-8 -o test.exe test.F -l gfortran -lm -shared-libgcc 使用内置规范。COLLECT_GCC=gfortran COLLECT_LTO_WRAPPER=/opt/rh/devtoolset-6/root/usr/libexec/gcc/x86_64-redhat-linux/6.3.1/lto-wrapper 目标:x86_64-redhat-linux 配置:../configure - -enable-bootstrap --enable-languages=c,c++,fortran,lto --prefix=/opt/rh/devtoolset-6/root/usr --mandir=/opt/rh/devtoolset-6/root/usr/分享/人 --infodir=/opt/rh/devtoolset-6/root/usr/share/info --with-bugurl= http://bugzilla.redhat.com/bugzilla--enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique -object --enable-linker-build-id --enable-plugin --with-linker-hash-style=gnu --enable-initfini-array --disable-libgcj --with-default-libstdcxx-abi=gcc4 -兼容 --with-isl=/builddir/build/BUILD/gcc-6.3.1-20170216/obj-x86_64-redhat-linux/isl-install --enable-libmpx --with-mpc=/builddir/build/ BUILD/gcc-6.3.1-20170216/obj-x86_64-redhat-linux/mpc-install --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux 线程模型:posix gcc 版本6.3.1 20170216 (Red Hat 6.3.1-3) (GCC) COLLECT_GCC_OPTIONS='-v' '-fdefault-real-8' '-o' 'test.exe' '-shared-libgcc' '-mtune=generic ''-march=x86-64'/opt/rh/devtoolset-6/root/usr/libexec/gcc/x86_64-redhat-linux/6.3.1/f951 test.F -fixed-form -cpp=/tmp/ccjQiTpi.f90 -quiet -v 测试。 F -quiet -dumpbase test.F -mtune=generic -march=x86-64 -auxbase test -version -fdefault-real-8 -fintrinsic-modules-path /opt/rh/devtoolset-6/root/usr/lib/ gcc/x86_64-redhat-linux/6.3.1/finclude -o /tmp/cceJeO1o.s GNU Fortran (GCC) 版本 6.3.1 20170216 (Red Hat 6.3.1-3) (x86_64-redhat-linux) 由 GNU 编译C 版本 6.3.1 20170216 (Red Hat 6.3.1-3)、GMP 版本 4.3.1、MPFR 版本 2.4.1、MPC 版本 0.8.1、isl 版本 0.14 或 0.13 GGC 启发式:--param ggc-min-expand =100 --param ggc-min-heapsize=131072 忽略不存在的目录 "/opt/rh/devtoolset-6/root/usr/lib/gcc/x86_64-redhat-linux/6.3.1/include-fixed" 忽略不存在的目录"/opt/rh/devtoolset-6/root/usr/lib/gcc/x86_64-redhat-linux/6.3.1/../../../../x86_64-redhat-linux/include" #include " ...” 搜索从这里开始:#include <...> 搜索从这里开始:/opt/rh/devtoolset-6/root/usr/lib/gcc/x86_64-redhat-linux/6.3.1/finclude /opt/ rh/devtoolset-6/root/usr/lib/gcc/x86_64-redhat-linux/6.3.1/include /usr/local/include /opt/rh/devtoolset-6/root/usr/include /usr/include 结束搜索列表. GNU Fortran2008 (GCC) version 6.3.1 20170216 (Red Hat 6.3.1-3) (x86_64-redhat-linux) 编译 GNU C version 6.3.1 20170216 (Red Hat 6.3.1-3), GMP版本 4.3.1、MPFR 版本 2.4.1、MPC 版本 0.8.1、isl 版本 0.14 或 0.13 GGC 启发式:--param ggc-min-expand=100 --param ggc-min-heapsize=131072 COLLECT_GCC_OPTIONS='-v ' '-fdefault-real-8' '-o' 'test.exe' '-shared-libgcc' '-mtune=generic' '-march=x86-64' /opt/rh/devtoolset-6/root/usr/libexec/gcc/x86_64-redhat-linux/6.3.1/as -v - -64 -o /tmp/cc7n6vIv.o /tmp/cceJeO1o.s 使用 BFD 版本 2.27-8.el6 的 GNU 汇编器版本 2.27 (x86_64-redhat-linux) 从 /opt/rh/devtoolset-6/root/ 读取规范usr/lib/gcc/x86_64-redhat-linux/6.3.1/libgfortran.spec 将规范库重命名为 liborig COLLECT_GCC_OPTIONS='-v' '-fdefault-real-8' '-o' 'test.exe' '-shared -libgcc' '-mtune=generic' '-march=x86-64' COMPILER_PATH=/opt/rh/devtoolset-6/root/usr/libexec/gcc/x86_64-redhat-linux/6.3.1/:/opt/ rh/devtoolset-6/root/usr/libexec/gcc/x86_64-redhat-linux/6.3.1/:/opt/rh/devtoolset-6/root/usr/libexec/gcc/x86_64-redhat-linux/:/ opt/rh/devtoolset-6/root/usr/lib/gcc/x86_64-redhat-linux/6.3.1/:/opt/rh/devtoolset-6/root/usr/lib/gcc/x86_64-redhat-linux/LIBRARY_PATH=/opt/rh/devtoolset-6/root/usr/lib/gcc/x86_64-redhat-linux/6.3。 1/:/opt/rh/devtoolset-6/root/usr/lib/gcc/x86_64-redhat-linux/6.3.1/../../../../lib64/:/lib/.. /lib64/:/usr/lib/../lib64/:/opt/rh/devtoolset-6/root/usr/lib/gcc/x86_64-redhat-linux/6.3.1/../../.. /:/lib/:/usr/lib/ COLLECT_GCC_OPTIONS='-v' '-fdefault-real-8' '-o' 'test.exe' '-shared-libgcc' '-mtune=generic' '-march= x86-64' /opt/rh/devtoolset-6/root/usr/libexec/gcc/x86_64-redhat-linux/6.3.1/collect2 -plugin /opt/rh/devtoolset-6/root/usr/libexec/gcc /x86_64-redhat-linux/6.3.1/liblto_plugin.so -plugin-opt=/opt/rh/devtoolset-6/root/usr/libexec/gcc/x86_64-redhat-linux/6.3.1/lto-wrapper -插件选择=-fresolution=/tmp/ccQAAlqC。res -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lquadmath -plugin-opt=-pass-through=-lm - plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc_s -plugin- opt=-pass-through=-lgcc --build-id --no-add-needed --eh-frame-hdr --hash-style=gnu -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86 -64.so.2 -o test.exe /usr/lib/../lib64/crt1.o /usr/lib/../lib64/crti.o /opt/rh/devtoolset-6/root/usr/ lib/gcc/x86_64-redhat-linux/6.3.1/crtbegin.o -L/opt/rh/devtoolset-6/root/usr/lib/gcc/x86_64-redhat-linux/6.3.1 -L/opt/ rh/devtoolset-6/root/usr/lib/gcc/x86_64-redhat-linux/6.3.1/../../../../lib64 -L/lib/../lib64 -L/usr /lib/../lib64 -L/opt/rh/devtoolset-6/root/usr/lib/gcc/x86_64-redhat-linux/6.3.1/../../.. /tmp/cc7n6vIv.o -lgfortran -lm -lgcc_s -lgcc -lquadmath -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc /opt/rh/devtoolset-6/root/usr/lib/gcc/x86_64-redhat-linux/6.3.1/ crtend.o /usr/lib/../lib64/crtn.o /usr/lib/../lib64/crt1.o:在函数中 _start': (.text+0x20): undefined reference tomain'/tmp/cc7n6vIv.o:在函数ljacoeff_': test.F:(.text+0xf0): undefined reference to _gfortran_transfer_real128_write'test.F:(.text+0x16b):未定义引用_gfortran_transfer_complex128_write' test.F:(.text+0x1ea): undefined reference to _gfortran_transfer_complex128_write'collect2:错误:ld 返回 1 退出状态

0 投票
1 回答
1032 浏览

c++11 - Centos7 和 devtoolset-7 下对 std::__sso_string::__sso_string 的未定义引用

我已经安装了 devtoolset-7 (gcc/g++ 7.2.1) 的 Centos 7 (CentOS Linux 版本 7.4.1708 (Core)),我正在尝试使用 conan 和 cmake 在调试模式下构建应用程序:

编译正常,但是当它尝试链接应用程序时,出现错误:

使用 c++filt,它表示未定义符号 'std::__sso_string::~__sso_string()'。

有谁知道如何解决这个问题?发布模式运行良好