I am running Ubuntu 9.04 64bit with gcc 4.3 (the one installed by default) on a machine that does not (currently) have an nvidia adapter. I am trying to run cuda in emulation mode and then install the adapter.
I install the driver (which correctly, I think, fails to load the nvidia.ko driver) and then install the toolkit and ths sdk.
My problem is that when I try make emu=1 in SDK/C I get the following error:
pattakosn@yamaha:/opt/CUDA-sdk/C$ nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2009 NVIDIA Corporation
Built on Mon_Jul_13_12:35:34_PDT_2009
Cuda compilation tools, release 2.3, V0.2.1221
pattakosn@yamaha:/opt/CUDA-sdk/C$ make emu=1
make[1]: Entering directory `/opt/CUDA-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
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
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
make[1]: *** [obj/release/cutil.cpp.o] Error 1
make[1]: Leaving directory `/opt/CUDA-sdk/C/common'
make: *** [lib/libcutil.so] Error 2
It is correctly not detected as there is not one. I (falsely?) deduced that the error message was a problem. My intention was to run cuda in emulation.
It was silly. For some reason the common.mk files under NVIDIA_GPU_Computing_SDK/C/common and NVIDIA_GPU_Computing_SDK/shared/ did not point to /opt/cuda where I installed cuda but to the default installation location (/usr/local/cuda).