Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 955281 - dev-util/nvidia-cuda-toolkit-12.8.1[debugger]: Failure to build: USE Flag 'python_targets_python3_10' not in IUSE for dev-util/nvidia-cuda-toolkit-12.8.1
Summary: dev-util/nvidia-cuda-toolkit-12.8.1[debugger]: Failure to build: USE Flag 'py...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Science Related Packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-05-03 03:06 UTC by Jan Vesely
Modified: 2025-05-03 03:13 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Vesely 2025-05-03 03:06:36 UTC
>>> Install dev-util/nvidia-cuda-toolkit-12.8.1 into /var/tmp/portage-big/portage/dev-util/nvidia-cuda-toolkit-12.8.1/image                                   
 * parsing manifest /var/tmp/portage-big/portage/dev-util/nvidia-cuda-toolkit-12.8.1/work/manifests/cuda_x86_64.xml ...                                       
  [ ok ]                                                                                                                                                      
 * ERROR: dev-util/nvidia-cuda-toolkit-12.8.1::gentoo failed (install phase):                                                                                 
 *   USE Flag 'python_targets_python3_10' not in IUSE for dev-util/nvidia-cuda-toolkit-12.8.1                                                                 
 *                                                                                                                                                            
 * Call stack:                                                                                                                                                
 *          ebuild.sh, line  136:  Called src_install                                                                                                         
 *        environment, line 2014:  Called use 'python_targets_python3_10'                                                                                     
 *   phase-helpers.sh, line  256:  Called die                                                                                                                 
 * The specific snippet of code:                                                                                                                              
 *                              die "USE Flag '${u}' not in IUSE for ${CATEGORY}/${PF}"
 *                                     
 * If you need support, post the output of `emerge --info '=dev-util/nvidia-cuda-toolkit-12.8.1::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=dev-util/nvidia-cuda-toolkit-12.8.1::gentoo'`.
 * The complete build log is located at '/var/tmp/portage-big/portage/dev-util/nvidia-cuda-toolkit-12.8.1/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage-big/portage/dev-util/nvidia-cuda-toolkit-12.8.1/temp/environment'.
 * Working directory: '/var/tmp/portage-big/portage/dev-util/nvidia-cuda-toolkit-12.8.1/work/builds/cuda_nvprune'
 * S: '/var/tmp/portage-big/portage/dev-util/nvidia-cuda-toolkit-12.8.1/work'                                                                                 


The error comes from the following loop in the ebuild:
    if use debugger; then
        if [[ -d "${ED}/${CUDA_PATH}/extras/Debugger/lib64" ]]; then
            rmdir "${ED}/${CUDA_PATH}/extras/Debugger/lib64" || die "remove debugger lib64"
        fi

        find "${ED}/${CUDA_PATH}/bin" -maxdepth 1 -name "cuda-gdb-*-tui" -print0 | while read -rd $'\0' tui_name; do
            impl="$(basename "${tui_name}" | cut -d '-' -f 3 | tr '.' '_')"

            if ! has "${impl}" "${PYTHON_COMPAT[@]}" || ! use "python_targets_${impl}"; then 
                rm "${tui_name}" || die "tui-name rm ${tui_name}"
                sed -e "/$(basename "${tui_name}")\"/d" -i "${ED}/${CUDA_PATH}/bin/cuda-gdb" || die "tui_name sed"
            fi
        done
    fi

Although PYTHON_COMPAT still includes 3.10, it's no longer available as IUSE.

Reproducible: Always
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2025-05-03 03:11:43 UTC
I don't understand why it's even doing that. It should unconditionally set it to the right shebang instead (and perhaps use python-single-r1). But whatever, I'll add the workaround (dropping 3.10). Keeping the bug open to answer that point though.
Comment 2 Larry the Git Cow gentoo-dev 2025-05-03 03:13:38 UTC
The bug has been referenced in the following commit(s):

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

commit 160841d87e3e4973c8e61c1866d14f39f8109678
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2025-05-03 03:12:21 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2025-05-03 03:12:57 +0000

    dev-util/nvidia-cuda-toolkit: disable py3.10
    
    Quoting myself on the bug:
    > I don't understand why it's even doing that. It should unconditionally set it
    > to the right shebang instead (and perhaps use python-single-r1). But
    > whatever, I'll add the workaround (dropping 3.10). Keeping the bug open
    > to answer that point though.
    
    Drop python3.10 given it obviously breaks now it's no longer a target.
    
    Bug: https://bugs.gentoo.org/955281
    Signed-off-by: Sam James <sam@gentoo.org>

 dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-12.6.3.ebuild | 2 +-
 dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-12.8.1.ebuild | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)