OpenCL 链接错误


#1

/usr/lib64/gcc/x86_64-suse-linux/8/…/…/…/…/x86_64-suse-linux/bin/ld: 当搜索用于 /usr/lib/libOpenCL.so 时跳过不兼容的 -lOpenCL
/usr/lib64/gcc/x86_64-suse-linux/8/…/…/…/…/x86_64-suse-linux/bin/ld: 找不到 -lOpenCL
collect2: error: ld returned 1 exit status

Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib64/gcc/x86_64-suse-linux/8/lto-wrapper
OFFLOAD_TARGET_NAMES=hsa:nvptx-none
Target: x86_64-suse-linux
Configured with: …/configure --prefix=/usr --infodir=/usr/share/info --mandir=/usr/share/man --libdir=/usr/lib64 --libexecdir=/usr/lib64 --enable-languages=c,c++,objc,fortran,obj-c++,ada,go --enable-offload-targets=hsa,nvptx-none=/usr/nvptx-none, --without-cuda-driver --enable-checking=release --disable-werror --with-gxx-include-dir=/usr/include/c++/8 --enable-ssp --disable-libssp --disable-libvtv --disable-cet --disable-libcc1 --enable-plugin --with-bugurl=http://bugs.opensuse.org/ --with-pkgversion=‘SUSE Linux’ --with-slibdir=/lib64 --with-system-zlib --enable-libstdcxx-allocator=new --disable-libstdcxx-pch --enable-version-specific-runtime-libs --with-gcc-major-version-only --enable-linker-build-id --enable-linux-futex --enable-gnu-indirect-function --program-suffix=-8 --without-system-libunwind --enable-multilib --with-arch-32=x86-64 --with-tune=generic --build=x86_64-suse-linux --host=x86_64-suse-linux
Thread model: posix
gcc version 8.2.1 20190204 [gcc-8-branch revision 268513] (SUSE Linux)

S 名称 摘要 类型
i+ Mesa-libOpenCL Mesa OpenCL implementation 软件包
libOpenCL1 OpenCL ICD Bindings 软件包
opencl-cpp-headers OpenCL C++ headers 软件包
opencl-headers OpenCL (Open Computing Language) headers 软件包
i+ opencl-headers-1_2 OpenCL (Open Computing Language) headers 软件包
openclonk Fast-paced 2D genre mix 软件包
openclonk-data Data files for openclonk 软件包

#2

opencl-headers 没安装。


#3

我装了cuda就好了,然后obs studio就炸了不能共存


#4

还是应该用 osc 来编译。