Nvidia Drive Software 10.0(Linux) : missing libcuda.so.1 and libnvcuvid.so.1

/usr/bin/ld: warning: libcuda.so.1, needed by /usr/local/driveworks-2.2/targets/x86_64-Linux/lib/libdriveworks.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libnvcuvid.so.1, needed by /usr/local/driveworks-2.2/targets/x86_64-Linux/lib/libdriveworks.so, not found (try using -rpath or -rpath-link)
/usr/local/driveworks-2.2/targets/x86_64-Linux/lib/libdriveworks.so: undefined reference to cuGetErrorName' /usr/local/driveworks-2.2/targets/x86_64-Linux/lib/libdriveworks.so: undefined reference to cuvidGetSourceVideoFormat’
/usr/local/driveworks-2.2/targets/x86_64-Linux/lib/libdriveworks.so: undefined reference to cuvidDestroyDecoder' /usr/local/driveworks-2.2/targets/x86_64-Linux/lib/libdriveworks.so: undefined reference to cuDeviceGet’
/usr/local/driveworks-2.2/targets/x86_64-Linux/lib/libdriveworks.so: undefined reference to cuvidUnmapVideoFrame64' /usr/local/driveworks-2.2/targets/x86_64-Linux/lib/libdriveworks.so: undefined reference to cuvidDestroyVideoParser’
/usr/local/driveworks-2.2/targets/x86_64-Linux/lib/libdriveworks.so: undefined reference to cuvidMapVideoFrame64' /usr/local/driveworks-2.2/targets/x86_64-Linux/lib/libdriveworks.so: undefined reference to cuvidCtxLockCreate’
/usr/local/driveworks-2.2/targets/x86_64-Linux/lib/libdriveworks.so: undefined reference to cuvidGetDecoderCaps' /usr/local/driveworks-2.2/targets/x86_64-Linux/lib/libdriveworks.so: undefined reference to cuvidParseVideoData’
/usr/local/driveworks-2.2/targets/x86_64-Linux/lib/libdriveworks.so: undefined reference to cuvidCreateVideoSource' /usr/local/driveworks-2.2/targets/x86_64-Linux/lib/libdriveworks.so: undefined reference to cuvidDecodePicture’
/usr/local/driveworks-2.2/targets/x86_64-Linux/lib/libdriveworks.so: undefined reference to cuvidCreateDecoder' /usr/local/driveworks-2.2/targets/x86_64-Linux/lib/libdriveworks.so: undefined reference to cuCtxGetCurrent’
/usr/local/driveworks-2.2/targets/x86_64-Linux/lib/libdriveworks.so: undefined reference to cuGetErrorString' /usr/local/driveworks-2.2/targets/x86_64-Linux/lib/libdriveworks.so: undefined reference to cuvidCtxLockDestroy’
/usr/local/driveworks-2.2/targets/x86_64-Linux/lib/libdriveworks.so: undefined reference to cuvidCreateVideoParser' /usr/local/driveworks-2.2/targets/x86_64-Linux/lib/libdriveworks.so: undefined reference to cuvidDestroyVideoSource’
/usr/local/driveworks-2.2/targets/x86_64-Linux/lib/libdriveworks.so: undefined reference to `cuInit’
collect2: error: ld returned 1 exit status
src/egomotion/CMakeFiles/sample_egomotion.dir/build.make:112: recipe for target ‘src/egomotion/sample_egomotion’ failed
NV_CUDA_HOST_COMP.log (54.4 KB)

Hi yongsheng.chen,

Can you provide some more information on what you are trying to do? It looks like you are trying to compile the driveworks sample on your host machine?

Did you fully install Drive SW 10 via SDK manager?

What steps did you do to try this compilation?

Thanks!

Hi yongsheng.chen,

If you’re building for host sytem, please refer to https://docs.nvidia.com/driveworks/dwx_samples_building_x86.html.

Thank you. The following is step to install sdk and build.

  1. install Ubuntu 18.0 release. It’s clear installation. The disk had been reformatted during installation.

  2. install sdk 10.4. there was no issue found during installation.

  3. build
    $mkdir dw_samples
    $mkdir nvidia/dw_samples
    $cd dw_samples/
    $ln -s /usr/local/driveworks/samples/cmake/ cmake
    $ln -s /usr/local/driveworks/samples/3rdparty/ 3rdparty
    $cp -r /usr/local/driveworks/samples/src/ .
    $cp /usr/local/driveworks/samples/CMakeLists.txt .
    $vi CMakeLists.txt
    $ls /usr/local/driveworks/data
    $set(DRIVEWORKS_DATAPATH “/usr/local/driveworks/data”)

$~/nvidia/dw_samples$ mkdir build-x86
$~/nvidia/dw_samples$ cd build-x86/
$~/nvidia/dw_samples/build-x86$ cmake -DCMAKE_BUILD_TYPE=Release …
$~/nvidia/dw_samples/build-x86$ make -j

The error info is showed:
/usr/bin/ld: warning: libcuda.so.1, needed by /usr/local/driveworks-2.2/targets/x86_64-Linux/lib/libdriveworks.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libnvcuvid.so.1, needed by /usr/local/driveworks-2.2/targets/x86_64-Linux/lib/libdriveworks.so, not found (try using -rpath or -rpath-link)
/usr/local/driveworks-2.2/targets/x86_64-Linux/lib/libdriveworks.so: undefined reference to cuGetErrorName' /usr/local/driveworks-2.2/targets/x86_64-Linux/lib/libdriveworks.so: undefined reference to cuvidGetSourceVideoFormat’
/usr/local/driveworks-2.2/targets/x86_64-Linux/lib/libdriveworks.so: undefined reference to `cuvidDestroyDecoder’

The ldd result of libdriveworks.so indicates the libcuda.so.1 and libnvcuvid.so.1 is missing.

~/nvidia/dw_samples/build-x86$ ldd /usr/local/driveworks-2.2/targets/x86_64-Linux/lib/libdriveworks.so
linux-vdso.so.1 (0x00007ffebc9dd000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f0db47c2000)
libusb-1.0.so.0 => /lib/x86_64-linux-gnu/libusb-1.0.so.0 (0x00007f0db45aa000)
libcudart.so.10.2 => /usr/local/cuda/lib64/libcudart.so.10.2 (0x00007f0db432e000)
libcuda.so.1 => not found
libnvcuvid.so.1 => not found

libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f0db412a000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f0db3f0b000)
libnvinfer.so.5 => /usr/local/driveworks-2.2/targets/x86_64-Linux/lib/…/lib/libnvinfer.so.5 (0x00007f0daae8a000)
libnvparsers.so.5 => /usr/local/driveworks-2.2/targets/x86_64-Linux/lib/…/lib/libnvparsers.so.5 (0x00007f0daa95d000)
libnvmedia.so => /usr/local/driveworks-2.2/targets/x86_64-Linux/lib/…/lib/libnvmedia.so (0x00007f0dc4c0d000)
libnvmedia_ipp.so => /usr/local/driveworks-2.2/targets/x86_64-Linux/lib/…/lib/libnvmedia_ipp.so (0x00007f0daa649000)
libnvmedia_acp.so => /usr/local/driveworks-2.2/targets/x86_64-Linux/lib/…/lib/libnvmedia_acp.so (0x00007f0dc4c00000)
libnv_extimgdev.so => /usr/local/driveworks-2.2/targets/x86_64-Linux/lib/…/lib/libnv_extimgdev.so (0x00007f0dc4bd9000)
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f0daa42c000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f0daa0a3000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f0da9d05000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f0da9aed000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f0da96fc000)
/lib64/ld-linux-x86-64.so.2 (0x00007f0dc4a2a000)
libudev.so.1 => /lib/x86_64-linux-gnu/libudev.so.1 (0x00007f0da94de000)
libcudnn.so.7 => /usr/local/driveworks-2.2/targets/x86_64-Linux/lib/…/lib/libcudnn.so.7 (0x00007f0d91924000)
libcublas.so.10 => /usr/lib/x86_64-linux-gnu/libcublas.so.10 (0x00007f0d8dbbf000)
libnvos.so => /usr/local/driveworks-2.2/targets/x86_64-Linux/lib/…/lib/libnvos.so (0x00007f0dc4bcb000)
libnvrm_sim.so => /usr/local/driveworks-2.2/targets/x86_64-Linux/lib/…/lib/libnvrm_sim.so (0x00007f0dc4b51000)
libnvtvmr.so => /usr/local/driveworks-2.2/targets/x86_64-Linux/lib/…/lib/libnvtvmr.so (0x00007f0dc4b48000)
libnvmedia_isc.so => /usr/local/driveworks-2.2/targets/x86_64-Linux/lib/…/lib/libnvmedia_isc.so (0x00007f0dc4b43000)
libcublasLt.so.10 => /usr/lib/x86_64-linux-gnu/libcublasLt.so.10 (0x00007f0d8ba7f000)

Dear yongsheng.chen,
It seems you have not installed NVIDIA drivers on host. Please install nvidia drivers. Also, make sure you have minimum PASCAL based GPU on host to run DW samples.

Thank you!
How to install Nvidia driver?
From the website : NVIDIA DRIVE Downloads | NVIDIA Developer, it only shows "install through Nvidia SDK manager ".

Dear yongsheng.chen,
You can install via GUI or command line. Please check https://www.linuxbabe.com/ubuntu/install-nvidia-driver-ubuntu-18-04

Could you also provide ~/.nvsdkm/logs/DRIVE_Software_10.0_Linux_OS/NV_CUDA_HOST_COMP.log for my investigation? Thanks!

I attached the this log file in the first poster.

After installed Nvidia driver, the build is passed. Thank you very much!

Could you please add this “install Nvidia driver as build dependency” in your website? I guess someone may meet same issue later. Thanks a lot.

The following is step to install Nvidia driver.

a) sudo lshw -c display or sudo lshw -c video
b) sudo ubuntu-drivers devices
c) sudo ubuntu-drivers autoinstall
or
d) sudo apt install nvidia-driver-version-number
for example: sudo apt install nvidia-driver-430
f)sudo shutdown -r now
g) sudo lshw -c display
or
h) prime-select query (check which card is being used now with this command)
#prime-select query
nvidia

1 Like