LINUX Newbie Unable to make

[b]Hello,

I am new on linux and i am trying to install cuda. I haveinstalled the driver, the SDK and the toolkit. I am trying to compile the sample programs but i am unable to do it. when i type the make instruction i get the following error:[/b]

[i][i]make[1]: Entering directory /home/Carlos/NVIDIA_CUDA_SDK/common' mkdir: cannot create directory obj’: Permission denied
make[1]: *** [makedirectories] Error 1
make[1]: Leaving directory `/home/Carlos/NVIDIA_CUDA_SDK/common’
make: *** [lib/libcutil.so] Error 2

when i try the same instruction as a superuser i get the following error:

make[1]: Entering directory /home/Carlos/NVIDIA_CUDA_SDK/common' make[1]: g++: Command not found make[1]: *** [obj/release/bank_checker.cpp.o] Error 127 make[1]: Leaving directory /home/Carlos/NVIDIA_CUDA_SDK/common’
make: *** [lib/libcutil.so] Error 2

[b]Can anyone tell me what am i doing wrong? what does this errors mean?

thank you in advance (whoever answers),

carlos.[/b]

My guess is the first set of errors arise because you either installed the SDK as root, or you have tried building it as root, and as a result you have no write permissions. If you use run a recursive chown as root on the SDK main directory it should go away.

The second set of errors suggest you don’t have a C++ compiler installed. So check you whether you do or not, and install it if required.

Hello again,

First of all thank you for your time. You were right, i had not installed C++, but i have now. When i try compile the programs with the make instruction i now get another set of errors:

make[1]: Entering directory /home/Carlos/NVIDIA_CUDA_SDK/common' In file included from src/bank_checker.cpp:33: ./../common/inc/bank_checker.h:52: warning: type qualifiers ignored on function return type ./../common/inc/bank_checker.h:238: warning: type qualifiers ignored on function return type src/bank_checker.cpp:75: warning: type qualifiers ignored on function return type src/bank_checker.cpp:277: warning: type qualifiers ignored on function return type In file included from ./../common/inc/stopwatch.h:36, from src/cutil.cpp:52: ./../common/inc/stopwatch_base.h:74: warning: type qualifiers ignored on function return type ./../common/inc/stopwatch_base.h:78: warning: type qualifiers ignored on function return type In file included from ./../common/inc/stopwatch_base.h:90, from ./../common/inc/stopwatch.h:36, from src/cutil.cpp:52: ./../common/inc/stopwatch_base.inl:85: warning: type qualifiers ignored on function return type ./../common/inc/stopwatch_base.inl:96: warning: type qualifiers ignored on function return type In file included from ./../common/inc/stopwatch.h:43, from src/cutil.cpp:52: ./../common/inc/stopwatch_linux.h:64: warning: type qualifiers ignored on function return type ./../common/inc/stopwatch_linux.h:68: warning: type qualifiers ignored on function return type ./../common/inc/stopwatch_linux.h:144: warning: type qualifiers ignored on function return type ./../common/inc/stopwatch_linux.h:161: warning: type qualifiers ignored on function return type In file included from src/cutil.cpp:52: ./../common/inc/stopwatch.h:53: warning: type qualifiers ignored on function return type In file included from src/cutil.cpp:53: ./../common/inc/bank_checker.h:52: warning: type qualifiers ignored on function return type ./../common/inc/bank_checker.h:238: warning: type qualifiers ignored on function return type src/cutil.cpp: In function ‘CUTBoolean<unnamed>::loadPPM(const char*, unsigned char**, unsigned int*, unsigned int*, unsigned int*)’: src/cutil.cpp:189: warning: ignoring return value of ‘char* fgets(char*, int, FILE*)’, declared with attribute warn_unused_result src/cutil.cpp:211: warning: ignoring return value of ‘char* fgets(char*, int, FILE*)’, declared with attribute warn_unused_result src/cutil.cpp:246: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result In file included from ./../common/inc/stopwatch.h:36, from src/stopwatch.cpp:35: ./../common/inc/stopwatch_base.h:74: warning: type qualifiers ignored on function return type ./../common/inc/stopwatch_base.h:78: warning: type qualifiers ignored on function return type In file included from ./../common/inc/stopwatch_base.h:90, from ./../common/inc/stopwatch.h:36, from src/stopwatch.cpp:35: ./../common/inc/stopwatch_base.inl:85: warning: type qualifiers ignored on function return type ./../common/inc/stopwatch_base.inl:96: warning: type qualifiers ignored on function return type In file included from ./../common/inc/stopwatch.h:43, from src/stopwatch.cpp:35: ./../common/inc/stopwatch_linux.h:64: warning: type qualifiers ignored on function return type ./../common/inc/stopwatch_linux.h:68: warning: type qualifiers ignored on function return type ./../common/inc/stopwatch_linux.h:144: warning: type qualifiers ignored on function return type ./../common/inc/stopwatch_linux.h:161: warning: type qualifiers ignored on function return type In file included from src/stopwatch.cpp:35: ./../common/inc/stopwatch.h:53: warning: type qualifiers ignored on function return type src/stopwatch.cpp:89: warning: type qualifiers ignored on function return type In file included from src/stopwatch_linux.cpp:33: ./../common/inc/stopwatch_linux.h:64: warning: type qualifiers ignored on function return type ./../common/inc/stopwatch_linux.h:68: warning: type qualifiers ignored on function return type ./../common/inc/stopwatch_linux.h:144: warning: type qualifiers ignored on function return type ./../common/inc/stopwatch_linux.h:161: warning: type qualifiers ignored on function return type a - obj/release/bank_checker.cpp.o a - obj/release/cmd_arg_reader.cpp.o a - obj/release/cutil.cpp.o a - obj/release/stopwatch.cpp.o a - obj/release/stopwatch_linux.cpp.o a - obj/release/multithreading.cpp.o make[1]: Leaving directory /home/Carlos/NVIDIA_CUDA_SDK/common’
make[1]: Entering directory /home/Carlos/NVIDIA_CUDA_SDK/common' In file included from ./../common/inc/paramgl.h:13, from src/paramgl.cpp:8: ./../common/inc/GL/glut.h:60:20: error: GL/glu.h: No such file or directory make[1]: *** [obj/release/paramgl.cpp.o] Error 1 make[1]: Leaving directory /home/Carlos/NVIDIA_CUDA_SDK/common’
make: *** [lib/libparamgl.so] Error 2

do you have any ideas on how to sole these problems?

thank you very much again and i hope you can help.
carlos.

I am going to guess that you are using a Linux distribution with gcc-4.4. CUDA is currently incompatible with gcc-4.4. You will have to install an earlier version of gcc (probably 4.3), and make some modifications to the compile statements in the SDK makefiles to get it to work.

Hello

avidday, thank you very much for sharing your knowledge. i did have the gcc 4.4, but now i have installed version 4.3 as you sugested. as you may guess i got some more errors, now my screen says this:

make[1]: Entering directory /home/Carlos/NVIDIA_CUDA_SDK/common' make[1]: Leaving directory /home/Carlos/NVIDIA_CUDA_SDK/common’
make[1]: Entering directory /home/Carlos/NVIDIA_CUDA_SDK/common' In file included from ./../common/inc/paramgl.h:13, from src/paramgl.cpp:8: ./../common/inc/GL/glut.h:60:20: error: GL/glu.h: No such file or directory make[1]: *** [obj/release/paramgl.cpp.o] Error 1 make[1]: Leaving directory /home/Carlos/NVIDIA_CUDA_SDK/common’
make: *** [lib/libparamgl.so] Error 2

does that tell you anything? what should i do? i am freaking out!

haha thanks again, i apreciate you help.
carlos.

you need to install glut and the glut development files for those OpenGL based examples.

Note to somebody at NVIDIA. These same questions come up over, and over and over again. An SDK FAQ sticky would save everyone a lot of effort…

Hi again,

Thank you for your effort avidday, i am sure it is anoying to answer always the same questions, but you have no idea what it is like to see those errors and not to have any idea on what to do to fix them. anyway, i have installed glut and the glut development files. after the make instruction i get the following message:

make[1]: Entering directory `/home/Carlos/NVIDIA_CUDA_SDK/common’

make[1]: Leaving directory `/home/Carlos/NVIDIA_CUDA_SDK/common’

make[1]: Entering directory `/home/Carlos/NVIDIA_CUDA_SDK/common’

make[1]: Leaving directory `/home/Carlos/NVIDIA_CUDA_SDK/common’

make[1]: Entering directory `/home/Carlos/NVIDIA_CUDA_SDK/common’

make[1]: Leaving directory `/home/Carlos/NVIDIA_CUDA_SDK/common’

make -C projects/radixSort/

make[1]: Entering directory `/home/Carlos/NVIDIA_CUDA_SDK/projects/radixSort’

make[1]: Leaving directory `/home/Carlos/NVIDIA_CUDA_SDK/projects/radixSort’

make -C projects/simpleTexture3D/

make[1]: Entering directory `/home/Carlos/NVIDIA_CUDA_SDK/projects/simpleTexture3D’

/usr/bin/ld: cannot find -lXmu

collect2: ld returned 1 exit status

make[1]: *** […/…/bin/linux/release/simpleTexture3D] Error 1

make[1]: Leaving directory `/home/Carlos/NVIDIA_CUDA_SDK/projects/simpleTexture3D’

make: *** [projects/simpleTexture3D/Makefile.ph_build] Error 2

this time it has created the path: NVIDIA_CUDA_SDK/bin/linux/release nevertheless it did not create any deviceQuery file. once again i don’t know what the errors mean or how to fix them. thank you again for your time and effort, sincerly,

carlos.

Install libxmu (X11 miscellaneous utilities library).

hello again!

i was unable to work last week. but i have installex the X11 library libxmu an i still get the following message when i try to make:

make[1]: Entering directory /home/Carlos/NVIDIA_CUDA_SDK/common' make[1]: Leaving directory /home/Carlos/NVIDIA_CUDA_SDK/common’
make[1]: Entering directory /home/Carlos/NVIDIA_CUDA_SDK/common' make[1]: Leaving directory /home/Carlos/NVIDIA_CUDA_SDK/common’
make[1]: Entering directory /home/Carlos/NVIDIA_CUDA_SDK/common' make[1]: Leaving directory /home/Carlos/NVIDIA_CUDA_SDK/common’
make -C projects/radixSort/
make[1]: Entering directory /home/Carlos/NVIDIA_CUDA_SDK/projects/radixSort' make[1]: Leaving directory /home/Carlos/NVIDIA_CUDA_SDK/projects/radixSort’
make -C projects/simpleTexture3D/
make[1]: Entering directory /home/Carlos/NVIDIA_CUDA_SDK/projects/simpleTexture3D' [b]/usr/bin/ld: cannot find -lXmu[/b] collect2: ld returned 1 exit status make[1]: *** [../../bin/linux/release/simpleTexture3D] Error 1 make[1]: Leaving directory /home/Carlos/NVIDIA_CUDA_SDK/projects/simpleTexture3D’
make: *** [projects/simpleTexture3D/Makefile.ph_build] Error 2

i don’t know why, any ideas? please help!

Are you sure Xmu is installed?

Oh Yeah!

i double checked that the library was installed and it was. after reading a little bit more on the forum i found that i had to downgrade both the g++ and the gcc to version 4.1. after doing this i could finally make!

thank you very much for your help, i really apreciate it.
carlos.