I have some problem when I try to compile the CUDA SDK codes:
marco@core-i7:~/NVIDIA_GPU_Computing_SDK/C$ make
make[1]: ingresso nella directory «/home/marco/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]: uscita dalla directory «/home/marco/NVIDIA_GPU_Computing_SDK/C/common»
make[1]: ingresso nella directory «/home/marco/NVIDIA_GPU_Computing_SDK/C/common»
In file included from ./../common/inc/paramgl.h:24,
from src/paramgl.cpp:19:
./../common/inc/GL/glut.h:64:1: warning: "APIENTRY" redefined
In file included from ./../common/inc/GL/glut.h:59,
from ./../common/inc/paramgl.h:24,
from src/paramgl.cpp:19:
/usr/include/GL/gl.h:111:1: warning: this is the location of the previous definition
a - obj/release/paramgl.cpp.o
a - obj/release/param.cpp.o
make[1]: uscita dalla directory «/home/marco/NVIDIA_GPU_Computing_SDK/C/common»
make[1]: ingresso nella directory «/home/marco/NVIDIA_GPU_Computing_SDK/C/common»
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
In file included from ./../common/inc/rendercheck_gl.h:31,
from src/rendercheck_gl.cpp:28:
./../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:53: warning: unused parameter ‘bQAReadback’
src/rendercheck_gl.cpp:53: 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: At global scope:
src/rendercheck_gl.cpp:517: warning: unused parameter ‘Bpp’
src/rendercheck_gl.cpp:543: warning: unused parameter ‘width’
src/rendercheck_gl.cpp:543: warning: unused parameter ‘height’
src/rendercheck_gl.cpp:543: warning: unused parameter ‘Bpp’
src/rendercheck_gl.cpp:558: warning: unused parameter ‘width’
src/rendercheck_gl.cpp:558: warning: unused parameter ‘height’
src/rendercheck_gl.cpp:558: warning: unused parameter ‘Bpp’
src/rendercheck_gl.cpp:702: warning: unused parameter ‘width’
src/rendercheck_gl.cpp:702: warning: unused parameter ‘height’
a - obj/release/rendercheck_gl.cpp.o
make[1]: uscita dalla directory «/home/marco/NVIDIA_GPU_Computing_SDK/C/common»
make -C src/fluidsGL/
make[1]: ingresso nella directory «/home/marco/NVIDIA_GPU_Computing_SDK/C/src/fluidsGL»
/usr/include/string.h:43: error: inline function ‘void* memcpy(void*, const void*, size_t)’ cannot be declared weak
/usr/include/string.h:64: error: inline function ‘void* memset(void*, int, size_t)’ cannot be declared weak
/usr/include/bits/string3.h:49: error: inline function ‘void* memcpy(void*, const void*, size_t)’ cannot be declared weak
/usr/include/bits/string3.h:78: error: inline function ‘void* memset(void*, int, size_t)’ cannot be declared weak
/usr/local/cuda/bin/../include/common_functions.h:59: error: inline function ‘void* memset(void*, int, size_t)’ cannot be declared weak
/usr/local/cuda/bin/../include/common_functions.h:62: error: inline function ‘void* memcpy(void*, const void*, size_t)’ cannot be declared weak
/usr/local/cuda/bin/../include/math_functions.h:412: error: inline function ‘int __signbit(double)’ cannot be declared weak
/usr/local/cuda/bin/../include/math_functions.h:417: error: inline function ‘int __signbitf(float)’ cannot be declared weak
/usr/include/bits/mathcalls.h:350: error: inline function ‘int __signbit(double)’ cannot be declared weak
/usr/include/bits/mathcalls.h:350: error: inline function ‘int __signbitf(float)’ cannot be declared weak
/usr/include/bits/mathcalls.h:350: error: inline function ‘int __signbitl(long double)’ cannot be declared weak
/usr/include/bits/mathinline.h:36: error: inline function ‘int __signbitf(float)’ cannot be declared weak
/usr/include/bits/mathinline.h:42: error: inline function ‘int __signbit(double)’ cannot be declared weak
/usr/include/bits/mathinline.h:48: error: inline function ‘int __signbitl(long double)’ cannot be declared weak
/usr/local/cuda/bin/../include/math_functions.h:442: error: inline function ‘int __signbitl(long double)’ cannot be declared weak
make[1]: *** [obj/release/fluidsGL.cu.o] Errore 255
make[1]: uscita dalla directory «/home/marco/NVIDIA_GPU_Computing_SDK/C/src/fluidsGL»
make: *** [src/fluidsGL/Makefile.ph_build] Errore 2
System Info:
S.O.: Ubuntu 9.10 64 bit
GCC Version: 4.4.1
NVIDIA Driver Version: 190.53
CUDA Toolkit Version: 2.3
Environment Variables (in file ~.bashrc):
export PATH=/usr/local/cuda/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH
Do you have any suggestions?