Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
FS#55795 - [cuda][cmake] cannot complile CUDA projects
Attached to Project:
Community Packages
Opened by Sebastiaan Lokhorst (lonaowna) - Thursday, 28 September 2017, 14:17 GMT
Last edited by Sven-Hendrik Haase (Svenstaro) - Wednesday, 04 October 2017, 12:02 GMT
Opened by Sebastiaan Lokhorst (lonaowna) - Thursday, 28 September 2017, 14:17 GMT
Last edited by Sven-Hendrik Haase (Svenstaro) - Wednesday, 04 October 2017, 12:02 GMT
|
DetailsWhen trying to compile any CMake project using CUDA, it fails with the following message:
The CUDA compiler "/opt/cuda/bin/nvcc" is not able to compile a simple test program. It fails with the following output: (...) /usr/bin/ld: CMakeFiles/cmTC_8cc96.dir/main.cu.o: relocation R_X86_64_32 against `.bss' can not be used when making a shared object; recompile with -fPIC (...) Steps to reproduce: * Create a file called "CMakeLists.txt" with the following contents: project(testproject CUDA) * Run "cmake ." Tested with: cmake 3.9.2-2 + cuda 8.0.61-3 from [extra]/[community] cmake 3.9.3-1 + cuda 9.0.176-1 from [testing] |
This task depends upon
Closed by Sven-Hendrik Haase (Svenstaro)
Wednesday, 04 October 2017, 12:02 GMT
Reason for closing: Upstream
Wednesday, 04 October 2017, 12:02 GMT
Reason for closing: Upstream
CMakeLists.txt
Is this a bug in CMake, that it finds the wrong host compiler? Or is it possible to set the right default in the cuda or cmake package?
https://gitlab.kitware.com/cmake/cmake/issues/17323