Summary: | media-libs/opensubdiv-3.1.1: nvcc fatal : Stray '"' character | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Jura <me> |
Component: | Current packages | Assignee: | Jonathan Scruggs (RETIRED) <dracwyrm> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | agrigo2001, creideiki+gentoo-bugzilla, me, proxy-maint |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
build.log
opensubdiv-3.1.1-skip-osd-regression.patch build.log after patching Remove the quotes around the version string that trips up newer versions of cmake |
same for me emerge --info https://paste.pound-python.org/show/uK0XelOY7qyspvWbiJrU/ Looks like this has to do with CUDA. I'll see if Adrian can debug this. I will look at this on the weekend. What version of GGC and CUDA toolkits are you two using? sys-devel/gcc-5.4.0-r2 dev-util/nvidia-cuda-toolkit-8.0.44 (In reply to Adrian from comment #3) > I will look at this on the weekend. Adrian, found this upstream bug: nvcc fatal : Stray '"' character Same error at the end. They were able to use CMake 3.5.0, but OpenSubDiv was able to compile. Created attachment 461144 [details, diff]
opensubdiv-3.1.1-skip-osd-regression.patch
Hey all,
Can you try something for me?
# mkdir -p /etc/portage/patches/media-libs/opensubdiv-3.1.1/
Then copy the attached patch with the same name as the description of it to that newly made directory
# emerge =opensubdiv-3.1.1
Then let me know if it succeeds.
NOTE to Adrian, if this works then that means that Regression is compiling even through I hard disabled it as upstream is supposed to be fixing the issue that you needed the patch for.
Did the patch that I posted work for anyone? Thanks. Created attachment 461618 [details]
build.log after patching
Patch not work for me
I tried the patch as Jon requested and it still failed to build. I got basically the same build log as Jura, nvcc fatal : Stray '"' character. I'm also running the same versions of gcc & nvidia as Jura. The error also occurs for me and is not resolved by the patch. I was able to manually compile after editing the generated CMakefiles for osd_*.gpu to remove all the \". I think a patch to fix the quoting of the options to nvcc should resolve the issue, will post it here once I have completed it. Created attachment 462088 [details, diff]
Remove the quotes around the version string that trips up newer versions of cmake
CMakeLists.txt creates a definition for OPENSUBDIV_VERSION_STRING in which the version string is quoted e.g.
OPENSUBDIV_VERSION_STRING="3.x.x"
Code generated by the CMake module FindCUDA transforms this into an improperly quoted semicolon separated list:
set(CUDA_NVCC_COMPILE_DEFINITIONS "OPENSUBDIV_VERSION_STRING="3.x.x";OPENSUBDIV ... ")
This variable is then used to create a command line to compile the cuda kernel, but the processing results in dangling quotes and compilation fails. The current version of FindCUDA code was introduced upstream around 5 months ago (commit 6442709b). Reportedly older versions of CMake (eg 3.5.0) work without issue.
By removing the quotes from the version string on creation, newer versions of CMake are able to process the list of compiler definitions correctly and compilation succeeds.
Upstream is aware of this issue and has created an internal ticket for it. So there may be an alternative fix available at a later date.
Adrian, would you be able to post your patch idea in the upstream bug report to see what they say about it, if you haven't already? It affects Windows as well, so it's a vital fix. You don't need a pull request, just copy and paste the text in a comment using a code block. Cheers. I have submitted the patch upstream for review. While doing so I did some further testing and found that the FindCUDA module changes were merged into CMake 3.7.0. The last version of CMake that compiles opensubdiv without the patch is 3.6.3. My patch fixes the stray " character issue, but fails if users compile the examples as OPENSUBDIV_VERSION_STRING is no longer actually a string. I have submitted additional corrections upstream to integrate it properly using string tokenisation where necessary. If we need to allow users to build the examples then we should integrate these additional changes into opensubdiv, otherwise we can just mask the examples until the issue is corrected upstream. Here's a patch I found online doesn't remove the osd_regression and compiles and works. Confirmed working took me awhile to find this as the current patch didn't work for me from here. mkdir -p /etc/portage/patches/media-libs/opensubdiv-3.1.1/ --- a/CMakeLists.txt 2017-02-01 23:20:22.590219192 +1100 +++ b/CMakeLists.txt 2017-02-01 23:19:59.923600152 +1100 @@ -48,7 +48,7 @@ string(REGEX REPLACE "^v" "" OSD_SONAME ${OSD_SONAME}) add_definitions( - -DOPENSUBDIV_VERSION_STRING="${OSD_SONAME}" + -DOPENSUBDIV_VERSION_STRING=${OSD_SONAME} ) #------------------------------------------------------------------------------- The patch in comment 16 fixes the improper quotes for me. Versions: sys-devel/gcc-6.3.0 dev-util/nvidia-cuda-toolkit-8.0.61 media-libs/opensubdiv-3.1.1 So now I get far enough to see that CUDA doesn't work with GCC 6, but that's another bug... The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=072d9adafab829b7f934637f7ba8a8f29c2ea3db commit 072d9adafab829b7f934637f7ba8a8f29c2ea3db Author: Jonathan Scruggs <j.scruggs@gmail.com> AuthorDate: 2017-09-21 09:14:47 +0000 Commit: David Seifert <soap@gentoo.org> CommitDate: 2017-09-23 08:36:15 +0000 media-libs/opensubdiv: Version bump to 3.3 and remove ati-drivers * Fixed compile error about stray quotes * Changed hardcoded paths to GNUInstallDirs which fixed multilib-strict check fail Closes: https://bugs.gentoo.org/605958 Closes: https://bugs.gentoo.org/611844 Closes: https://github.com/gentoo/gentoo/pull/5751 media-libs/opensubdiv/Manifest | 1 + .../files/opensubdiv-3.3.0-fix-quotes.patch | 13 +++++ .../opensubdiv-3.3.0-use-gnuinstalldirs.patch | 39 ++++++++++++++ media-libs/opensubdiv/opensubdiv-3.1.0.ebuild | 2 - media-libs/opensubdiv/opensubdiv-3.1.1.ebuild | 9 +++- media-libs/opensubdiv/opensubdiv-3.3.0.ebuild | 63 ++++++++++++++++++++++ 6 files changed, 123 insertions(+), 4 deletions(-) |
Created attachment 460432 [details] build.log Can't update media-libs/opensubdiv-3.1.0 -> media-libs/opensubdiv-3.1.1, compile error: nvcc fatal : Stray '"' character CMake Error at osd_static_gpu_generated_cudaKernel.cu.o.Gentoo.cmake:224 (message): Error generating /var/tmp/portage/media-libs/opensubdiv-3.1.1/work/opensubdiv-3.1.1_build/opensubdiv/CMakeFiles/osd_static_gpu.dir/osd/./osd_static_gpu_generated_cudaKernel.cu.o