Problems when compiling NVIDIA_GPU_Computing_SDK on Ubuntu 12.04

A laptop Aspire 5755G

processor :Intel® Core™ i7-2670QM CPU @ 2.20GHz × 8
Memory 3,8gb
operating system type 32-bit
graphics card: NVIDIA GeForce GT 540M
OS: Ubuntu 12.04
The version of the NVIDIA driver: 325.08

Downloading and installing the package:
Download and compile the package

Compile-time error occurs:

make[2]: Вход в каталог /home/recoba/NVIDIA_GPU_Computing_SDK/CUDALibraries/src/imageSegmentationNPP' g++ -fPIC -I. -I../../common/UtilNPP/ -I../../../shared/inc/ -I/usr/local/cuda/include/ -L../../common/lib/ -lnpp -L/usr/local/cuda/lib/ -L/usr/local/cuda/lib/ -lcudart -L../../common/FreeImage/lib/linux -o imageSegmentationNPP imageSegmentationNPP.cpp -lUtilNPP_i386 -lfreeimage32 imageSegmentationNPP.cpp: In function ‘int main(int, char**)’: imageSegmentationNPP.cpp:287: warning: too few arguments for format imageSegmentationNPP.cpp:405: error: cannot convert ‘Npp8u*’ to ‘NppiGraphcutState*’ for argument ‘11’ to ‘NppStatus nppiGraphcut_32s8u(Npp32s*, Npp32s*, Npp32s*, Npp32s*, Npp32s*, int, int, NppiSize, Npp8u*, int, NppiGraphcutState*)’ make[2]: *** [all] Ошибка 1 make[2]: Выход из каталога /home/recoba/NVIDIA_GPU_Computing_SDK/CUDALibraries/src/imageSegmentationNPP’
make[1]: *** [src/imageSegmentationNPP/Makefile.ph_build] Ошибка 2
make[1]: Выход из каталога `/home/recoba/NVIDIA_GPU_Computing_SDK/CUDALibraries’
make: *** [all] Ошибка 2

How to fix this error. Thanks in advance

The first clue is that you are trying to compile the 4.0.17 samples with the cuda 5.0.35 toolkit… I wouldn’t try that. Compile the samples that come with the CUDA 5 toolkit, and see if the issue goes away. Since CUDA 5.0, those samples are included in the toolkit itself. If it doesn’t work still, you might need to install GCC version 4.4 or 4.5 and use update-alternatives to select the older version as default.

To make it easier, I’d just install the CUDA 5.5 release candidate version (since it’s supported on the Ubuntu version you’re running). You probably won’t have to deal with installing/setting up an older GCC version to get it to compile the included samples and that version might get rid of bugs that might still be affecting earlier releases that you could run into.

nvidia-settings -v
     nvidia-settings:  version 304.88  (buildd@komainu)  Tue Apr  9 12:17:43 UTC 2013
  The NVIDIA X Server Settings tool.
gcc --version
gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3
nvcc -V
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2012 NVIDIA Corporation
Built on Thu_May__9_18:36:15_PDT_2013
Cuda compilation tools, release 5.5, V5.5.0
cat /proc/driver/nvidia/version
NVRM version: NVIDIA UNIX x86 Kernel Module  304.88  Wed Mar 27 14:31:12 PDT 2013
GCC version:  gcc версия 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5)
cd ~/NVIDIA_CUDA-5.5_Samples
sudo make
make[1]: Вход в каталог `/home/recoba/NVIDIA_CUDA-5.5_Samples/6_Advanced/ptxjit'
"/usr/local/cuda-5.5"/bin/nvcc -ccbin g++   -m32        -o ptxjit ptxjit.o  -L/usr/lib/nvidia-current -lcuda
g++: No such file or directory
make[1]: *** [ptxjit] Ошибка 1
make[1]: Выход из каталога `/home/recoba/NVIDIA_CUDA-5.5_Samples/6_Advanced/ptxjit'
make: *** [6_Advanced/ptxjit/Makefile.ph_build] Ошибка 2

Seems like either g++ is not installed, or it’s missing from your path. Try:

sudo apt-get install build-essential

If it is installed and still doesn’t work, you need to add g++ to your search path. See for example (old but relevant):

Went cardinal measures:
1)Reset G++ and GCC
2)Reinstalled the NVIDIA driver c 304.88 on 319.37
3)Established instead of cuda package of cuda-repo-ubuntu1204_5.5-0_i386.deb

And the miracle) Everything compiled without problems) Thanks everyone for the help