您的位置:首页 > Web前端

CUDA3.1 on Fedora13

2010-09-06 15:40 274 查看
Download SDK driver and SDK from http://developer.nvidia.com/object/cuda_3_1_downloads.html
devdriver_3.1_linux_64_256.40.run

cudatoolkit_3.1_linux_64_fedora12.run

gpucomputingsdk_3.1_linux.run

OS:Fedora 13

Linux hpc.leadtek.com.cn 2.6.34.6-47.fc13.x86_64 #1 SMP Fri Aug 27 08:56:01 UTC 2010 x86_64 x86_64 x86_64 GNU/Linux

There are three samples in SDK cannot be compiled:

bandwidthTest MonteCarloMultiGPU simpleMultiGPU

[frank@hpc bandwidthTest]$ make

/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

make: *** [../../bin/linux/release/bandwidthTest] Error 1

I searched such error in Google, and find one article:
http://lists.fedoraproject.org/pipermail/devel/2010-January/129152.html:
The original reference to 'pthread_cancel' in 'string.o' was a *weak* and

*undefined* reference with no symbol version specified:

-----

$ readelf --all string.o

Symbol table '.symtab' contains 20 entries:

19: 0000000000000000     0 NOTYPE  WEAK   DEFAULT  UND pthread_cancel

No version information found in this file.

-----

The statically-bound reference in 'string' (without "-ldb") remains a

*weak undefined* reference with no symbol version specified:

-----

$ g++ -o string string.o

$ readelf --all string

Symbol table '.dynsym' contains 12 entries:

8: 0000000000000000     0 NOTYPE  WEAK   DEFAULT  UND pthread_cancel

Symbol table '.symtab' contains 73 entries:

65: 0000000000000000     0 NOTYPE  WEAK   DEFAULT  UND pthread_cancel

Version symbols section '.gnu.version' contains 12 entries:

008:   0 (*local*)       3 (GLIBCXX_3.4)   5 (GCC_3.0)       4 (CXXABI_1.3)

-----

With -ldb, then the statically-bound reference has been associated with

GLIBC_2.2.5:

-----

$ g++ -o string.db string.o -ldb-4.7   # done on Fedora 12, not Fedora 13.

$ readelf --all string.db

Symbol table '.dynsym' contains 17 entries:

10: 00000000004007a0     0 FUNC    WEAK   DEFAULT  UND pthread_cancel at GLIBC_2.2.5
(4)

Symbol table '.symtab' contains 73 entries:

65: 00000000004007a0     0 FUNC    WEAK   DEFAULT  UND pthread_cancel@@GLIBC_2.2.5

Version symbols section '.gnu.version' contains 17 entries:

008:   3 (GLIBCXX_3.4)   6 (GCC_3.0)       4 (GLIBC_2.2.5)   1 (*global*)

-----

By itself, the association between *weak undefined* pthread_cancel and

GLIBC_2.2.5 is innocuous.  That is what the static linker saw.  The problem

comes when code starts believing that GLIBC_2.2.5 is a requirement for

*weak undefined* pthread_cancel.  In today's rawhide for Fedora 13,

both  the static linker /usr/bin/ld and the runtime linker ld-linux.so

make this error.

*weak undefined* means "I accept *any* definition, or even *no* definition."

Both binutils and glibc must fix their errors of insisting on any particular

symbol version for a *weak undefined* symbol.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: