Error compiling example jpegNPP

Hi,

I installed 5.5 on Ubuntu 12.04 with a GeForce GTX 670.

After the installation I tried to compile the examples with ‘make’, which works w/o problem till jpegNPP where it stops with an error.

jpegNPP.cpp:689:5: error: cannot convert ‘Npp8u** {aka unsigned char**}’ to ‘NppiEncodeHuffmanSpec**’ for argument ‘10’ to ‘NppStatus nppiEncodeHuffmanScan_JPEG_8u16s_P3R(Npp16s**, Npp32s*, Npp32s, Npp32s, Npp32s, Npp32s, Npp32s, Npp8u*, Npp32s*, NppiEncodeHuffmanSpec**, NppiEncodeHuffmanSpec**, NppiSize*, Npp8u*)’

What could be the source of the error? It looks like a type error in the source code, but that seems unrealistic given

Here the full error message:

make[1]: Entering directory `/home/me/cuda5.5/NVIDIA_CUDA-5.5_Samples/7_CUDALibraries/jpegNPP'
/usr/local/cuda-5.5/bin/nvcc -ccbin g++ -I../../common/inc -I../common/UtilNPP -I../common/FreeImage/include  -m64     -o jpegNPP.o -c jpegNPP.cpp
jpegNPP.cpp: In function ‘int main(int, char**)’:
jpegNPP.cpp:568:13: error: cannot convert ‘Npp8u** {aka unsigned char**}’ to ‘NppiDecodeHuffmanSpec**’ for argument ‘10’ to ‘NppStatus nppiDecodeHuffmanScanHost_JPEG_8u16s_P3R(const Npp8u*, Npp32s, Npp32s, Npp32s, Npp32s, Npp32s, Npp32s, Npp16s**, Npp32s*, NppiDecodeHuffmanSpec**, NppiDecodeHuffmanSpec**, NppiSize*)’
jpegNPP.cpp:689:5: error: cannot convert ‘Npp8u** {aka unsigned char**}’ to ‘NppiEncodeHuffmanSpec**’ for argument ‘10’ to ‘NppStatus nppiEncodeHuffmanScan_JPEG_8u16s_P3R(Npp16s**, Npp32s*, Npp32s, Npp32s, Npp32s, Npp32s, Npp32s, Npp8u*, Npp32s*, NppiEncodeHuffmanSpec**, NppiEncodeHuffmanSpec**, NppiSize*, Npp8u*)’
make[1]: *** [jpegNPP.o] Error 1
make[1]: Leaving directory `/home/me/cuda5.5/NVIDIA_CUDA-5.5_Samples/7_CUDALibraries/jpegNPP'
make: *** [7_CUDALibraries/jpegNPP/Makefile.ph_build] Error 2

I made make skip jpegNPP by renaming the Makefile in the jpegNPP folder and now he finished with all the other examples without error.

Are you running CUDA 5.5 production?

Can you please paste your system information here?

uname -a
gcc --version
/usr/local/cuda-5.5/bin/nvcc -V

I installed cuda 5.5 via cuda-repo-ubuntu1204_5.5-0_amd64.deb. Using this tutorial:
http://www.r-tutor.com/gpu-computing/cuda-installation/cuda5.5-ubuntu

Here are the system information:

me@serv8:~/cuda5.5$ uname -a
Linux iupr-serv8 3.2.0-48-generic #74-Ubuntu SMP Thu Jun 6 19:43:26 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
me@serv8:~/cuda5.5$ gcc --version
gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3
Copyright (C) 2011 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.
me@serv8:~/cuda5.5$ /usr/local/cuda-5.5/bin/nvcc -V
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2013 NVIDIA Corporation
Built on Wed_Jul_17_18:36:13_PDT_2013
Cuda compilation tools, release 5.5, V5.5.0

Unfortunately, I can’t repro your problem on my Ubuntu 12.04 system. My steps listed below.

/usr/bin/nvidia-uninstall
cd /tmp; wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1204/x86_64/cuda-repo-ubuntu1204_5.5-0_amd64.deb
sudo dpkg -i cuda-repo-ubuntu1204_5.5-0_amd64.deb
sudo apt-get update
sudo apt-get install cuda
/usr/local/cuda-5.5/bin/cuda-install-samples-5.5.sh ~
cd ~/NVIDIA_CUDA-5.5_Samples/7_CUDALibraries/jpegNPP
make

Could you please try command below?
g++ -c -x c++ -D__NVCC__ -I"…/…/common/inc" -I"…/common/UtilNPP" -I"…/common/FreeImage/include" “-I/usr/local/cuda-5.5/bin/…/targets/x86_64-linux/include” -m64 -o “jpegNPP.o” “jpegNPP.cpp” -v

:/ I don’t know, what changed, but now it works…

Thanks ryluo!