![]() ![]() |
Aug 13 2009, 03:47 PM
Post
#1
|
|
![]() ![]() Group: Members Posts: 22 Joined: 19-March 07 From: China Member No.: 45,835 Org.: EmbeddedCore |
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 --compiler-options -fno-inline 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 Finally, make clean; make Done, cheers. :yes: This post has been edited by highman: Nov 12 2009, 08:24 AM |
|
|
|
Nov 3 2009, 08:07 AM
Post
#2
|
|
![]() ![]() ![]() Group: Members Posts: 28 Joined: 4-June 08 Member No.: 106,431 |
It doesn't work for me, still reports the same error. I have added the flag, cleaned and make-d.
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 --compiler-options -fno-inline As in gcc 4.4.x, check against inline function be declared as weak. 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 Finally, make clean; make Done, cheers. |
|
|
|
Nov 3 2009, 08:28 AM
Post
#3
|
|
![]() ![]() Group: Members Posts: 22 Joined: 19-March 07 From: China Member No.: 45,835 Org.: EmbeddedCore |
This is my common.mk
CODE [highman@gpu common]$ diff common.mk common.mk.org 126c126 < NVCCFLAGS += --compiler-options -fno-strict-aliasing --compiler-options -fno-inline --- > NVCCFLAGS += --compiler-options -fno-strict-aliasing Obviously, it will bring some differences. If no, please check your configuration. post your error informaiton. And, be careful. un-cleaned library, so suggest to add two more lines in C/Makefile CODE clean: tidy $(addsuffix .ph_clean,$(PROJECTS)) @make -C common clean @make -C common -f Makefile_paramgl clean @make -C common -f Makefile_rendercheckgl clean It doesn't work for me, still reports the same error. I have added the flag, cleaned and make-d.
This post has been edited by highman: Nov 4 2009, 03:30 AM |
|
|
|
Nov 3 2009, 04:45 PM
Post
#4
|
|
![]() ![]() Group: Members Posts: 21 Joined: 9-September 07 Member No.: 69,336 |
Another way would be to separate the code:
1: minimal cuda code, compiled in a static or shared library with nvcc and gcc 4.3 2: 4.4/4.5 for the rest, link with (1) This is my common.mk [highman@gpu common]$ diff common.mk common.mk.org 126c126 < NVCCFLAGS += --compiler-options -fno-strict-aliasing --compiler-options -fno-inline --- > NVCCFLAGS += --compiler-options -fno-strict-aliasing Obviously, it will bring some differences. If no, please check your configuration. post your error informaiton. And, be careful. un-cleaned library, so suggest to add two more lines in C/Makefile clean: tidy $(addsuffix .ph_clean,$(PROJECTS)) @make -C common clean @make -C common -f Makefile_paramgl clean @make -C common -f Makefile_rendercheckgl clean |
|
|
|
Nov 4 2009, 09:06 PM
Post
#5
|
|
![]() ![]() ![]() Group: Members Posts: 28 Joined: 4-June 08 Member No.: 106,431 |
This is my common.mk CODE [highman@gpu common]$ diff common.mk common.mk.org 126c126 < NVCCFLAGS += --compiler-options -fno-strict-aliasing --compiler-options -fno-inline --- > NVCCFLAGS += --compiler-options -fno-strict-aliasing Obviously, it will bring some differences. If no, please check your configuration. post your error informaiton. And, be careful. un-cleaned library, so suggest to add two more lines in C/Makefile CODE clean: tidy $(addsuffix .ph_clean,$(PROJECTS)) @make -C common 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. Anyway, thanks for your effort. |
|
|
|
Nov 5 2009, 03:14 PM
Post
#6
|
|
![]() Group: Members Posts: 1 Joined: 5-October 09 Member No.: 195,627 |
SOLUTION for Ubuntu 9.10.
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 src/simpleAtomicIntrinsics/Makefile2 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[1]: 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 Cheers |
|
|
|
![]() ![]() |
| Copyright 2008 NVIDIA Corporation. Terms of Use | Legal Info | Privacy Policy | Time is now: 24th November 2009 - 01:46 AM |