Hi!
Recently I have installed Ubuntu 20.04.4 LTS
as a subsystem on Windows 10
machine to work with OptiX API
. I did:
-
updated my graphics driver first
-
installed the latest CUDA and set the directory to my PATH from the tutorial
- echo “PATH=$PATH:/usr/local/cuda-11.6” >> ~/.bashrc
- echo “LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/cuda-11.6/targets/x86_64-linux/lib” >> ~/.bashrc
- source ~/.bashrc
-
set environment variable
OptiX_INSTALL_DIR
In addition, the system has:
gcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0
g++ (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0
However (I guess here is the problem) ,
- The
nvidia--smi
shows:NVIDIA-SMI 510.47.03 Driver Version: 510.47.03 CUDA Version: 11.6
- But the
nvcc --version
showing:Cuda compilation tools, release 10.1, V10.1.243
So, while I was trying to BUILD the optix7course, it is returning me this error (below), same error occurs for BUILD default OptiX
examples:
In file included from /usr/include/cuda_runtime.h:83,
from <command-line>:
/usr/include/crt/host_config.h:138:2: error: #error -- unsupported GNU version! gcc versions later than 8 are not supported!
138 | #error -- unsupported GNU version! gcc versions later than 8 are not supported!
| ^~~~~
CMake Error at cuda_compile_ptx_1_generated_devicePrograms.cu.ptx.Release.cmake:212 (message):
Error generating
/home/bmohanto/Downloads/optix7course/build/example02_pipelineAndRayGen/cuda_compile_ptx_1_generated_devicePrograms.cu.ptx
make[2]: *** [example02_pipelineAndRayGen/CMakeFiles/ex02_pipelineAndRayGen.dir/build.make:69: example02_pipelineAndRayGen/cuda_compile_ptx_1_generated_devicePrograms.cu.ptx] Error 1
make[1]: *** [CMakeFiles/Makefile2:445: example02_pipelineAndRayGen/CMakeFiles/ex02_pipelineAndRayGen.dir/all] Error 2
I would sincerely appreciate if someone had similar problem and suggest me a solution.