How to install OptiX-SDK-6.5.0 on ubuntu 18.04

Hello, everyone.

I try to install OptiX-SDK on ubuntu 18.04.
In the install process, some errors, shown below, occurred.
please, help me.

[my pc component]

  • Intel® Core™ i7-6700K CPU @ 4.00GHz × 8
  • RAM 32GB
  • GeForce GTX 1060 6GB/PCIe/SSE2
  • OS : Ubuntu 18.04.3 LTS

( ^q^) < norepo )
kuwano@kuwano-pc: ~/Downloads/NVIDIA-OptiX-SDK-6.5.0-linux64/SDK

nvidia-smi
Sun Dec 1 16:11:25 2019
±----------------------------------------------------------------------------+
| NVIDIA-SMI 435.21 Driver Version: 435.21 CUDA Version: 10.1 |
|-------------------------------±---------------------±---------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|===============================+======================+======================|
| 0 GeForce GTX 106… Off | 00000000:01:00.0 On | N/A |
| 0% 47C P0 31W / 180W | 645MiB / 6075MiB | 4% Default |
±------------------------------±---------------------±---------------------+

±----------------------------------------------------------------------------+
| Processes: GPU Memory |
| GPU PID Type Process name Usage |
|=============================================================================|
| 0 1065 G /usr/lib/xorg/Xorg 199MiB |
| 0 1235 G /usr/bin/gnome-shell 142MiB |
| 0 4811 G …quest-channel-token=9948491898371769716 216MiB |
| 0 8832 G gzserver 4MiB |
| 0 8833 G gzclient 79MiB |
±----------------------------------------------------------------------------+

( ^q^) < norepo )
kuwano@kuwano-pc: ~/Downloads/NVIDIA-OptiX-SDK-6.5.0-linux64/SDK

nvcc -V
nvcc: NVIDIA ® Cuda compiler driver
Copyright © 2005-2017 NVIDIA Corporation
Built on Fri_Nov__3_21:07:56_CDT_2017
Cuda compilation tools, release 9.1, V9.1.85

( ^q^) < norepo )
kuwano@kuwano-pc: ~/Downloads/NVIDIA-OptiX-SDK-6.5.0-linux64/SDK

mkdir build

( ^q^) < norepo )
kuwano@kuwano-pc: ~/Downloads/NVIDIA-OptiX-SDK-6.5.0-linux64/SDK

cd build/

( ^q^) < norepo )
kuwano@kuwano-pc: ~/Downloads/NVIDIA-OptiX-SDK-6.5.0-linux64/SDK/build

cmake … -DCMAKE_C_COMPILER=/usr/bin/gcc-6
– The C compiler identification is GNU 6.5.0
– The CXX compiler identification is GNU 8.3.0
– Check for working C compiler: /usr/bin/gcc-6
– Check for working C compiler: /usr/bin/gcc-6 – works
– Detecting C compiler ABI info
– Detecting C compiler ABI info - done
– Detecting C compile features
– Detecting C compile features - done
– Check for working CXX compiler: /usr/bin/c++
– Check for working CXX compiler: /usr/bin/c++ – works
– Detecting CXX compiler ABI info
– Detecting CXX compiler ABI info - done
– Detecting CXX compile features
– Detecting CXX compile features - done
– Performing Test OPTIX_CXX_ACCEPTS_NO_UNUSED_RESULT
– Performing Test OPTIX_CXX_ACCEPTS_NO_UNUSED_RESULT - Success
– Performing Test SSE_41_AVAILABLE
– Performing Test SSE_41_AVAILABLE - Success
– Looking for pthread.h
– Looking for pthread.h - found
– Looking for pthread_create
– Looking for pthread_create - not found
– Looking for pthread_create in pthreads
– Looking for pthread_create in pthreads - not found
– Looking for pthread_create in pthread
– Looking for pthread_create in pthread - found
– Found Threads: TRUE
– Found CUDA: /usr (found suitable version “9.1”, minimum required is “5.0”)
– Found OpenGL: /usr/lib/x86_64-linux-gnu/libOpenGL.so
– Found GLUT: /usr/lib/x86_64-linux-gnu/libglut.so
– Configuring done
– Generating done
– Build files have been written to: /home/kuwano/Downloads/NVIDIA-OptiX-SDK-6.5.0-linux64/SDK/build

