New on linux: unable to make make[1]: *** [obj/release/cutil.cpp.o] Error 1, make: *** [lib/libcut

Hello,

I am shifting to Linux from windows after a long gap. I installed driver, CUDA SDK and Tool kit 2.3. nvcc is working fine but I am facing following errors when I make.
make[1]: *** [obj/release/cutil.cpp.o] Error 1
make: *** [lib/libcutil.so] Error 2

Can anyone tell me why I am getting these errors. The detail is given below.

Thanks in advance,

Heshsham

[root@Heshsham C]# pwd
/root/NVIDIA_GPU_Computing_SDK/C
[root@Heshsham C]# ls
bin common doc lib Makefile releaseNotesData ReleaseNotes.html src tools
[root@Heshsham C]# make
make[1]: Entering directory /root/NVIDIA_GPU_Computing_SDK/C/common' src/cutil.cpp:29:27: error: builtin_types.h: No such file or directory In file included from ./../common/inc/stopwatch.h:18, from src/cutil.cpp:34: ./../common/inc/stopwatch_base.h:56: warning: type qualifiers ignored on function return type ./../common/inc/stopwatch_base.h:60: warning: type qualifiers ignored on function return type In file included from ./../common/inc/stopwatch_base.h:72, from ./../common/inc/stopwatch.h:18, from src/cutil.cpp:34: ./../common/inc/stopwatch_base.inl:67: warning: type qualifiers ignored on function return type ./../common/inc/stopwatch_base.inl:78: warning: type qualifiers ignored on function return type In file included from ./../common/inc/stopwatch.h:25, from src/cutil.cpp:34: ./../common/inc/stopwatch_linux.h:46: warning: type qualifiers ignored on function return type ./../common/inc/stopwatch_linux.h:50: warning: type qualifiers ignored on function return type ./../common/inc/stopwatch_linux.h:126: warning: type qualifiers ignored on function return type ./../common/inc/stopwatch_linux.h:143: warning: type qualifiers ignored on function return type In file included from src/cutil.cpp:34: ./../common/inc/stopwatch.h:35: warning: type qualifiers ignored on function return type In file included from src/cutil.cpp:35: ./../common/inc/bank_checker.h:34: warning: type qualifiers ignored on function return type ./../common/inc/bank_checker.h:220: warning: type qualifiers ignored on function return type make[1]: *** [obj/release/cutil.cpp.o] Error 1 make[1]: Leaving directory /root/NVIDIA_GPU_Computing_SDK/C/common’
make: *** [lib/libcutil.so] Error 2


I will repeat what I posted earlier. You will need to edit NVIDIA_GPU_Computing_SDK/C/common/common.mk and change this:

CUDA_INSTALL_PATH ?= /opt/cuda

to point to where ever you have installed the cuda toolkit.

Thanks again Avidday… do I need to copy the above code exactly or do I need to make certain changes. Also the following details might be helpful here:

[root@Heshsham /]# locate nvcc

/usr/local/cuda/cuda/bin/nvcc

/usr/local/cuda/cuda/bin/nvcc.profile

/usr/local/cuda/cuda/doc/nvcc_2.3.pdf

/usr/local/cuda/cuda/man/man1/nvcc.1

/usr/local/cuda/doc/nvcc_2.2.pdf

/usr/local/cuda/doc/nvcc_2.3.pdf

/usr/local/cuda/man/man1/nvcc.1


[root@Heshsham /]# echo $PATH

/usr/kerberos/sbin:/usr/lib/qt-3.3/bin:/usr/kerberos/bin:/usr/lib/ccache:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:

/sbin:/opt/real/RealPlayer:/home/Abhishek/bin:/opt/real/RealPlayer:/opt/real/RealPlayer:

/usr/local/cuda/cuda/bin:/usr/local/cuda/bin

Change it to the path where you installed CUDA ie. /usr/local/cuda/cuda

yesterday i got the same error on ubuntu 9.10 with correct path included.

Then I installed 9.04 (as supported) and everything worked fine

I doubt is was the same error, although it might have looked similar. Ubuntu 9.10 ships with gcc-4.4, which is unsupported and the c++ compilers produces a number of errors when processing CUDA 2.3 include files.

Ubuntu 9.04 includes gcc-4.3 and, as you say, it is supported and works without incident. I am, however, willing to be that in both cases you installed the toolkit in the default place (ie. /usr/local/cuda) which is why your errors are not the same as this problem.

:wacko: Thanks again!! :rolleyes:

Shall I change it to /usr/local/cuda/cuda/bin or /usr/local/cuda/cuda? Actually I tried both ways and got the errors. I am providing errors in both cases. Also do I need to make such changes of path anywhere else in the common.mk or there is only one place where I need to make such changes? Also it is clear from the output that not all SDK codes are being compiled, although there are many sdk code in my case it is compiling only some of the examples.

===========

When the path is /usr/local/cuda/cuda/[b]bin

[root@Heshsham C]# ls

bin	 doc  Makefile		  ReleaseNotes.html  tools

common  lib  releaseNotesData  src

[root@Heshsham C]# make

make[1]: Entering directory `/root/NVIDIA_GPU_Computing_SDK/C/common'

make[1]: Leaving directory `/root/NVIDIA_GPU_Computing_SDK/C/common'

make[1]: Entering directory `/root/NVIDIA_GPU_Computing_SDK/C/common'

make[1]: Leaving directory `/root/NVIDIA_GPU_Computing_SDK/C/common'

make[1]: Entering directory `/root/NVIDIA_GPU_Computing_SDK/C/common'

make[1]: Leaving directory `/root/NVIDIA_GPU_Computing_SDK/C/common'

make -C src/convolutionTexture/ 

make[1]: Entering directory `/root/NVIDIA_GPU_Computing_SDK/C/src/convolutionTexture'

/usr/bin/ld: cannot find -lcudart

collect2: ld returned 1 exit status

make[1]: *** [../../bin/linux/release/convolutionTexture] Error 1

make[1]: Leaving directory `/root/NVIDIA_GPU_Computing_SDK/C/src/convolutionTexture'

[b]make: *** [src/convolutionTexture/Makefile.ph_build] Error 2

[/b]

[b]When the path is /usr/local/cuda/cuda

[/b]

[root@Heshsham C]# make

make[1]: Entering directory `/root/NVIDIA_GPU_Computing_SDK/C/common'

make[1]: Leaving directory `/root/NVIDIA_GPU_Computing_SDK/C/common'

make[1]: Entering directory `/root/NVIDIA_GPU_Computing_SDK/C/common'

make[1]: Leaving directory `/root/NVIDIA_GPU_Computing_SDK/C/common'

make[1]: Entering directory `/root/NVIDIA_GPU_Computing_SDK/C/common'

make[1]: Leaving directory `/root/NVIDIA_GPU_Computing_SDK/C/common'

make -C src/convolutionTexture/ 

make[1]: Entering directory `/root/NVIDIA_GPU_Computing_SDK/C/src/convolutionTexture'

make[1]: Leaving directory `/root/NVIDIA_GPU_Computing_SDK/C/src/convolutionTexture'

make -C src/lineOfSight/ 

make[1]: Entering directory `/root/NVIDIA_GPU_Computing_SDK/C/src/lineOfSight'

make[1]: Leaving directory `/root/NVIDIA_GPU_Computing_SDK/C/src/lineOfSight'

make -C src/simpleCUBLAS/ 

make[1]: Entering directory `/root/NVIDIA_GPU_Computing_SDK/C/src/simpleCUBLAS'

make[1]: Leaving directory `/root/NVIDIA_GPU_Computing_SDK/C/src/simpleCUBLAS'

make -C src/dct8x8/ 

make[1]: Entering directory `/root/NVIDIA_GPU_Computing_SDK/C/src/dct8x8'

make[1]: Leaving directory `/root/NVIDIA_GPU_Computing_SDK/C/src/dct8x8'

make -C src/recursiveGaussian/ 

make[1]: Entering directory `/root/NVIDIA_GPU_Computing_SDK/C/src/recursiveGaussian'

/usr/bin/ld: cannot find -lglut

collect2: ld returned 1 exit status

make[1]: *** [../../bin/linux/release/recursiveGaussian] Error 1

make[1]: Leaving directory `/root/NVIDIA_GPU_Computing_SDK/C/src/recursiveGaussian'

make: *** [src/recursiveGaussian/Makefile.ph_build] Error 2

Also the following information might be helpful in this regard:

[root@Heshsham release]# ls

convolutionTexture dct8x8 lineOfSight simpleCUBLAS

[root@Heshsham release]# ./dct8x8

[b]./dct8x8: error while loading shared libraries: libcudart.so.2: cannot open shared object file: No such file or directory

[/b][root@Heshsham release]# ./convolutionTexture

[b]./convolutionTexture: error while loading shared libraries: libcudart.so.2: cannot open shared object file: No such file or directory

[/b]

Avidday thanks for your help, I solved it!! I did not set teh path variables correctly.

Thanks again :)