Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 949903 - sci-libs/torchvision-0.20.0[cuda] fails at configure step
Summary: sci-libs/torchvision-0.20.0[cuda] fails at configure step
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Tupone Alfredo
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-02-18 10:59 UTC by Eugene Shalygin
Modified: 2025-02-21 22:27 UTC (History)
2 users (show)

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


Attachments
build log (build.log,6.28 KB, text/x-log)
2025-02-18 11:00 UTC, Eugene Shalygin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Eugene Shalygin 2025-02-18 10:59:14 UTC
/usr/lib/python3.12/site-packages/torch/cuda/__init__.py:129: UserWarning: CUDA initialization: Unexpected error from cudaGetDeviceCount(). Did you run some cuda functions before calling NumCudaDevices() that might have already set an error? Error 304: OS call failed or operation not supported on this OS (Triggered internally at /tmp/portage/sci-libs/caffe2-2.5.1-r7/work/pytorch-2.5.1/c10/cuda/CUDAFunctions.cpp:108.)
  return torch._C._cuda_getDeviceCount() > 0
No CUDA runtime is found, using CUDA_HOME='/opt/cuda'


At the same time:
$ python
Python 3.12.9 (main, Feb  5 2025, 11:23:38) [GCC 14.2.1 20241221] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import torch
>>> torch.cuda.is_available()
True
>>> torch.cuda.device_count()
1
>>> torch.cuda.current_device()
0
>>> torch.cuda.get_device_name(0)
'NVIDIA GeForce RTX 3060'
>>> 


Reproducible: Always

Steps to Reproduce:
1. USE="cuda" emerge -1 torchvision




