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.


Brecht Van Lommel
 

I think you hit this issue in clang: https://reviews.llvm.org/D89752

Also note nvidia-smi shows the CUDA driver API version, it's not the CUDA toolkit version. But both seem to be 11.4 in this case.


On Tue, Aug 24, 2021 at 10:11 PM Pei JIA <jiapei@...> wrote:


There is ONLY one version of cuda, from what I can see ....


➜  local pwd
/usr/local
➜  local ll
total 328K
drwxr-xr-x   2 root root 4.0K Jun  9 21:34 assets
drwxr-xr-x   4 root root  36K Aug 23 19:39 bin
-rw-r--r--   1 root root 6.0K Jun  8 20:14 CHANGES
lrwxrwxrwx   1 root root   21 Aug  5 23:00 cuda -> /usr/local/cuda-11.4/
drwxr-xr-x  20 root root 4.0K Aug 23 15:41 cuda-11.4
drwxr-xr-x   2 root root 4.0K Jun  5 12:30 Doc
drwxr-xr-x   3 root root 4.0K Jun  9 21:34 doc
drwxr-xr-x   3 root root 4.0K Jun  9 06:42 docs
drwxr-xr-x   6 root root 4.0K Jun 10 14:48 etc
drwxr-xr-x   5 root root 4.0K Jul 29 19:30 Ext
drwxr-xr-x   2 root root 4.0K Jul 31  2020 games
drwxr-xr-x   9 root root 4.0K Jun  8 20:17 if
drwxr-xr-x 145 root root  12K Aug 23 19:39 include
-rw-r--r--   1 root root  337 Jun  8 20:14 INSTALL
drwxr-xr-x  28 root root 148K Aug 23 19:39 lib
drwxr-xr-x   3 root root 4.0K Jul 13 13:45 lib32
drwxr-xr-x   3 root root 4.0K Jul 13 13:45 lib64
drwxr-xr-x   3 root root 4.0K Aug 23 15:09 libdata
drwxr-xr-x   3 root root 4.0K Aug 23 15:15 libexec
drwxr-xr-x   4 root root 4.0K Jun  5 12:30 library
-rw-r--r--   1 root root 5.4K May  2 04:59 License_ReadMe.txt
drwxr-xr-x   2 root root 4.0K Jun  5 12:30 licenses
drwxr-xr-x   3 root root 4.0K Jun  5 12:30 log
drwxr-xr-x   4 root root 4.0K Jul 25 00:21 magma
lrwxrwxrwx   1 root root    9 Nov  9  2020 man -> share/man
drwxr-xr-x  31 root root 4.0K Jul 29 19:30 Mod
-rw-r--r--   1 root root 5.0K Jun  8 20:14 README
drwxr-xr-x   2 root root 4.0K Jul 31  2020 sbin
drwxr-xr-x   2 root root 4.0K Jun  9 21:34 scripts
drwxr-xr-x 109 root root 4.0K Aug 23 19:39 share
drwxr-xr-x   2 root root 4.0K Jul 31  2020 src
drwxr-xr-x   3 root root 4.0K Jul 19 13:49 var
drwxr-xr-x   3 root root 4.0K Jun  5 12:30 xml
➜  local





On 2021-08-23 10:51 p.m., Larry Gritz wrote:
You say you have Cuda 11.4, but the error message says:

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. 

Maybe you have multiple cuda versions installed?

I think that when you first configure the cmake build, you can use -DCUDA_TOOLKIT_ROOT_DIR=... to point it at a particular Cuda install.
 

On Aug 23, 2021, at 10:28 PM, Pei JIA <jiapei@...> wrote:


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

--
Larry Gritz




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


Pei JIA
 


There is ONLY one version of cuda, from what I can see ....


➜  local pwd
/usr/local
➜  local ll
total 328K
drwxr-xr-x   2 root root 4.0K Jun  9 21:34 assets
drwxr-xr-x   4 root root  36K Aug 23 19:39 bin
-rw-r--r--   1 root root 6.0K Jun  8 20:14 CHANGES
lrwxrwxrwx   1 root root   21 Aug  5 23:00 cuda -> /usr/local/cuda-11.4/
drwxr-xr-x  20 root root 4.0K Aug 23 15:41 cuda-11.4
drwxr-xr-x   2 root root 4.0K Jun  5 12:30 Doc
drwxr-xr-x   3 root root 4.0K Jun  9 21:34 doc
drwxr-xr-x   3 root root 4.0K Jun  9 06:42 docs
drwxr-xr-x   6 root root 4.0K Jun 10 14:48 etc
drwxr-xr-x   5 root root 4.0K Jul 29 19:30 Ext
drwxr-xr-x   2 root root 4.0K Jul 31  2020 games
drwxr-xr-x   9 root root 4.0K Jun  8 20:17 if
drwxr-xr-x 145 root root  12K Aug 23 19:39 include
-rw-r--r--   1 root root  337 Jun  8 20:14 INSTALL
drwxr-xr-x  28 root root 148K Aug 23 19:39 lib
drwxr-xr-x   3 root root 4.0K Jul 13 13:45 lib32
drwxr-xr-x   3 root root 4.0K Jul 13 13:45 lib64
drwxr-xr-x   3 root root 4.0K Aug 23 15:09 libdata
drwxr-xr-x   3 root root 4.0K Aug 23 15:15 libexec
drwxr-xr-x   4 root root 4.0K Jun  5 12:30 library
-rw-r--r--   1 root root 5.4K May  2 04:59 License_ReadMe.txt
drwxr-xr-x   2 root root 4.0K Jun  5 12:30 licenses
drwxr-xr-x   3 root root 4.0K Jun  5 12:30 log
drwxr-xr-x   4 root root 4.0K Jul 25 00:21 magma
lrwxrwxrwx   1 root root    9 Nov  9  2020 man -> share/man
drwxr-xr-x  31 root root 4.0K Jul 29 19:30 Mod
-rw-r--r--   1 root root 5.0K Jun  8 20:14 README
drwxr-xr-x   2 root root 4.0K Jul 31  2020 sbin
drwxr-xr-x   2 root root 4.0K Jun  9 21:34 scripts
drwxr-xr-x 109 root root 4.0K Aug 23 19:39 share
drwxr-xr-x   2 root root 4.0K Jul 31  2020 src
drwxr-xr-x   3 root root 4.0K Jul 19 13:49 var
drwxr-xr-x   3 root root 4.0K Jun  5 12:30 xml
➜  local





On 2021-08-23 10:51 p.m., Larry Gritz wrote:
You say you have Cuda 11.4, but the error message says:

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. 

Maybe you have multiple cuda versions installed?

I think that when you first configure the cmake build, you can use -DCUDA_TOOLKIT_ROOT_DIR=... to point it at a particular Cuda install.
 

On Aug 23, 2021, at 10:28 PM, Pei JIA <jiapei@...> wrote:


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

--
Larry Gritz




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


Larry Gritz
 

I think all that shows is that the first "nvidia-smi" in your PATH is the one that is from Cuda 11.4, so it's showing you what it knows. I doubt that nvidia-smi comprehensively searches your entire system for all possible Cuda installs.

So I don't think we can conclude from this alone that there is not a second install (and in particular, maybe a second set of header files left over from an old version?) that's making our cmake scripts confused. Did you look in /usr/local/cuda, as the error message indicated? What is there?


On Aug 24, 2021, at 10:57 AM, Pei Jia <jiapei@...> wrote:


Nope... I have ONLY Cuda 11.4 installed. Here is the result of **nvidia-smi**.


➜  ~ nvidia-smi
Tue Aug 24 10:57:12 2021      
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 470.63.01    Driver Version: 470.63.01    CUDA Version: 11.4     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  NVIDIA GeForce ...  Off  | 00000000:21:00.0  On |                  N/A |
|  0%   43C    P5    35W / 300W |    753MiB / 11016MiB |     26%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+
                                                                              
+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|    0   N/A  N/A      1696      G   /usr/lib/xorg/Xorg                102MiB |
|    0   N/A  N/A      2717      G   /usr/lib/xorg/Xorg                378MiB |
|    0   N/A  N/A      2849      G   /usr/bin/gnome-shell               69MiB |
|    0   N/A  N/A     12356      G   ...AAAAAAAAA= --shared-files       88MiB |
|    0   N/A  N/A     25420      G   obs                                40MiB |
|    0   N/A  N/A    916198      G   ...AAAAAAAAA= --shared-files       24MiB |
|    0   N/A  N/A   2152246      G   /proc/self/exe                      9MiB |
+-----------------------------------------------------------------------------+



On 2021-08-23 10:51 p.m., Larry Gritz wrote:
You say you have Cuda 11.4, but the error message says:

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. 

Maybe you have multiple cuda versions installed?

I think that when you first configure the cmake build, you can use -DCUDA_TOOLKIT_ROOT_DIR=... to point it at a particular Cuda install.
 

On Aug 23, 2021, at 10:28 PM, Pei JIA <jiapei@...> wrote:


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

--
Larry Gritz




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

--
Larry Gritz





Pei JIA
 


Nope... I have ONLY Cuda 11.4 installed. Here is the result of **nvidia-smi**.


➜  ~ nvidia-smi
Tue Aug 24 10:57:12 2021      
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 470.63.01    Driver Version: 470.63.01    CUDA Version: 11.4     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  NVIDIA GeForce ...  Off  | 00000000:21:00.0  On |                  N/A |
|  0%   43C    P5    35W / 300W |    753MiB / 11016MiB |     26%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+
                                                                              
+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|    0   N/A  N/A      1696      G   /usr/lib/xorg/Xorg                102MiB |
|    0   N/A  N/A      2717      G   /usr/lib/xorg/Xorg                378MiB |
|    0   N/A  N/A      2849      G   /usr/bin/gnome-shell               69MiB |
|    0   N/A  N/A     12356      G   ...AAAAAAAAA= --shared-files       88MiB |
|    0   N/A  N/A     25420      G   obs                                40MiB |
|    0   N/A  N/A    916198      G   ...AAAAAAAAA= --shared-files       24MiB |
|    0   N/A  N/A   2152246      G   /proc/self/exe                      9MiB |
+-----------------------------------------------------------------------------+



On 2021-08-23 10:51 p.m., Larry Gritz wrote:
You say you have Cuda 11.4, but the error message says:

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. 

Maybe you have multiple cuda versions installed?

I think that when you first configure the cmake build, you can use -DCUDA_TOOLKIT_ROOT_DIR=... to point it at a particular Cuda install.
 

On Aug 23, 2021, at 10:28 PM, Pei JIA <jiapei@...> wrote:


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

--
Larry Gritz




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


Larry Gritz
 

You say you have Cuda 11.4, but the error message says:

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. 

Maybe you have multiple cuda versions installed?

I think that when you first configure the cmake build, you can use -DCUDA_TOOLKIT_ROOT_DIR=... to point it at a particular Cuda install.
 

On Aug 23, 2021, at 10:28 PM, Pei JIA <jiapei@...> wrote:


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

--
Larry Gritz





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