View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0016027CMakeModulespublic2016-03-21 17:062016-06-10 14:21
ReporterEyal Rozenberg 
Assigned ToBrad King 
PrioritynormalSeverityminorReproducibilitysometimes
StatusclosedResolutionfixed 
PlatformOSOS Version
Product VersionCMake 3.5 
Target VersionCMake 3.5.1Fixed in VersionCMake 3.5.1 
Summary0016027: nvcc encloses -ccbin argument with gratuitous quotation marks during intermediate-link phase
DescriptionI've been using CMake on Debian Stretch with CUDA. I'm not sure what the version was until recently, but everything worked fine for me. Then I started getting errors such as:

"/usr/local/cuda/bin/gcc": No such file or directory
CMakeFiles/tester.dir/build.make:2335: recipe for target 'CMakeFiles/wherever/foo.o' failed

The culprit seems to be /usr/share/cmake/Modules/FindCUDA.cmake, line 1554. Pseudo-patch:

- list(APPEND nvcc_flags -ccbin "\"${CUDA_HOST_COMPILER}\"")
+ list(APPEND nvcc_flags -ccbin "${CUDA_HOST_COMPILER}")

that resolves the issue.
Steps To Reproduce1. export CC=/link/to/your/appropriate/gcc
2. cmake a project with CMakeList.txt which finds CUDA and with set(CUDA_SEPARABLE_COMPILATION ON)
3. Build the project

The .cu files will compile, the intermediate-link phase won't pass
TagsNo tags attached.
Attached Files

 Relationships
has duplicate 0016031closed FindCUDA.cmake - CUDA_SEPARABLE_COMPILATION fails because of escape character 

  Notes
(0040745)
Brad King (manager)
2016-03-22 11:06

Thanks. Please try this fix:

FindCUDA: Fix regression in separate compilation
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=72a97b7a [^]
(0040747)
Eyal Rozenberg (reporter)
2016-03-22 11:21

Brad, glancing at the patch, this will most probably work for me since I don't use MSVC, but - will it really work users who do? Are you sure you've not just narrowed the problem?
(0040748)
Brad King (manager)
2016-03-22 11:29

Re 0016027:0040747: What happened between CMake 3.4 and 3.5 is there was a bug report complaining that certain source/build tree names could not be used because the generated custom commands would not quote their names correctly. To fix this the VERBATIM option was added to our add_custom_command call. When that was done the explicit quoting on the line in question here should have been removed because the VERBATIM option will take care of it. Then it turned out that the special $(VCInstallDir) syntax could not be used in combination with VERBATIM so we added a special case to not use VERBATIM if that value appears. The patch I linked in 0016027:0040745 accounts for both possibilities.
(0040751)
Brad King (manager)
2016-03-22 13:37

The main reason these regressions appeared is that no one has ever set up testing infrastructure for the FindCUDA module. If anyone is interested in doing this, please come to the dev list:

 https://cmake.org/mailman/listinfo/cmake-developers [^]
(0040757)
Brad King (manager)
2016-03-23 14:47

The fix in 0016027:0040745 has been queued for merge to 'release' for inclusion in CMake 3.5.1.
(0040758)
Eyal Rozenberg (reporter)
2016-03-23 15:12

Ok by me. I'm afraid I won't have time to devote to helping you with testing, though. I can promise to complain if you break something and it makes it to my distro...
(0041213)
Kitware Robot (administrator)
2016-06-10 14:21

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.

 Issue History
Date Modified Username Field Change
2016-03-21 17:06 Eyal Rozenberg New Issue
2016-03-22 11:06 Brad King Note Added: 0040745
2016-03-22 11:21 Eyal Rozenberg Note Added: 0040747
2016-03-22 11:29 Brad King Note Added: 0040748
2016-03-22 13:35 Brad King Relationship added has duplicate 0016031
2016-03-22 13:37 Brad King Note Added: 0040751
2016-03-23 14:47 Brad King Note Added: 0040757
2016-03-23 14:47 Brad King Assigned To => Brad King
2016-03-23 14:47 Brad King Status new => resolved
2016-03-23 14:47 Brad King Resolution open => fixed
2016-03-23 14:47 Brad King Fixed in Version => CMake 3.5.1
2016-03-23 14:47 Brad King Target Version => CMake 3.5.1
2016-03-23 15:12 Eyal Rozenberg Note Added: 0040758
2016-06-10 14:21 Kitware Robot Note Added: 0041213
2016-06-10 14:21 Kitware Robot Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team