compiling examples for cuda 2.3 on ubuntu 9.04

Hi there,
I’m trying to compile the examples that cames with sdk of cuda 2.3, but I got some errors.
Anyone knows why? I can see some bad include pointing to non-existing files…
Follows the make output.

best regards
Lorenzo

make[1]: Entering directory /home/strozzino/NVIDIA_GPU_Computing_SDK/C/common' In file included from src/bank_checker.cpp:15: ./../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 src/bank_checker.cpp:57: warning: type qualifiers ignored on function return type src/bank_checker.cpp:259: warning: type qualifiers ignored on function return type 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 src/cutil.cpp: In function ‘CUTBoolean<unnamed>::loadPPM(const char*, unsigned char**, unsigned int*, unsigned int*, unsigned int*)’: src/cutil.cpp:171: warning: ignoring return value of ‘char* fgets(char*, int, FILE*)’, declared with attribute warn_unused_result src/cutil.cpp:193: warning: ignoring return value of ‘char* fgets(char*, int, FILE*)’, declared with attribute warn_unused_result src/cutil.cpp:228: 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:18, from src/stopwatch.cpp:17: ./../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/stopwatch.cpp:17: ./../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/stopwatch.cpp:17: ./../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/stopwatch.cpp:17: ./../common/inc/stopwatch.h:35: warning: type qualifiers ignored on function return type src/stopwatch.cpp:71: warning: type qualifiers ignored on function return type In file included from src/stopwatch_linux.cpp:15: ./../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 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/strozzino/NVIDIA_GPU_Computing_SDK/C/common’
make[1]: Entering directory /home/strozzino/NVIDIA_GPU_Computing_SDK/C/common' make[1]: Leaving directory /home/strozzino/NVIDIA_GPU_Computing_SDK/C/common’
make[1]: Entering directory /home/strozzino/NVIDIA_GPU_Computing_SDK/C/common' In file included from ./../common/inc/rendercheck_gl.h:23, from src/rendercheck_gl.cpp:28: ./../common/inc/GL/glew.h:1123:20: error: GL/glu.h: No such file or directory In file included from ./../common/inc/rendercheck_gl.h:31, from src/rendercheck_gl.cpp:28: ./../common/inc/nvShaderUtils.h: In function ‘GLuint nv::CompileGLSLShaderFromFile(GLenum, const char*)’: ./../common/inc/nvShaderUtils.h:89: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result ./../common/inc/nvShaderUtils.h: In function ‘GLuint nv::CompileASMShaderFromFile(GLenum, const char*)’: ./../common/inc/nvShaderUtils.h:219: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result src/rendercheck_gl.cpp: At global scope: src/rendercheck_gl.cpp:54: warning: unused parameter ‘bQAReadback’ src/rendercheck_gl.cpp:54: warning: unused parameter ‘bUseFBO’ src/rendercheck_gl.cpp: In member function ‘virtual bool CheckRender::PGMvsPGM(const char*, const char*, float, float)’: src/rendercheck_gl.cpp:144: warning: too many arguments for format src/rendercheck_gl.cpp: In member function ‘virtual bool CheckRender::PPMvsPPM(const char*, const char*, float, float)’: src/rendercheck_gl.cpp:190: warning: too many arguments for format src/rendercheck_gl.cpp:183: warning: unused variable ‘src_data’ src/rendercheck_gl.cpp:183: warning: unused variable ‘ref_data’ src/rendercheck_gl.cpp: In member function ‘virtual bool CheckRender::compareBin2BinUint(const char*, const char*, unsigned int, float, float)’: src/rendercheck_gl.cpp:226: warning: too few arguments for format src/rendercheck_gl.cpp:228: warning: too many arguments for format src/rendercheck_gl.cpp:246: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result src/rendercheck_gl.cpp:247: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result src/rendercheck_gl.cpp: In member function ‘virtual bool CheckRender::compareBin2BinFloat(const char*, const char*, unsigned int, float, float)’: src/rendercheck_gl.cpp:288: warning: too few arguments for format src/rendercheck_gl.cpp:290: warning: too many arguments for format src/rendercheck_gl.cpp:308: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result src/rendercheck_gl.cpp:309: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result src/rendercheck_gl.cpp: In member function ‘virtual bool CheckBackBuffer::checkStatus(const char*, int, bool)’: src/rendercheck_gl.cpp:378: error: ‘gluErrorString’ was not declared in this scope src/rendercheck_gl.cpp: At global scope: src/rendercheck_gl.cpp:518: warning: unused parameter ‘Bpp’ src/rendercheck_gl.cpp:545: warning: unused parameter ‘width’ src/rendercheck_gl.cpp:545: warning: unused parameter ‘height’ src/rendercheck_gl.cpp:545: warning: unused parameter ‘Bpp’ src/rendercheck_gl.cpp:560: warning: unused parameter ‘width’ src/rendercheck_gl.cpp:560: warning: unused parameter ‘height’ src/rendercheck_gl.cpp:560: warning: unused parameter ‘Bpp’ src/rendercheck_gl.cpp:702: warning: unused parameter ‘width’ src/rendercheck_gl.cpp:702: warning: unused parameter ‘height’ make[1]: *** [obj/release/rendercheck_gl.cpp.o] Error 1 make[1]: Leaving directory /home/strozzino/NVIDIA_GPU_Computing_SDK/C/common’
make: *** [lib/librendercheckgl.so] Error 2

