gcc - Intel 线程积木 gcc 版本
问题描述
我已经安装了英特尔并行工作室。但是,在 tbb 的目录结构中查看 gcc 编译器,似乎使用了 4.8。我正在尝试构建另一个依赖于 tbb 的存储库,它给出了以下错误,我相当肯定这是由旧版本的 gcc 引起的。
错误:
/usr/include/tbb/concurrent_vector.h(667): error: ambiguous "?" operation: second operand of type "tbb::internal::concurrent_vector_base_v3::size_type" can be converted to third operand type "tbb::atomic<unsigned long>", and vice versa
/usr/include/tbb/concurrent_vector.h(680): error: ambiguous "?" operation: second operand of type "tbb::internal::concurrent_vector_base_v3::size_type" can be converted to third operand type "tbb::atomic<unsigned long>", and vice versa
2 errors detected in the compilation of "/tmp/tmpxft_00000d0e_00000000-4_gpu_handle.cpp4.ii".
make: *** [build/objs/cuda/tensor/gpu_handle.o] Error 2
tbb的目录结构如下
mm470@pc5-036-l:~/usr/parallel_studio_xe_2020/compilers_and_libraries_2020/linux/tbb/lib/intel64/gcc4.8 $ dir
libtbb.so libtbb.so.2 libtbb_debug.so.2 libtbbmalloc.so libtbbmalloc.so.2 libtbbmalloc_debug.so.2
有谁首先知道我对导致此错误的 gcc 版本的预感是否正确,其次我将如何使用更新版本的 gcc 安装并行工作室。我电脑上的gcc是高版本。
mm470@pc5-036-l:~/usr/parallel_studio_xe_2020/compilers_and_libraries_2020/linux/tbb/lib/intel64/gcc4.8 $ gcc --version
gcc (GCC) 6.3.1 20170216 (Red Hat 6.3.1-3)
Copyright (C) 2016 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
解决方案
gcc 版本与将使用的 gnu 运行时相关。AFAIR 英特尔编译器不提供自己的运行时和使用 gnu 运行时。他们(gcc 运行时)在早期版本和 4.8 版本之间有一些重大变化。
AFAIS/usr/include/tbb/concurrent_vector.h
是您本地安装的来自您的 linux 发行版的 TBB,而不是来自编译器包。尝试获取编译器环境脚本来设置不同的路径。
推荐阅读
- javascript - VueJS: Uncaught (in promise) TypeError: Cannot read property 'rol' of undefined
- sqlite - phpLiteAdmin v1.9.8.2 has "SQL?" showing up all over the page
- influxdb - 在 influxql 中使用正则表达式排除测量值
- tensorflow - TensorFlow Hub 上与北美地标分类模型的输出不匹配
- fabricjs - 如何检查织物对象是否为视频?
- python - 为什么我在 python 3.9 中不断收到属性错误
- php - 在 php(yii1.1 框架)中处理 csv 文件时,爱尔兰口音变为 wiered 字符
- python - 如何从单独的请求中结束无限循环?
- azure - 无法在 Azure VM 上更新 ubuntu
- python - 更改配置并加载在下游任务上微调的拥抱脸模型