Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 950235 - media-libs/opensubdiv compile fails with nvidia-cuda-toolkit-12.8
Summary: media-libs/opensubdiv compile fails with nvidia-cuda-toolkit-12.8
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal minor
Assignee: Paul Zander
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: glibc-2.41
  Show dependency tree
 
Reported: 2025-02-24 16:57 UTC by Mark Purtill
Modified: 2025-02-26 00:21 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (emerge-info.txt,9.15 KB, text/plain)
2025-02-24 16:58 UTC, Mark Purtill
Details
opensubdiv build log (build.log,123.35 KB, text/plain)
2025-02-24 16:59 UTC, Mark Purtill
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Purtill 2025-02-24 16:57:57 UTC
Not sure which version of nvidia-cuda-toolkit I should be using (all are marked ~amd64) but upgrading to 12.8 caused several errors like this when compiling opensubdiv:

#$ "/usr/x86_64-pc-linux-gnu/gcc-bin/14"/gcc -D__CUDA_ARCH__=520 -D__CUDA_ARCH_LIST__=520 -D__NV_LEGACY_LAUNCH -c -x c++  -DCUDA_DOUBLE_MATH_FUNCTIONS "-march=alderlake" "-mabm" "-mno-cldemote" "-mno-kl" "-mno-sgx" "-mno-widekl" "-mshstk" "--param=l1-cache-line-size=64" "--param=l1-cache-size=32" "--param=l2-cache-size=30720" "-O2" "-pipe" "-fno-diagnostics-color" "-ggdb" -march=alderlake -mabm -mno-cldemote -mno-kl -mno-sgx -mno-widekl -mshstk --param=l1-cache-line-size=64 --param=l1-cache-size=32 --param=l2-cache-size=30720 -O2 -pipe -fno-diagnostics-color -ggdb -O2 -Wno-psabi -I"/opt/cuda/include" -I"/var/tmp/portage/media-libs/opensubdiv-3.6.0-r2/work/OpenSubdiv-3_6_0/opensubdiv" -I"/var/tmp/portage/media-libs/opensubdiv-3.6.0-r2/work/OpenSubdiv-3_6_0/glLoader" "-I/opt/cuda/bin/../targets/x86_64-linux/include"   -m64 "/var/tmp/portage/media-libs/opensubdiv-3.6.0-r2/temp/tmpxft_00005c27_00000000-6_cudaKernel.cudafe1.cpp" -o "/var/tmp/portage/media-libs/opensubdiv-3.6.0-r2/work/OpenSubdiv-3_6_0_build/opensubdiv/CMakeFiles/osd_static_gpu.dir/osd/./osd_static_gpu_generated_cudaKernel.cu.o" 
In file included from /opt/cuda/include/crt/math_functions.h:5994,
                 from /opt/cuda/include/crt/common_functions.h:303,
                 from /opt/cuda/include/crt/host_runtime.h:285,
                 from /var/tmp/portage/media-libs/opensubdiv-3.6.0-r2/temp/tmpxft_00005c27_00000000-6_cudaKernel.cudafe1.stub.c:8,
                 from tmpxft_00005c27_00000000-6_cudaKernel.cudafe1.stub.c:1:
/opt/cuda/include/crt/math_functions.h:6006:1: error: declaration of ‘double sinpi(double)’ has a different exception specifier
 6006 | __func__(double sinpi(double a));
      | ^~~~~~~~
/opt/cuda/include/crt/math_functions.h:2557:15: note: from previous declaration ‘double sinpi(double) noexcept’


Reproducible: Always

Steps to Reproduce:
1. Add dev-util/nvidia-cuda-toolkit ~amd64
2. Make sure cuda use flag is set for opensubdiv
3. emerge opensubdiv
Comment 1 Mark Purtill 2025-02-24 16:58:30 UTC
Created attachment 919809 [details]
emerge --info
Comment 2 Mark Purtill 2025-02-24 16:59:43 UTC
Created attachment 919810 [details]
opensubdiv build log
Comment 3 Mark Purtill 2025-02-24 17:57:44 UTC
With nvidia-cuda-toolkit-12.6.1-r1, opensubdiv compiles fine.
Comment 4 Larry the Git Cow gentoo-dev 2025-02-24 19:40:15 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a8ab18e9b1a9957b8cf39d72d808825752ea0e3f

commit a8ab18e9b1a9957b8cf39d72d808825752ea0e3f
Author:     Paul Zander <negril.nx+gentoo@gmail.com>
AuthorDate: 2025-02-24 19:14:30 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2025-02-24 19:38:04 +0000

    dev-util/nvidia-cuda-toolkit: 12.8.0-r2 use glibc version in patch
    
    Checking __GLIBC_USE (IEC_60559_FUNCS_EXT_C23) like the glibc-2.41 header does
    doesn't work under <glibc-2.41. So use the GLIBC version.
    
    Closes: https://bugs.gentoo.org/950235
    Signed-off-by: Paul Zander <negril.nx+gentoo@gmail.com>
    Signed-off-by: Sam James <sam@gentoo.org>

 ...t-glibc-2.41.patch => nvidia-cuda-toolkit-glibc-2.41-r1.patch} | 8 ++++----
 ...lkit-12.8.0-r1.ebuild => nvidia-cuda-toolkit-12.8.0-r2.ebuild} | 2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)
Comment 5 Mark Purtill 2025-02-26 00:00:10 UTC
Confirmed works for me, thanks.