There are several discussions about gcc 4.4.x for CUDA SDK building issues, e.g. on FC 11 I am using.
General solutions are to step back 4.3 or use compat-34. Here is another workaround way:
Please edit common/common.mk
ADD one more flag to NVCCFLAGS
As in gcc 4.4.x, check against inline function be declared as weak. If you still meet the problem about always-inline functions like memcpy and memset, I suggest to recover common.mk, and override nvccflags -O2 with -O0 or null. This is the cheapest way to go through 4.4.x issue, cheers!
Another suggested again, maybe to Nvidia:
in Makefile, please add two lines for clean @make -C common -f Makefile_paramgl clean @make -C common -f Makefile_rendercheckgl clean
I did exactly to your advice, but it still reports the error about weak declaration in simpleTemplates project. The error shows to string.h and string3.h files in /usr/include, and to common_functions.h in cuda subdirs.
Same as for smokyboy, changing to gcc-4.3 in common.mk or adding the no-inline flag did not work. The only way was to uninstall gcc/g+±4.4, and make manually the link of /usr/bin/gcc to /usr/bin/gcc-4.3, and same for g++.
Actually, when you uninstall gcc-4.4 and do the make before creating the link of gcc/g++, the compilation fails at some point because it can’t find “gcc” (which makes sense since when you uninstall gcc-4.4, Ubuntu deletes the link /usr/bin/gcc.
But, that would not make any sense since I specified to use CC:=gcc-4.3, then I suspected somewhere else CC and CXX were being re-assigned to gcc/g++.
And the culprit seemed to be
At end of Makefile2 you can see
NVCC := $(CUDA_INSTALL_PATH)/bin/nvcc
CXX := g++
CC := gcc
LINK := g++ -fPIC
and then all subsequent compilations fail because this
Then, I deleted the CXX, CC and LINK assignments in src/simpleAtomicIntrinsics/Makefile2 and did again make, but the error of “gcc: no such file or directory persisted”
make -C src/simpleTextureDrv/
make: Entering directory `/home/pichards/NVIDIA_GPU_Computing_SDK/C/src/simpleTextureDrv’
gcc: No such file or director
Then I simply decided to create manually the link /usr/bin/gcc to gcc-4.3 and theproblem was solved, I could not find exactly the rule in the Makefiles that was trying to use gcc instead of expanding $(CC)…
Then solution for Ubuntu 9.10:
Install gcc and g++ 4.3, then change manually the links gcc and g++ to the 4.3 counterparts.
Not very clean until we figure out where exactly the Makefiles are getting messy
gcc 4.3 and 4.4 did not work but 4.1 did. The gcc, g++ and gcov are but symlinks to the gcc-4.x etc, so I just deleted those and made new symlinks to the 4.1’s, and then all compiled w/o a squeak.
No doubt a config file should be used to find out what compiler version is/are available, and adjust the makefile accordingly. I use Debian-Sid 2.6.32-2.slh.3-sidux-amd64 x86_64 and NVIDIA 190.53.
All demos seem to run fine.
A config file should also be able to detect existing and missing dependencies. I guess I’m spoiled using Debian, apt-get finds all needed deps. I remember way back, using rpm based stuff i always ended up with missing stuff, but here Nvidia could easily use a distribution agnostic config file. My debian repos even had some libcuda1 files.
OK, I’m a newbie and I tried the instructions in the previous post about installing gcc-4.1, etc. and re-making the symlinks. I am running Kubuntu 9.10. I perform a “make clean” and then “make”. Here’s my output: