Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 955021 - media-gfx/openvdb-11.0.0-r1 fails to build with cuda
Summary: media-gfx/openvdb-11.0.0-r1 fails to build with cuda
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Paul Zander
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-04-28 08:41 UTC by Luke A. Guest
Modified: 2025-04-29 10:06 UTC (History)
3 users (show)

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


Attachments
Build log (e-build.log,3.60 KB, text/x-log)
2025-04-28 08:46 UTC, Luke A. Guest
Details
Environment (e-env.gz,34.03 KB, application/gzip)
2025-04-28 08:46 UTC, Luke A. Guest
Details
output of emerge --info (e-info.txt,8.91 KB, text/plain)
2025-04-28 08:46 UTC, Luke A. Guest
Details
output of emerge -pvq (e-pqv.txt,1.80 KB, text/plain)
2025-04-28 08:47 UTC, Luke A. Guest
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Luke A. Guest 2025-04-28 08:41:26 UTC
__nvcc_device_query failed to call cudaLoader::cuInit(0) with error 0x130 (CUDA_ERROR_OPERATING_SYSTEM)


Reproducible: Always

Steps to Reproduce:
1. Update world
2.
3.
Actual Results:  
Failure

Expected Results:  
Merged

>>> Emerging (6 of 11) media-gfx/openvdb-11.0.0-r1::gentoo
 * openvdb-11.0.0.tar.gz BLAKE2B SHA512 size ;-) ...                                                                  [ ok ]
 * openvdb-11.0.0-drop-obsolete-isActive-gcc15.patch BLAKE2B SHA512 size ;-) ...                                      [ ok ]
>>> Unpacking source...
>>> Unpacking openvdb-11.0.0.tar.gz to /var/tmp/portage/media-gfx/openvdb-11.0.0-r1/work
=== Skipping unpack of openvdb-11.0.0-drop-obsolete-isActive-gcc15.patch
>>> Source unpacked in /var/tmp/portage/media-gfx/openvdb-11.0.0-r1/work
>>> Preparing source in /var/tmp/portage/media-gfx/openvdb-11.0.0-r1/work/openvdb-11.0.0 ...
 * Applying openvdb-11.0.0-drop-obsolete-isActive-gcc15.patch ...                                                     [ ok ]
 * Source directory (CMAKE_USE_DIR): "/var/tmp/portage/media-gfx/openvdb-11.0.0-r1/work/openvdb-11.0.0"
 * Build directory  (BUILD_DIR):     "/var/tmp/portage/media-gfx/openvdb-11.0.0-r1/work/openvdb-11.0.0_build"
 * Applying openvdb-8.1.0-glfw-libdir.patch ...                                                                       [ ok ]
 * Applying openvdb-9.0.0-fix-atomic.patch ...
patching file nanovdb/nanovdb/CMakeLists.txt
Hunk #1 succeeded at 69 with fuzz 1.
patching file openvdb/openvdb/CMakeLists.txt
Hunk #1 succeeded at 197 (offset -5 lines).                                                                           [ ok ]
 * Applying openvdb-10.0.1-fix-linking-of-vdb_tool-with-OpenEXR.patch ...                                             [ ok ]
 * Applying openvdb-10.0.1-log4cplus-version.patch ...                                                                [ ok ]
 * Applying openvdb-11.0.0-constexpr-version.patch ...                                                                [ ok ]
 * Applying openvdb-11.0.0-cmake_fixes.patch ...                                                                      [ ok ]
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/media-gfx/openvdb-11.0.0-r1/work/openvdb-11.0.0 ...
 * install: running my_src_configure
__nvcc_device_query failed to call cudaLoader::cuInit(0) with error 0x130 (CUDA_ERROR_OPERATING_SYSTEM)
 * ERROR: media-gfx/openvdb-11.0.0-r1::gentoo failed (configure phase):
 *   failed to query the native device
 * 
 * Call stack:
 *     ebuild.sh, line  136:  Called src_configure
 *   environment, line 3342:  Called multibuild_foreach_variant 'my_src_configure'
 *   environment, line 2483:  Called _multibuild_run 'my_src_configure'
 *   environment, line 2481:  Called my_src_configure
 *   environment, line 2737:  Called cuda_get_host_native_arch
 *   environment, line 1597:  Called die
 * The specific snippet of code:
 *       __nvcc_device_query || die "failed to query the native device"
 * 
 * If you need support, post the output of `emerge --info '=media-gfx/openvdb-11.0.0-r1::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=media-gfx/openvdb-11.0.0-r1::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/media-gfx/openvdb-11.0.0-r1/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/media-gfx/openvdb-11.0.0-r1/temp/environment'.
 * Working directory: '/var/tmp/portage/media-gfx/openvdb-11.0.0-r1/work/openvdb-11.0.0'
 * S: '/var/tmp/portage/media-gfx/openvdb-11.0.0-r1/work/openvdb-11.0.0'
Comment 1 Luke A. Guest 2025-04-28 08:46:13 UTC
Created attachment 926828 [details]
Build log
Comment 2 Luke A. Guest 2025-04-28 08:46:29 UTC
Created attachment 926829 [details]
Environment
Comment 3 Luke A. Guest 2025-04-28 08:46:54 UTC
Created attachment 926830 [details]
output of emerge --info
Comment 4 Luke A. Guest 2025-04-28 08:47:07 UTC
Created attachment 926831 [details]
output of emerge -pvq
Comment 5 Benjamin Schulz 2025-04-28 13:25:29 UTC
I can confirm this. Seeing it too..

Blender depends on this bug, since it needs the new openvdb to compile...
Comment 6 Larry the Git Cow gentoo-dev 2025-04-28 21:33:11 UTC
The bug has been closed via the following commit(s):

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

commit 09cb043f9a243ae1393169ecd537e6ea343b7eda
Author:     Paul Zander <negril.nx+gentoo@gmail.com>
AuthorDate: 2025-04-28 11:43:07 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2025-04-28 21:32:35 +0000

    media-gfx/openvdb: fix cuda sandbox issues
    
    Handle missing write permissions when the build user is not in the video group.
    Setup sandbox permissions as `SANDBOX_PREDICT` masked further failures.
    Run `nvidia-smi -L` to setup device files so `cuda_add_sandbox` finds those
    files.
    Do not use `local -x` as it masks already set values and breaks user-set
    CUDAARCHS.
    
    Closes: https://bugs.gentoo.org/955021
    Signed-off-by: Paul Zander <negril.nx+gentoo@gmail.com>
    Signed-off-by: Sam James <sam@gentoo.org>

 media-gfx/openvdb/openvdb-11.0.0-r1.ebuild | 62 +++++++++++++++++++++++-------
 1 file changed, 48 insertions(+), 14 deletions(-)
Comment 7 Luke A. Guest 2025-04-29 10:06:44 UTC
Seems to have built here.