3

I installed the cuba8.0 on ubuntu 16 by following the steps here.

Then execute the confirmation measurement. After that, I run the make and bump into erros like the following:

$make

...

nvcc warning : The 'compute_20', 'sm_20', and 'sm_21' architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning).
/usr/bin/ld: cannot find -lnvcuvid

collect2: error: ld returned 1 exit status

Makefile:381: recipe for target 'cudaDecodeGL' failed

make[1]: *** [cudaDecodeGL] Error 1

make[1]: Leaving directory '/home/cocadas/Workspace/NVIDIA_CUDA-8.0_Samples/3_Imaging/cudaDecodeGL'

Makefile:52: recipe for target '3_Imaging/cudaDecodeGL/Makefile.ph_build' failed
make: *** [3_Imaging/cudaDecodeGL/Makefile.ph_build] Error 2

Then, I checked the information of the system

Environment

$ printenv PATH
/usr/local/cuda-8.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/lib/jvm/java-8-oracle/bin:/usr/lib/jvm/java-8-oracle/db/bin:/usr/lib/jvm/java-8-oracle/jre/bin:/home/cocadas/Program/android-studio/bin

$ echo $LD_LIBRARY_PATH
/usr/local/cuda-8.0/lib64:/usr/local/cuda-8.0/lib64

OS

$ uname -m
x86_64

$ uname -r
4.4.0-64-generic

Others

$ lspci |grep -i nvidia
01:00.0 VGA compatible controller: NVIDIA Corporation GK107GLM [Quadro K1100M] (rev a1)

$ gcc --version

gcc (Ubuntu 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$ sudo apt-get install linux-headers-$(uname -r)
[sudo] password for cocadas: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
linux-headers-4.4.0-64-generic is already the newest version (4.4.0-64.85).
linux-headers-4.4.0-64-generic set to manually installed.
The following packages were automatically installed and are no longer required:
  linux-headers-4.4.0-53 linux-headers-4.4.0-53-generic linux-image-4.4.0-53-generic
  linux-image-extra-4.4.0-53-generic
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 99 not upgraded.
$ cat /proc/driver/nvidia/version
NVRM version: NVIDIA UNIX x86_64 Kernel Module  375.26  Thu Dec  8 18:36:43 PST 2016
GCC version:  gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.4) 

$ nvcc -V
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2016 NVIDIA Corporation
Built on Tue_Jan_10_13:22:03_CST_2017
Cuda compilation tools, release 8.0, V8.0.61

So, what else can I try?

4

The makefiles of the samples have wrong nvidia-xxx version numbers. Substitute them with: sed -i "s/nvidia-367/nvidia-375/g" `grep "nvidia-367" -r ./ -l` and try to make again.

  • Dhoulmagus, Thanks. I am reading through 'Makefile' under /NVIDIA_CUDA-8.0_Sample/ root folder. However, I don't find any line containing sed -i. Nor 'nvidia-xxx' in that file. Then I checked the makefile in /home/cocadas/Workspace/NVIDIA_CUDA-8.0_Samples/3_Imaging/cudaDecodeGL, there is a makefile but it doesn't have any lines like nvidia version too. Where do I miss? – Hong Mar 9 '17 at 14:52
0

I used method in this post: cuda-sample-build-error. I think you just need substitute the correct gpu driver version in UBUNTU_PKG_NAME = "nvidia-375", which you can find at

.../NVIDIA_CUDA-8.0_Samples/3_Imaging/cudaDecodeGL/findgllib.mk file

0

The root cause is the linker can't find libnvcuvid and driver version of make file shall be 375 (as shown in the post). Therefore, use the following command in the folder:

~/NVIDIA_CUDA-8.0_Samples/$find . -type f -execdir sed -i 's/UBUNTU_PKG_NAME = "nvidia-367"/UBUNTU_PKG_NAME = "nvidia-375"/g' '{}' \;
0

This may be specific to the 9.0 release, but it looks like the latest scripts query for which driver you have installed via dpkg. It looks like it's grepping the first one which is found, if you have multiple installed, which tends to be the older version.

I just had to uninstall some older drivers (which were no longer being used) via:

# NOTE: your driver versions may vary

sudo apt-get remove nvidia-367
sudo apt-get remove nvidia-375

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.