this has been discussed before, but as described here (http://forums.nvidia.com/index.php?s...0#entry1078651
) I get the error
/usr/bin/ld: obj/x86_64/release/bandwidthTest.cu.o: undefined reference to symbol 'pthread_cancel@@GLIBC_2.2.5'
/usr/bin/ld: note: 'pthread_cancel@@GLIBC_2.2.5' is defined in DSO /lib64/libpthread.so.0 so try adding it to the linker command line
/lib64/libpthread.so.0: could not read symbols: Invalid operation
collect2: ld returned 1 exit status
explains the background and asks me to link the .so explicitly (just like the error message does).
But even though this task is probably very simple, I don't know how to perform it. How can I add it to the linker command? Adding
LIBS := -lpthread
LDFLAGS := -L/lib64
LIBDIRS := -L/lib64
CFLAGS := -pthread
to the Makefile didn't help (as expected).
How can I add an .so file to my linker command line? (What I try to compile are the CUDA examples in NVIDIA_GPU_Computing_SDK/C/ I simply call make and get the error mentioned above.)
Any help would be greatly appreciated. Thanks in advance.
Just to clarify - my problem is that I anticipate I have to link /lib64/libpthread.so.0, but I don't know where to do so in a Makefile. There are two Makefiles involved: One Makefile on the toplevel (/home/<user>/NVIDIA_GPU_Computing_SDK/C/) and one in src/bandwidthTest. The latter only includes EXECUTABLE, CUFILES, CCFILES, CFLAGS and an include, the top one includes a bunch of stuff, but I can't locate where exactly the .o files are linked (maybe just since I'm no expert regarding Makefiles). There is no obvious gcc -o. If anyone should have Fedora 13 and CUDA installed: A short hint on this would be very helpful. The "fix" has been confirmed to work in general several times, e.g. here (http://comments.gmane.org/gmane.comp...yer.user/63885
), but I don't know how to apply it.