$ emerge --info sci-libs/torchvision
Portage 3.0.67 (python 3.12.9-final-0, default/linux/amd64/23.0/desktop/plasma/systemd, gcc-14, glibc-2.41, 6.13.2-gentoo x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-6.13.2-gentoo-x86_64-AMD_Ryzen_9_7950X_16-Core_Processor-with-glibc2.41
KiB Mem:   123452208 total,  95113656 free
KiB Swap:  205520892 total, 205355352 free
Timestamp of repository gentoo: Tue, 18 Feb 2025 08:33:44 +0000
Head commit of repository gentoo: 07d2d136ebea7478c080c98bd1dcd8964b5f8c75

Timestamp of repository 4nykey: Mon, 17 Feb 2025 22:03:42 +0000
Head commit of repository 4nykey: ad66e7657284c868d0e397399e129715022887b1

Timestamp of repository benzene-overlay: Tue, 18 Feb 2025 08:03:31 +0000
Head commit of repository benzene-overlay: fc88bdcc81fa6a20216b6722bb05c1dc161dfd3b

Timestamp of repository brother-overlay: Sun, 16 Feb 2025 18:52:05 +0000
Head commit of repository brother-overlay: 98cf4667f1edbdca145a2298bc7a9e42571dad8b

Timestamp of repository cg: Mon, 17 Feb 2025 22:03:39 +0000
Head commit of repository cg: cac0785c3733c0daa20dbebc404dd1233bf30121

Timestamp of repository guru: Mon, 17 Feb 2025 22:03:45 +0000
Head commit of repository guru: bd66971ffefde6212a2d65f502c5f9cf8beca4c6

Timestamp of repository haarp: Mon, 17 Feb 2025 22:03:35 +0000
Head commit of repository haarp: 103635705864f4b0f26af48780c5774770e2e724

Timestamp of repository kde: Sun, 16 Feb 2025 22:18:29 +0000
Head commit of repository kde: bde932777613e3909f084aff6dcf95fd64cf6b76

Timestamp of repository mv: Mon, 17 Feb 2025 22:03:37 +0000
Head commit of repository mv: f19bacb18f8d8577f8af445273b34a2ad963c1e0

Timestamp of repository nest: Mon, 17 Feb 2025 22:03:43 +0000
Head commit of repository nest: 079c286193b81f45b4ca72c773048c2808c96c7d

Timestamp of repository qt: Sun, 16 Feb 2025 18:51:59 +0000
Head commit of repository qt: a77029c92e97881af929ecd9f00dafbf52fe5460

Timestamp of repository science: Mon, 17 Feb 2025 22:03:47 +0000
Head commit of repository science: e0f41d0ca35361b02a1c3a3fc40b4feb32b2a88c

Timestamp of repository wayland-desktop: Sun, 16 Feb 2025 18:52:16 +0000
Head commit of repository wayland-desktop: 0b62250a3a94f43bb3473ac74645fd128ce48050

sh bash 5.2_p37
ld GNU ld (Gentoo 2.43 p3) 2.43.1
app-misc/pax-utils:        1.3.8::gentoo
app-shells/bash:           5.2_p37::gentoo
dev-build/autoconf:        2.13-r8::gentoo, 2.71-r7::gentoo, 2.72-r1::gentoo
dev-build/automake:        1.16.5-r2::gentoo, 1.17-r1::gentoo
dev-build/cmake:           3.31.5::gentoo
dev-build/libtool:         2.5.4::gentoo
dev-build/make:            4.4.1-r100::gentoo
dev-build/meson:           1.7.0::gentoo
dev-java/java-config:      2.3.4::gentoo
dev-lang/perl:             5.40.0-r1::gentoo
dev-lang/python:           3.12.9::gentoo, 3.13.2::gentoo
dev-lang/rust-bin:         1.82.0-r102::gentoo, 1.83.0-r1::gentoo, 1.84.0-r1::gentoo, 1.84.1-r1::gentoo
llvm-core/clang:           18.1.8-r6::gentoo, 19.1.7::gentoo
llvm-core/lld:             19.1.7::gentoo
llvm-core/llvm:            18.1.8-r6::gentoo, 19.1.7::gentoo
sys-apps/baselayout:       2.17::gentoo
sys-apps/sandbox:          2.43::gentoo
sys-apps/systemd:          257.2::gentoo
sys-devel/binutils:        2.43-r2::gentoo, 2.44::gentoo
sys-devel/binutils-config: 5.5.2::gentoo
sys-devel/gcc:             13.3.1_p20241220::gentoo, 14.2.1_p20241221::gentoo
sys-devel/gcc-config:      2.12.1::gentoo
sys-kernel/linux-headers:  6.13::gentoo (virtual/os-headers)
sys-libs/glibc:            2.41::gentoo
Repositories:

gentoo
    location: /var/db/repos/gentoo
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/gentoo.git
    priority: -1000
    volatile: False

4nykey
    location: /var/db/repos/4nykey
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/4nykey.git
    masters: gentoo
    volatile: False

benzene-overlay
    location: /var/db/repos/benzene-overlay
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/benzene-overlay.git
    masters: gentoo
    volatile: False

brother-overlay
    location: /var/db/repos/brother-overlay
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/brother-overlay.git
    masters: gentoo
    volatile: False

cg
    location: /var/db/repos/cg
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/cg.git
    masters: gentoo
    volatile: False

guru
    location: /var/db/repos/guru
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/guru.git
    masters: gentoo
    volatile: False

haarp
    location: /var/db/repos/haarp
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/haarp.git
    masters: gentoo
    volatile: False

kde
    location: /var/db/repos/kde
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/kde.git
    masters: gentoo
    volatile: False

local
    location: /var/db/repos/local
    masters: gentoo
    volatile: False

mv
    location: /var/db/repos/mv
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/mv.git
    masters: gentoo
    volatile: False

nest
    location: /var/db/repos/nest
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/nest.git
    masters: gentoo
    volatile: False

qt
    location: /var/db/repos/qt
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/qt.git
    masters: gentoo
    volatile: False

science
    location: /var/db/repos/science
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/science.git
    masters: gentoo
    volatile: False

wayland-desktop
    location: /var/db/repos/wayland-desktop
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/wayland-desktop.git
    masters: gentoo
    volatile: False

Binary Repositories:

gentoobinhost
    priority: 1
    sync-uri: https://gentoo.osuosl.org/releases/amd64/binpackages/23.0/x86-64

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="@FREE"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=native -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/maven-bin-3.9/conf /usr/share/themes/oxygen-gtk/gtk-3.0 /var/bind"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -march=native -pipe"
DISTDIR="/var/cache/distfiles"
EMERGE_DEFAULT_OPTS=" --quiet-build --load-average=24 --keep-going --jobs=3"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GDK_PIXBUF_MODULE_FILE GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR XDG_STATE_HOME"
FCFLAGS="-O2 -march=native -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance buildpkg-live config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync merge-wait multilib-strict network-sandbox news parallel-fetch pid-sandbox pkgdir-index-trusted preserve-libs protect-owned qa-unresolved-soname-deps sandbox splitdebug strict strict-keepdir unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync warn-on-large-env xattr"
FFLAGS="-O2 -march=native -pipe"
GENTOO_MIRRORS="ftp://mirror.netcologne.de/gentoo/     http://mirror.netcologne.de/gentoo/"
LANG="C.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-z,pack-relative-relocs"
LEX="flex"
MAKEOPTS="-j24"
PKGDIR="/var/cache/binpkgs"
PORTAGE_COMPRESS="zstd"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/tmp"
SHELL="/bin/zsh"
USE="X a52 aac acl acpi activities alsa amd64 bash-completion bluetooth branding bzip2 cairo cdda cdr cet crypt cups dbus declarative dri dts dvd dvdr encode exif flac fontconfig gdbm gif gpm gtk gui heif iconv icu idn ipv6 jpeg jpegxl kde kerberos kf6 kf6compat kwallet lcms libnotify libtirpc mad mng mp3 mp4 mpeg multilib ncurses networkmanager nls numa ogg openexr opengl openmp pam pango pcre pdf pipewire plasma png policykit ppds pulseaudio qml qt5 qt6 readline samba screencast sdl seccomp semantic-desktop sound spell ssl startup-notification svg systemd test-rust tiff truetype udev udisks unicode upower usb v4l vaapi vorbis vulkan wayland widgets wxwidgets x264 x265 xattr xcb xft xml xv xvid zeroconf zlib zsh-completion zstd" ABI_X86="64" ADA_TARGET="gcc_13" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_anon authn_dbm authn_file authz_dbm authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir env expires ext_filter file_cache filter headers include info log_config logio mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2 aes avx avx2 avx512bw avx512cd avx512dq avx512f avx512vbmi avx512vl f16c fma3 pclmul popcnt rdrand sha sse3 sse4_1 sse4_2 sse4a ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax navcom oceanserver oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 tsip tripmate tnt ublox" GUILE_SINGLE_TARGET="3-0" GUILE_TARGETS="3-0" INPUT_DEVICES="libinput" KERNEL="linux" L10N="de en en-GB uk" LCD_DEVICES="bayrad cfontz glk hd44780 lb216 lcdm001 mtxorb text" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php8-2" POSTGRES_TARGETS="postgres16" PYTHON_SINGLE_TARGET="python3_12" PYTHON_TARGETS="python3_12" RUBY_TARGETS="ruby34" VIDEO_CARDS="amdgpu radeon radeonsi nvidia nouveau nvk" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipp2p iface geoip fuzzy condition tarpit sysrq proto logmark ipmark dhcpmac delude chaos account"
Unset:  ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LD, LFLAGS, LIBTOOL, LINGUAS, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PYTHONPATH, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS

=================================================================
                        Package Settings
=================================================================

sci-libs/torchvision-0.19.1::science was built with the following:
USE="cuda -debug -rocm -test" ABI_X86="(64)" PYTHON_SINGLE_TARGET="python3_12 -python3_11"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance buildpkg-live config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync merge-wait multilib-strict network-sandbox news parallel-fetch pid-sandbox pkgdir-index-trusted preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms splitdebug strict strict-keepdir unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync warn-on-large-env xattr
Comment 1 Eugene Shalygin 2025-02-18 11:00:24 UTC
Created attachment 919293 [details]
build log
Comment 3 Larry the Git Cow gentoo-dev 2025-02-21 22:27:54 UTC
The bug has been closed via the following commit(s):

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

commit bd50fd7e4447c27fd54941000e7b1b69c2ea8da1
Author:     Alfredo Tupone <tupone@gentoo.org>
AuthorDate: 2025-02-21 22:26:58 +0000
Commit:     Alfredo Tupone <tupone@gentoo.org>
CommitDate: 2025-02-21 22:27:30 +0000

    sci-libs/torchvision: fix split of NVCC_FLAGS
    
    Closes: https://bugs.gentoo.org/949903
    Signed-off-by: Alfredo Tupone <tupone@gentoo.org>

 sci-libs/torchvision/files/torchvision-0.20.0-gentoo.patch | 11 +++++++++++
 sci-libs/torchvision/torchvision-0.20.0.ebuild             |  2 ++
 2 files changed, 13 insertions(+)