首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >无法编译oneAPI示例

无法编译oneAPI示例
EN

Stack Overflow用户
提问于 2022-02-15 20:49:46
回答 2查看 306关注 0票数 0

我安装了oneAPI工具,并试图编译示例项目vector-add

代码语言:javascript
复制
make all
dpcpp -O2 -g -std=c++17 -o vector-add-buffers src/vector-add-buffers.cpp
In file included from src/vector-add-buffers.cpp:22:
In file included from /home/xxx/opt/intel/oneapi/compiler/2022.0.2/linux/bin-llvm/../include/sycl/CL/sycl.hpp:11:
In file included from /home/xxx/opt/intel/oneapi/compiler/2022.0.2/linux/bin-llvm/../include/sycl/CL/sycl/accessor.hpp:12:
In file included from /home/xxx/opt/intel/oneapi/compiler/2022.0.2/linux/bin-llvm/../include/sycl/CL/sycl/atomic.hpp:12:
In file included from /home/xxx/opt/intel/oneapi/compiler/2022.0.2/linux/bin-llvm/../include/sycl/CL/sycl/access/access.hpp:10:
In file included from /home/xxx/opt/intel/oneapi/compiler/2022.0.2/linux/bin-llvm/../include/sycl/CL/sycl/detail/common.hpp:116:
In file included from /home/xxx/opt/intel/oneapi/compiler/2022.0.2/linux/bin-llvm/../include/sycl/CL/sycl/exception.hpp:17:
In file included from /home/xxx/opt/intel/oneapi/compiler/2022.0.2/linux/bin-llvm/../include/sycl/CL/sycl/stl.hpp:13:
/home/xxx/opt/intel/oneapi/compiler/2022.0.2/linux/bin-llvm/../include/sycl/CL/sycl/bit_cast.hpp:33:22: error: no member named 'is_trivially_copyable' in namespace 'std'
  static_assert(std::is_trivially_copyable<From>::value,
                ~~~~~^
/home/xxx/opt/intel/oneapi/compiler/2022.0.2/linux/bin-llvm/../include/sycl/CL/sycl/bit_cast.hpp:33:44: error: 'From' does not refer to a value
  static_assert(std::is_trivially_copyable<From>::value,
                                           ^

我怀疑这是由旧的cmakepkg-configmakegccg++造成的,但我没有对集群的根访问权限。我试着用conda重新安装它。反正也无济于事。

EN

回答 2

Stack Overflow用户

发布于 2022-02-28 11:16:08

为了用dpcpp编译器编译向量添加示例代码,gcc版本至少应该是7.3.0或更高版本。

有关更多信息,请参阅下面的链接。

https://www.intel.com/content/www/us/en/developer/articles/system-requirements/intel-oneapi-dpcpp-system-requirements.html

票数 1
EN

Stack Overflow用户

发布于 2022-03-04 07:46:07

您可以自己编译gcc (这很容易),并使用export CXX=/path/gcc-9.2.0/bin/g++export CC=/path/gcc-9.2.0/bin/gcc为cmake设置编译器env。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/71133221

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档