( ^q^) < norepo )
kuwano@kuwano-pc: ~/Downloads/NVIDIA-OptiX-SDK-6.5.0-linux64/SDK/build

make -j4
Scanning dependencies of target sutil_sdk
[ 3%] Building CXX object sutil/CMakeFiles/sutil_sdk.dir/HDRLoader.cpp.o
[ 3%] Building CXX object sutil/CMakeFiles/sutil_sdk.dir/Arcball.cpp.o
[ 3%] Building C object sutil/CMakeFiles/sutil_sdk.dir/rply-1.01/rply.c.o
[ 4%] Building CXX object sutil/CMakeFiles/sutil_sdk.dir/Mesh.cpp.o
[ 5%] Building CXX object sutil/CMakeFiles/sutil_sdk.dir/OptiXMesh.cpp.o
[ 6%] Building CXX object sutil/CMakeFiles/sutil_sdk.dir/PPMLoader.cpp.o
[ 7%] Building CXX object sutil/CMakeFiles/sutil_sdk.dir/sutil.cpp.o
[ 8%] Building CXX object sutil/CMakeFiles/sutil_sdk.dir/tinyobjloader/tiny_obj_loader.cc.o
[ 10%] Building C object sutil/CMakeFiles/sutil_sdk.dir/glew.c.o
[ 11%] Linking CXX shared library …/lib/libsutil_sdk.so
[ 11%] Built target sutil_sdk
Scanning dependencies of target optixCallablePrograms
Scanning dependencies of target optixBuffersOfBuffers
Scanning dependencies of target optixCompressedTexture
Scanning dependencies of target optixConsole
[ 13%] Building CXX object optixBuffersOfBuffers/CMakeFiles/optixBuffersOfBuffers.dir/optixBuffersOfBuffers.cpp.o
[ 13%] Building CXX object optixCallablePrograms/CMakeFiles/optixCallablePrograms.dir/optixCallablePrograms.cpp.o
[ 14%] Building CXX object optixCompressedTexture/CMakeFiles/optixCompressedTexture.dir/optixCompressedTexture.cpp.o
[ 15%] Building CXX object optixConsole/CMakeFiles/optixConsole.dir/optixConsole.cpp.o
[ 16%] Linking CXX executable …/bin/optixCompressedTexture
[ 16%] Built target optixCompressedTexture
Scanning dependencies of target optixDemandLoadBuffer
[ 17%] Building CXX object optixDemandLoadBuffer/CMakeFiles/optixDemandLoadBuffer.dir/optixDemandLoadBuffer.cpp.o
[ 18%] Linking CXX executable …/bin/optixCallablePrograms
[ 18%] Built target optixCallablePrograms
Scanning dependencies of target optixDemandLoadTexture
[ 20%] Linking CXX executable …/bin/optixConsole
[ 21%] Building CXX object optixDemandLoadTexture/CMakeFiles/optixDemandLoadTexture.dir/optixDemandLoadTexture.cpp.o
[ 22%] Linking CXX executable …/bin/optixBuffersOfBuffers
[ 22%] Built target optixConsole
Scanning dependencies of target optixDenoiser
[ 23%] Building CXX object optixDenoiser/CMakeFiles/optixDenoiser.dir/optixDenoiser.cpp.o
[ 23%] Built target optixBuffersOfBuffers
Scanning dependencies of target optixDeviceQuery
[ 24%] Building CXX object optixDeviceQuery/CMakeFiles/optixDeviceQuery.dir/optixDeviceQuery.cpp.o
[ 25%] Linking CXX executable …/bin/optixDeviceQuery
[ 25%] Built target optixDeviceQuery
Scanning dependencies of target optixDynamicGeometry
[ 26%] Building CXX object optixDynamicGeometry/CMakeFiles/optixDynamicGeometry.dir/optixDynamicGeometry.cpp.o
[ 27%] Linking CXX executable …/bin/optixDemandLoadBuffer
[ 27%] Built target optixDemandLoadBuffer
Scanning dependencies of target optixGeometryTriangles
[ 28%] Building CXX object optixGeometryTriangles/CMakeFiles/optixGeometryTriangles.dir/optixGeometryTriangles.cpp.o
[ 30%] Linking CXX executable …/bin/optixDemandLoadTexture
[ 30%] Built target optixDemandLoadTexture
Scanning dependencies of target optixHello
[ 31%] Building CXX object optixHello/CMakeFiles/optixHello.dir/optixHello.cpp.o
[ 32%] Linking CXX executable …/bin/optixDenoiser
[ 33%] Linking CXX executable …/bin/optixHello
[ 33%] Built target optixDenoiser
[ 33%] Built target optixHello
Scanning dependencies of target optixInstancing
Scanning dependencies of target optixMDLDisplacement
[ 34%] Building CXX object optixInstancing/CMakeFiles/optixInstancing.dir/optixInstancing.cpp.o
[ 35%] Building CXX object optixMDLDisplacement/CMakeFiles/optixMDLDisplacement.dir/optixMDLDisplacement.cpp.o
[ 36%] Linking CXX executable …/bin/optixDynamicGeometry
[ 36%] Built target optixDynamicGeometry
Scanning dependencies of target optixMDLExpressions
[ 37%] Linking CXX executable …/bin/optixGeometryTriangles
[ 38%] Building CXX object optixMDLExpressions/CMakeFiles/optixMDLExpressions.dir/optixMDLExpressions.cpp.o
[ 38%] Built target optixGeometryTriangles
Scanning dependencies of target optixMDLSphere
[ 40%] Building CXX object optixMDLSphere/CMakeFiles/optixMDLSphere.dir/optixMDLSphere.cpp.o
[ 41%] Linking CXX executable …/bin/optixInstancing
[ 41%] Built target optixInstancing
Scanning dependencies of target optixMeshViewer
[ 42%] Building CXX object optixMeshViewer/CMakeFiles/optixMeshViewer.dir/optixMeshViewer.cpp.o
[ 43%] Linking CXX executable …/bin/optixMDLDisplacement
[ 43%] Built target optixMDLDisplacement
Scanning dependencies of target optixMotionBlur
[ 44%] Building CXX object optixMotionBlur/CMakeFiles/optixMotionBlur.dir/optixMotionBlur.cpp.o
[ 45%] Linking CXX executable …/bin/optixMDLExpressions
[ 46%] Linking CXX executable …/bin/optixMDLSphere
[ 46%] Built target optixMDLExpressions
Scanning dependencies of target optixParticles
[ 47%] Building CXX object optixParticles/CMakeFiles/optixParticles.dir/optixParticles.cpp.o
[ 47%] Built target optixMDLSphere
Scanning dependencies of target optixPathTracer
[ 48%] Building CXX object optixPathTracer/CMakeFiles/optixPathTracer.dir/optixPathTracer.cpp.o
[ 50%] Linking CXX executable …/bin/optixMeshViewer
[ 50%] Built target optixMeshViewer
Scanning dependencies of target optixPathTracerTiled
[ 51%] Building CXX object optixPathTracerTiled/CMakeFiles/optixPathTracerTiled.dir/optixPathTracerTiled.cpp.o
/home/kuwano/Downloads/NVIDIA-OptiX-SDK-6.5.0-linux64/SDK/optixPathTracerTiled/optixPathTracerTiled.cpp: In function ‘void setupCudaInterop()’:
/home/kuwano/Downloads/NVIDIA-OptiX-SDK-6.5.0-linux64/SDK/optixPathTracerTiled/optixPathTracerTiled.cpp:150:17: error: ‘cudaSetDevice’ was not declared in this scope
if( cudaSetDevice( devices[i] ) != 0 )
^~~~~~~~~~~~~
/home/kuwano/Downloads/NVIDIA-OptiX-SDK-6.5.0-linux64/SDK/optixPathTracerTiled/optixPathTracerTiled.cpp:150:17: note: suggested alternative: ‘cudaCpuDeviceId’
if( cudaSetDevice( devices[i] ) != 0 )
^~~~~~~~~~~~~
cudaCpuDeviceId
/home/kuwano/Downloads/NVIDIA-OptiX-SDK-6.5.0-linux64/SDK/optixPathTracerTiled/optixPathTracerTiled.cpp:155:17: error: ‘cudaMalloc’ was not declared in this scope
if( cudaMalloc( &ptr, worker_count*4 ) != 0 )
^~~~~~~~~~
/home/kuwano/Downloads/NVIDIA-OptiX-SDK-6.5.0-linux64/SDK/optixPathTracerTiled/optixPathTracerTiled.cpp:155:17: note: suggested alternative: ‘calloc’
if( cudaMalloc( &ptr, worker_count*4 ) != 0 )
^~~~~~~~~~
calloc
/home/kuwano/Downloads/NVIDIA-OptiX-SDK-6.5.0-linux64/SDK/optixPathTracerTiled/optixPathTracerTiled.cpp:171:13: error: ‘cudaFreeHost’ was not declared in this scope
cudaFreeHost( hostTileIndexBuffer );
^~~~~~~~~~~~
/home/kuwano/Downloads/NVIDIA-OptiX-SDK-6.5.0-linux64/SDK/optixPathTracerTiled/optixPathTracerTiled.cpp:173:13: error: ‘cudaHostAlloc’ was not declared in this scope
if( cudaHostAlloc( (void**)&hostTileIndexBuffer, hostTileIndexBufferSize, cudaHostAllocPortable ) != 0 )
^~~~~~~~~~~~~
/home/kuwano/Downloads/NVIDIA-OptiX-SDK-6.5.0-linux64/SDK/optixPathTracerTiled/optixPathTracerTiled.cpp:173:13: note: suggested alternative: ‘cudaHostAllocMapped’
if( cudaHostAlloc( (void**)&hostTileIndexBuffer, hostTileIndexBufferSize, cudaHostAllocPortable ) != 0 )
^~~~~~~~~~~~~
cudaHostAllocMapped
/home/kuwano/Downloads/NVIDIA-OptiX-SDK-6.5.0-linux64/SDK/optixPathTracerTiled/optixPathTracerTiled.cpp: In member function ‘void WorkManager::setup()’:
/home/kuwano/Downloads/NVIDIA-OptiX-SDK-6.5.0-linux64/SDK/optixPathTracerTiled/optixPathTracerTiled.cpp:230:17: error: ‘cudaSetDevice’ was not declared in this scope
if( cudaSetDevice( devices[worker.m_launchDeviceIndex] ) != 0 )
^~~~~~~~~~~~~
/home/kuwano/Downloads/NVIDIA-OptiX-SDK-6.5.0-linux64/SDK/optixPathTracerTiled/optixPathTracerTiled.cpp:230:17: note: suggested alternative: ‘cudaCpuDeviceId’
if( cudaSetDevice( devices[worker.m_launchDeviceIndex] ) != 0 )
^~~~~~~~~~~~~
cudaCpuDeviceId
/home/kuwano/Downloads/NVIDIA-OptiX-SDK-6.5.0-linux64/SDK/optixPathTracerTiled/optixPathTracerTiled.cpp:232:13: error: ‘cudaStreamCreate’ was not declared in this scope
cudaStreamCreate( &worker.m_syncStream );
^~~~~~~~~~~~~~~~
/home/kuwano/Downloads/NVIDIA-OptiX-SDK-6.5.0-linux64/SDK/optixPathTracerTiled/optixPathTracerTiled.cpp:232:13: note: suggested alternative: ‘cudaStreamLegacy’
cudaStreamCreate( &worker.m_syncStream );
^~~~~~~~~~~~~~~~
cudaStreamLegacy
/home/kuwano/Downloads/NVIDIA-OptiX-SDK-6.5.0-linux64/SDK/optixPathTracerTiled/optixPathTracerTiled.cpp: In member function ‘void WorkManager::render()’:
/home/kuwano/Downloads/NVIDIA-OptiX-SDK-6.5.0-linux64/SDK/optixPathTracerTiled/optixPathTracerTiled.cpp:250:21: error: ‘cudaSetDevice’ was not declared in this scope
if( cudaSetDevice( devices[worker.m_launchDeviceIndex] ) != 0 )
^~~~~~~~~~~~~
/home/kuwano/Downloads/NVIDIA-OptiX-SDK-6.5.0-linux64/SDK/optixPathTracerTiled/optixPathTracerTiled.cpp:250:21: note: suggested alternative: ‘cudaCpuDeviceId’
if( cudaSetDevice( devices[worker.m_launchDeviceIndex] ) != 0 )
^~~~~~~~~~~~~
cudaCpuDeviceId
/home/kuwano/Downloads/NVIDIA-OptiX-SDK-6.5.0-linux64/SDK/optixPathTracerTiled/optixPathTracerTiled.cpp:256:13: error: ‘cudaMemcpyAsync’ was not declared in this scope
cudaMemcpyAsync( tile_index_devptr, hostTileIndexBuffer + tile_index, 4, cudaMemcpyHostToDevice, worker.m_syncStream );
^~~~~~~~~~~~~~~
/home/kuwano/Downloads/NVIDIA-OptiX-SDK-6.5.0-linux64/SDK/optixPathTracerTiled/optixPathTracerTiled.cpp: In member function ‘void WorkManager::shutdown()’:
/home/kuwano/Downloads/NVIDIA-OptiX-SDK-6.5.0-linux64/SDK/optixPathTracerTiled/optixPathTracerTiled.cpp:279:13: error: ‘cudaStreamDestroy’ was not declared in this scope
cudaStreamDestroy( worker.m_syncStream );
^~~~~~~~~~~~~~~~~
/home/kuwano/Downloads/NVIDIA-OptiX-SDK-6.5.0-linux64/SDK/optixPathTracerTiled/optixPathTracerTiled.cpp:279:13: note: suggested alternative: ‘cudaStreamDefault’
cudaStreamDestroy( worker.m_syncStream );
^~~~~~~~~~~~~~~~~
cudaStreamDefault
/home/kuwano/Downloads/NVIDIA-OptiX-SDK-6.5.0-linux64/SDK/optixPathTracerTiled/optixPathTracerTiled.cpp: In function ‘void destroyContext()’:
/home/kuwano/Downloads/NVIDIA-OptiX-SDK-6.5.0-linux64/SDK/optixPathTracerTiled/optixPathTracerTiled.cpp:311:13: error: ‘cudaFree’ was not declared in this scope
cudaFree( *iter );
^~~~~~~~
/home/kuwano/Downloads/NVIDIA-OptiX-SDK-6.5.0-linux64/SDK/optixPathTracerTiled/optixPathTracerTiled.cpp:312:9: error: ‘cudaFreeHost’ was not declared in this scope
cudaFreeHost( hostTileIndexBuffer );
^~~~~~~~~~~~
optixPathTracerTiled/CMakeFiles/optixPathTracerTiled.dir/build.make:62: recipe for target ‘optixPathTracerTiled/CMakeFiles/optixPathTracerTiled.dir/optixPathTracerTiled.cpp.o’ failed
make[2]: *** [optixPathTracerTiled/CMakeFiles/optixPathTracerTiled.dir/optixPathTracerTiled.cpp.o] Error 1
CMakeFiles/Makefile2:1130: recipe for target ‘optixPathTracerTiled/CMakeFiles/optixPathTracerTiled.dir/all’ failed
make[1]: *** [optixPathTracerTiled/CMakeFiles/optixPathTracerTiled.dir/all] Error 2
make[1]: *** 未完了のジョブを待っています…
[ 52%] Linking CXX executable …/bin/optixMotionBlur
[ 53%] Linking CXX executable …/bin/optixPathTracer
[ 53%] Built target optixMotionBlur
[ 53%] Built target optixPathTracer
[ 54%] Linking CXX executable …/bin/optixParticles
[ 54%] Built target optixParticles
Makefile:83: recipe for target ‘all’ failed
make: *** [all] Error 2

Do you have a non-standard cuda install somehow? It looks like the cuda headers are found but many common cuda runtime symbols are missing.

Thank you for your replying.

I’ve installed cuda by the way shown below.
Is this way wrong?

And, how can I check if the correct cuda is installed?


sudo apt update && sudo apt upgrade -y sudo ubuntu-drivers autoinstall
sudo reboot sudo apt install nvidia-cuda-toolkit -y

Keith_Morley, thank you for your help.

This problem has solved by reinstall cuda drivers.

Thank you.