clang: error: cannot find libdevice for sm_75. Provide path to different CUDA installation via --cuda-path, or pass -nocudalib to build without linking with libdevice.


Pei JIA
 


Hi, all:


I failed to build current OpenShadingLanguage master branch with the following ERROR messages:



[ 18%] Generating simplexnoise_cuda.bc
cd ....../OpenShadingLanguage/src/liboslexec && /usr/lib/llvm-11/bin/clang++ -I/usr/local/cuda/include -I/usr/local/cuda/include -I....../OpenShadingLanguage/src/liboslexec -I....../OpenShadingLanguage/build/include -I....../OpenShadingLanguage/src/include -I....../OpenShadingLanguage/src/cuda_common -I/usr/local/include -I/usr/include -I/usr/include -I/usr/include -I/usr/include -I/usr/include -DOSL_FAST_MATH=1 -DOSL_USE_OPTIX=1 -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -DOSL_LLVM_VERSION=110 -DOSL_LLVM_FULL_VERSION="11.0.0" -Dosoparse=OSL_v1_12_3_osoparse -Doslparse=OSL_v1_12_3_oslparse -std=c++14 -DOSL_FAST_MATH=1 -DOSL_USE_OPTIX=1 -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -DOSL_LLVM_VERSION=110 -DOSL_LLVM_FULL_VERSION="11.0.0" -Dosoparse=OSL_v1_12_3_osoparse -Doslparse=OSL_v1_12_3_oslparse -DOSL_LLVM_CUDA_BITCODE -std=c++14 --cuda-path=/usr/local/cuda -D__CUDACC__ -DOSL_COMPILING_TO_BITCODE=1 -DNDEBUG -DOIIO_NO_SSE -D__CUDADEVRT_INTERNAL__ --language=cuda --cuda-device-only --cuda-gpu-arch=sm_75 -Wno-deprecated-register -Wno-format-security -O3 -fno-math-errno -ffast-math -S -emit-llvm ../liboslnoise/simplexnoise.cpp -o ....../OpenShadingLanguage/build/src/liboslexec/simplexnoise_cuda.s
clang: error: cannot find libdevice for sm_75. Provide path to different CUDA installation via --cuda-path, or pass -nocudalib to build without linking with libdevice.
clang: error: GPU arch sm_75 is supported by CUDA versions between 10.0 and 11.0 (inclusive), but installation at /usr/local/cuda is 7.0. Use --cuda-path to specify a different CUDA install, pass a different GPU arch with --cuda-gpu-arch, or pass --no-cuda-version-check.
make[2]: *** [src/liboslexec/CMakeFiles/oslexec.dir/build.make:692: src/liboslexec/simplexnoise_cuda.bc] Error 1
make[2]: Leaving directory '....../OpenShadingLanguage/build'
make[1]: *** [CMakeFiles/Makefile2:1307: src/liboslexec/CMakeFiles/oslexec.dir/all] Error 2
make[1]: Leaving directory '....../OpenShadingLanguage/build'
make: *** [Makefile:169: all] Error 2
➜  build git:(master) ccmake ../


Can anybody give me a hand please?


  • My environments:
    • OS: Ubuntu 20.04
    • GCC: 10.3.1
    • GPU: Geforce 2080 Ti
    • NVIDIA Driver: 470.63.01
    • CUDA: 11.4


Thank you...


--
Dr. Pei Jia
CTO of Longer Vision Technology (Canada) Ltd.
Email: jiapei@...
Cell Number: +1 778-863-5816

Join osl-dev@lists.aswf.io to automatically receive all group messages.