CUDA 7.0 Error compiling samples

I am trying to install CUDA 7.0 on Ubuntu 14.04. I followed the installation instructions as described here . In particular, I followed the steps in section 3.6 and chapter 6. When compiling the examples (section 6.2.2.2) with make I get the following error:

 make[1]: Entering directory `/usr/local/cuda-7.0/samples/3_Imaging/cudaDecodeGL' /usr/local/cuda-7.0/bin/nvcc -ccbin g++ -m64 -gencode arch=compute_20, code=compute_20 -o cudaDecodeGL FrameQueue.o ImageGL.o VideoDecoder.o VideoParser.o VideoSource.o cudaModuleMgr.o cudaProcessFrame.o videoDecodeGL.o -L../../common/lib/linux/x86_64 -L/usr/lib/"nvidia-346" -lGL -lGLU -lX11 -lXi -lXmu -lglut -lGLEW -lcuda -lcudart -lnvcuvid /usr/bin/ld: cannot find -lnvcuvid collect2: error: ld returned 1 exit status make[1]: *** [cudaDecodeGL] Error 1 make[1]: Leaving directory `/usr/local/cuda-7.0/samples/3_Imaging/cudaDecodeGL' make: *** [3_Imaging/cudaDecodeGL/Makefile.ph_build] Error 2 
+6
source share
4 answers

If you notice, there is -L / usr / lib / "nvidia-346". In my case, I installed nvidia-349. What worked for me is to change NVIDIA_CUDA-7.0_Samples / 3_Imaging / cudaDecodeGL / findgllib.mk and change UBUNTU_PKG_NAME = "nvidia-346" to nvidia-349.

+9
source

To install CUDA 7.0 correctly on Ubuntu 14.04, you will need the nvidia driver version 346 or higher.

If you use the .deb installation method, the nvidia graphics driver installs automatically.

If you used the installation method of the .run file and decided not to install the nvidia driver, you can manually install the driver after that through the package manager:

  sudo apt-add-repository ppa:xorg-edgers/ppa && sudo apt-get update sudo apt-get install nvidia-346 nvidia-346-dev nvidia-346-uvm libcuda1-346 nvidia-libopencl1-346 nvidia-icd-346 

In my case, I installed nvidia-352 afterwards due to an error in nvidia-346, and I came across the same error.

andoum approach for manually changing hardcoded UBUNTU_PKG_NAME = "nvidia-346" to UBUNTU_PKG_NAME = "nvidia-352" in NVIDIA_CUDA-7.0_Samples / 3_Imaging / cudaDecodeGL / findgllib.mk is great for me.

+2
source

I met the same problem and the solution is that the nvidia path is put in the system path:

 sudo gedit /etc/environment 

add this path on Wednesday

library_path = / USR / Lib / your_nvidia_edition: $ library_path

+2
source

Actually, I ran into this problem when I did make. I installed Cuda 8.0 under my Ubuntu 16.04. This issue baffled me for several weeks, and I almost tried to reinstall ubuntu for this after considering many suggestions via google, but finally I recently contacted it.

First of all, you must replace all UBUNTU_PKG_NAME = ## nvidia-3xx ## with one of the actually installed versions of the nvidia driver, as described above. Then you will probably get a compilation of the error after you make a new make. In my case, I have link errors like

 /usr/bin/ld: warning: libGLX.so.0, needed by /usr/lib/nvidia- 375/libGL.so, not found (try using -rpath or -rpath-link) /usr/bin/ld: warning: libGLdispatch.so.0, needed by /usr/lib/nvidia- 375/libGL.so, not found (try using -rpath or -rpath-link) .... 

or anything that contains missing link errors. Find the files you skip, for example

 $ locate libGLX.so. /usr/lib/nvidia-375/libGLX.so.0 /usr/lib32/nvidia-375/libGLX.so.0 $ locate libGLdispatch.so.0 /usr/lib/nvidia-375/libGLdispatch.so.0 /usr/lib32/nvidia-375/libGLdispatch.so.0 

There is probably an error related to the fact that compilation files cannot be found in the default cuda libraries, so you just need to copy the missing files to / usr / lib / nvidia-3xx / (the actual path in your case), and this should to work (it works in my case), if not, maybe you could try linking the new add-ons to the one you need using

 $ sudo ln -s (requested file) (requesting file). 

Hope this helps.

0
source

Source: https://habr.com/ru/post/988598/


All Articles