You need to install the glut library and headers.

Hi

I also have problems to compile the examples. I hope its ok when I post in the same thread.

My output:

make[1]: Betrete Verzeichnis '/home/spawn/NVIDIA_GPU_Computing_SDK/C/common'

make[1]: Verlasse Verzeichnis '/home/spawn/NVIDIA_GPU_Computing_SDK/C/common'

make[1]: Betrete Verzeichnis '/home/spawn/NVIDIA_GPU_Computing_SDK/C/common'

make[1]: Verlasse Verzeichnis '/home/spawn/NVIDIA_GPU_Computing_SDK/C/common'

make[1]: Betrete Verzeichnis '/home/spawn/NVIDIA_GPU_Computing_SDK/C/common'

make[1]: Verlasse Verzeichnis '/home/spawn/NVIDIA_GPU_Computing_SDK/C/common'

make -C src/simpleAtomicIntrinsics/ 

make[1]: Betrete Verzeichnis '/home/spawn/NVIDIA_GPU_Computing_SDK/C/src/simpleAtomicIntrinsics'

make[1]: Verlasse Verzeichnis '/home/spawn/NVIDIA_GPU_Computing_SDK/C/src/simpleAtomicIntrinsics'

make -C src/threadFenceReduction/ 

make[1]: Betrete Verzeichnis '/home/spawn/NVIDIA_GPU_Computing_SDK/C/src/threadFenceReduction'

make[1]: Verlasse Verzeichnis '/home/spawn/NVIDIA_GPU_Computing_SDK/C/src/threadFenceReduction'

make -C src/MonteCarloMultiGPU/ 

make[1]: Betrete Verzeichnis '/home/spawn/NVIDIA_GPU_Computing_SDK/C/src/MonteCarloMultiGPU'

make[1]: Verlasse Verzeichnis '/home/spawn/NVIDIA_GPU_Computing_SDK/C/src/MonteCarloMultiGPU'

make -C src/simplePitchLinearTexture/ 

make[1]: Betrete Verzeichnis '/home/spawn/NVIDIA_GPU_Computing_SDK/C/src/simplePitchLinearTexture'

make[1]: Verlasse Verzeichnis '/home/spawn/NVIDIA_GPU_Computing_SDK/C/src/simplePitchLinearTexture'

make -C src/transpose/ 

make[1]: Betrete Verzeichnis '/home/spawn/NVIDIA_GPU_Computing_SDK/C/src/transpose'

make[1]: Verlasse Verzeichnis '/home/spawn/NVIDIA_GPU_Computing_SDK/C/src/transpose'

make -C src/simpleTexture/ 

make[1]: Betrete Verzeichnis '/home/spawn/NVIDIA_GPU_Computing_SDK/C/src/simpleTexture'

make[1]: Verlasse Verzeichnis '/home/spawn/NVIDIA_GPU_Computing_SDK/C/src/simpleTexture'

make -C src/convolutionFFT2D/ 

make[1]: Betrete Verzeichnis '/home/spawn/NVIDIA_GPU_Computing_SDK/C/src/convolutionFFT2D'

make[1]: Verlasse Verzeichnis '/home/spawn/NVIDIA_GPU_Computing_SDK/C/src/convolutionFFT2D'

make -C src/scalarProd/ 

make[1]: Betrete Verzeichnis '/home/spawn/NVIDIA_GPU_Computing_SDK/C/src/scalarProd'

