Bug#697730: nvidia-cuda-toolkit: Error if nvcc called without -lcudart

Kristjan Onu jeixav at gmail.com
Tue Jan 8 22:46:10 UTC 2013


Package: nvidia-cuda-toolkit
Version: 4.2.9-1
Severity: normal

I found that to compile a Thrust (http://thrust.github.com/) program,
nvcc must be called with the -lcudart command line option.
Specifically, to compile examples/version.cu from the Thrust Git
repository, I had to type: nvcc version.cu -o version -lcudart.

The expected behavior is that the -lcudart option should not be
necessary for compilation, but omitting this option gives an error on
my Debian system. The error is:

/tmp/tmpxft_00001736_00000000-13_version.o: In function `__cudaUnregisterBinaryUtil()':
tmpxft_00001736_00000000-1_version.cudafe1.cpp:(.text+0x90): undefined reference to `__cudaUnregisterFatBinary'
/tmp/tmpxft_00001736_00000000-13_version.o: In function `__sti____cudaRegisterAll_42_tmpxft_00001736_00000000_4_version_cpp1_ii_main()':
tmpxft_00001736_00000000-1_version.cudafe1.cpp:(.text+0xa0): undefined reference to `__cudaRegisterFatBinary'
collect2: ld returned 1 exit status

This could be the result of a bug in the way nvcc is packaged in
Debian. I started a thread on on the Thrust mailing list:
https://groups.google.com/d/topic/thrust-users/UpNJ980pGhM/.

-- System Information:
Debian Release: 7.0
  APT prefers testing
  APT policy: (990, 'testing')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.2.0-4-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_CA.UTF-8, LC_CTYPE=en_CA.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages nvidia-cuda-toolkit depends on:
ii  g++-4.4            4.4.7-2
ii  g++-4.6            4.6.3-14
ii  gcc-4.4            4.4.7-2
ii  gcc-4.6            4.6.3-14
ii  libc6              2.13-37
ii  libgcc1            1:4.7.2-4
ii  libstdc++6         4.7.2-4
ii  nvidia-cuda-dev    4.2.9-1
ii  nvidia-opencl-dev  4.2.9-1
ii  zlib1g             1:1.2.7.dfsg-13

Versions of packages nvidia-cuda-toolkit recommends:
ii  nvidia-cuda-doc         4.2.9-1
ii  nvidia-cuda-gdb         4.2.9-1
ii  nvidia-visual-profiler  4.2.9-1

Versions of packages nvidia-cuda-toolkit suggests:
pn  libcupti-dev  <none>

-- no debconf information



More information about the pkg-nvidia-devel mailing list