make[1]: Verlasse Verzeichnis '/home/spawn/NVIDIA_GPU_Computing_SDK/C/src/scalarProd'

make -C src/convolutionSeparable/ 

make[1]: Betrete Verzeichnis '/home/spawn/NVIDIA_GPU_Computing_SDK/C/src/convolutionSeparable'

make[1]: Verlasse Verzeichnis '/home/spawn/NVIDIA_GPU_Computing_SDK/C/src/convolutionSeparable'

make -C src/deviceQueryDrv/ 

make[1]: Betrete Verzeichnis '/home/spawn/NVIDIA_GPU_Computing_SDK/C/src/deviceQueryDrv'

obj/release/deviceQueryDrv.cpp.o: In function `main':

deviceQueryDrv.cpp:(.text+0x134): undefined reference to `cuDriverGetVersion'

collect2: ld gab 1 als Ende-Status zurück

make[1]: *** [../../bin/linux/release/deviceQueryDrv] Fehler 1

make[1]: Verlasse Verzeichnis '/home/spawn/NVIDIA_GPU_Computing_SDK/C/src/deviceQueryDrv'

make: *** [src/deviceQueryDrv/Makefile.ph_build] Fehler 2

Anyone a idea why “cuDriverGetVersion” can’t be found?

Hi avidday, I’ve installed all about glutg, freeglut and libglut, but I got another error.

Wich library is Xi?

I see in the log: /usr/bin/ld: cannot find -lXi

best regards

Lorenzo

[codebox]make[1]: Entering directory `/home/strozzino/NVIDIA_GPU_Computing_SDK/C/common’

In file included from src/bank_checker.cpp:15:

./…/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

src/bank_checker.cpp:57: warning: type qualifiers ignored on function return type

src/bank_checker.cpp:259: warning: type qualifiers ignored on function return type

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

src/cutil.cpp: In function ‘CUTBoolean::loadPPM(const char*, unsigned char**, unsigned int*, unsigned int*, unsigned int*)’:

src/cutil.cpp:171: warning: ignoring return value of ‘char* fgets(char*, int, FILE*)’, declared with attribute warn_unused_result

src/cutil.cpp:193: warning: ignoring return value of ‘char* fgets(char*, int, FILE*)’, declared with attribute warn_unused_result

src/cutil.cpp:228: 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:18,

             from src/stopwatch.cpp:17:

./…/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/stopwatch.cpp:17:

./…/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/stopwatch.cpp:17:

./…/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/stopwatch.cpp:17:

./…/common/inc/stopwatch.h:35: warning: type qualifiers ignored on function return type

src/stopwatch.cpp:71: warning: type qualifiers ignored on function return type

In file included from src/stopwatch_linux.cpp:15:

./…/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

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/strozzino/NVIDIA_GPU_Computing_SDK/C/common’

make[1]: Entering directory `/home/strozzino/NVIDIA_GPU_Computing_SDK/C/common’

make[1]: Leaving directory `/home/strozzino/NVIDIA_GPU_Computing_SDK/C/common’

make[1]: Entering directory `/home/strozzino/NVIDIA_GPU_Computing_SDK/C/common’

make[1]: Leaving directory `/home/strozzino/NVIDIA_GPU_Computing_SDK/C/common’

make -C src/simpleGL/

make[1]: Entering directory `/home/strozzino/NVIDIA_GPU_Computing_SDK/C/src/simpleGL’

In file included from …/…/common/inc/rendercheck_gl.h:31,

             from simpleGL.cpp:55:

…/…/common/inc/nvShaderUtils.h: In function ‘GLuint nv::CompileGLSLShaderFromFile(GLenum, const char*)’:

…/…/common/inc/nvShaderUtils.h:89: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result

…/…/common/inc/nvShaderUtils.h: In function ‘GLuint nv::CompileASMShaderFromFile(GLenum, const char*)’:

…/…/common/inc/nvShaderUtils.h:219: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result

simpleGL.cpp: In function ‘void runAutoTest()’:

simpleGL.cpp:349: warning: deprecated conversion from string constant to ‘char*’

/usr/bin/ld: cannot find -lXi

collect2: ld returned 1 exit status

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

make[1]: Leaving directory `/home/strozzino/NVIDIA_GPU_Computing_SDK/C/src/simpleGL’

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

No stop there.
I also need libxine and lixmu.

best regards
Lorenzo