Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 945333 - media-libs/opencv-4.10.0 fails to emerge with cuda dev-util/nvidia-cuda-toolkit-12.4.1
Summary: media-libs/opencv-4.10.0 fails to emerge with cuda dev-util/nvidia-cuda-too...
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: 2024-11-29 12:08 UTC by Benjamin Schulz
Modified: 2024-12-05 18:01 UTC (History)
3 users (show)

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


Attachments
build.log (build.log,9.85 KB, text/plain)
2024-12-03 16:32 UTC, Benjamin Schulz
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Benjamin Schulz 2024-11-29 12:08:45 UTC
* Applying opencv_contrib-4.10.0-CUDA-12.6-tuple_size.patch ...                                                                                                            [ ok ]
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/media-libs/opencv-4.10.0/work/opencv-4.10.0 ...
 * abi_x86_64.amd64: running multilib-minimal_abi_src_configure
 * Trying to find working CUDA host compiler
 * testing x86_64-pc-linux-gnu-g++-14 (default) ...                                                                                                                         [ !! ]
 * testing x86_64-pc-linux-gnu-g++-13 ...                                                                                                                                   [ !! ]
 * testing x86_64-pc-linux-gnu-g++- ...                                                                                                                                     [ !! ]
best_version: Invalid atom: <
 * ERROR: media-libs/opencv-4.10.0::gentoo failed (configure phase):
 *   best_version: invalid atom: <
 * 
 * Call stack:
 *          ebuild.sh, line  136:  Called src_configure
 *        environment, line 5638:  Called cmake-multilib_src_configure
 *        environment, line 1357:  Called multilib-minimal_src_configure
 *        environment, line 4260:  Called multilib_foreach_abi 'multilib-minimal_abi_src_configure'
 *        environment, line 4510:  Called multibuild_foreach_variant '_multilib_multibuild_wrapper' 'multilib-minimal_abi_src_configure'
 *        environment, line 4215:  Called _multibuild_run '_multilib_multibuild_wrapper' 'multilib-minimal_abi_src_configure'
 *        environment, line 4213:  Called _multilib_multibuild_wrapper 'multilib-minimal_abi_src_configure'
 *        environment, line  593:  Called multilib-minimal_abi_src_configure
 *        environment, line 4254:  Called multilib_src_configure
 *        environment, line 4803:  Called cuda_get_host_compiler
 *        environment, line 1846:  Called best_version '<'
 *   phase-helpers.sh, line  925:  Called ___best_version_and_has_version_common '<'
 *   phase-helpers.sh, line  896:  Called die
 * The specific snippet of code:
 *                      die "${FUNCNAME[1]}: invalid atom: ${atom}"
 * 
 * If you need support, post the output of `emerge --info '=media-libs/opencv-4.10.0::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=media-libs/opencv-4.10.0::gentoo'`.
!!! When you file a bug report, please include the following information:
GENTOO_VM=  CLASSPATH="" JAVA_HOME="/etc/java-config-2/current-system-vm"
JAVACFLAGS="" COMPILER=""
and of course, the output of emerge --info =media-libs/opencv-4.10.0
 * The complete build log is located at '/var/tmp/portage/media-libs/opencv-4.10.0/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/media-libs/opencv-4.10.0/temp/environment'.
 * Working directory: '/var/tmp/portage/media-libs/opencv-4.10.0/work/opencv-4.10.0_build-abi_x86_64.amd64'
 * S: '/var/tmp/portage/media-libs/opencv-4.10.0/work/opencv-4.10.0'
 * ERROR: media-libs/opencv-4.10.0::gentoo failed (configure phase):
 *   could not find a supported version of x86_64-pc-linux-gnu-g++
 * 
 * Call stack:
 *     ebuild.sh, line  136:  Called src_configure
 *   environment, line 5638:  Called cmake-multilib_src_configure
 *   environment, line 1357:  Called multilib-minimal_src_configure
 *   environment, line 4260:  Called multilib_foreach_abi 'multilib-minimal_abi_src_configure'
 *   environment, line 4510:  Called multibuild_foreach_variant '_multilib_multibuild_wrapper' 'multilib-minimal_abi_src_configure'
 *   environment, line 4215:  Called _multibuild_run '_multilib_multibuild_wrapper' 'multilib-minimal_abi_src_configure'
 *   environment, line 4213:  Called _multilib_multibuild_wrapper 'multilib-minimal_abi_src_configure'
 *   environment, line  593:  Called multilib-minimal_abi_src_configure
 *   environment, line 4254:  Called multilib_src_configure
 *   environment, line 4803:  Called cuda_get_host_compiler
 *   environment, line 1847:  Called die
 * The specific snippet of code:
 *                   die "could not find a supported version of ${compiler}";
 * 
 * If you need support, post the output of `emerge --info '=media-libs/opencv-4.10.0::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=media-libs/opencv-4.10.0::gentoo'`.
!!! When you file a bug report, please include the following information:
GENTOO_VM=  CLASSPATH="" JAVA_HOME="/etc/java-config-2/current-system-vm"
JAVACFLAGS="" COMPILER=""
and of course, the output of emerge --info =media-libs/opencv-4.10.0
 * The complete build log is located at '/var/tmp/portage/media-libs/opencv-4.10.0/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/media-libs/opencv-4.10.0/temp/environment'.
 * Working directory: '/var/tmp/portage/media-libs/opencv-4.10.0/work/opencv-4.10.0_build-abi_x86_64.amd64'
 * S: '/var/tmp/portage/media-libs/opencv-4.10.0/work/opencv-4.10.0'



Reproducible: Always




emerge --info
Portage 3.0.66.1 (python 3.12.7-final-0, default/linux/amd64/23.0/desktop/plasma, gcc-14, glibc-2.40-r5, 6.11.6-gentoo-x86_64 x86_64)
=================================================================
System uname: Linux-6.11.6-gentoo-x86_64-x86_64-AMD_Ryzen_9_3900X_12-Core_Processor-with-glibc2.40
KiB Mem:    32792468 total,  24092492 free
KiB Swap:   31249404 total,  29847292 free
Timestamp of repository gentoo: Fri, 29 Nov 2024 09:30:00 +0000
Head commit of repository gentoo: 40859fedc12c0b9246f06bd3edb5e4e3a51a263f
Timestamp of repository escpr2: Thu, 31 Oct 2024 18:34:26 +0000
Head commit of repository escpr2: f2c923b8c651f1d14744975f879c2c78f6e5f8f9

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.17-r1::gentoo
dev-build/cmake:           3.31.1::gentoo
dev-build/libtool:         2.5.4::gentoo
dev-build/make:            4.4.1-r100::gentoo
dev-build/meson:           1.6.0::gentoo
dev-java/java-config:      2.3.4::gentoo
dev-lang/perl:             5.40.0::gentoo
dev-lang/python:           3.12.7_p1::gentoo, 3.13.0::gentoo
dev-lang/rust-bin:         1.81.0-r100::gentoo, 1.82.0-r100::gentoo
sys-apps/baselayout:       2.17::gentoo
sys-apps/openrc:           0.55.1::gentoo
sys-apps/sandbox:          2.40::gentoo
sys-devel/binutils:        2.43-r2::gentoo
sys-devel/binutils-config: 5.5.2::gentoo
sys-devel/clang:           18.1.8-r6::gentoo
sys-devel/gcc:             13.3.1_p20241115::gentoo, 14.2.1_p20241116::gentoo
sys-devel/gcc-config:      2.11::gentoo
sys-devel/lld:             18.1.8::gentoo, 19.1.4::gentoo
sys-devel/llvm:            18.1.8-r6::gentoo, 19.1.4::gentoo
sys-kernel/linux-headers:  6.11::gentoo (virtual/os-headers)
sys-libs/glibc:            2.40-r5::gentoo
Repositories:

gentoo
    location: /var/db/repos/gentoo
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    volatile: False
    sync-rsync-verify-max-age: 3
    sync-rsync-verify-jobs: 1
    sync-rsync-verify-metamanifest: yes
    sync-rsync-extra-opts: 

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

Binary Repositories:

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

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="@FREE @BINARY-REDISTRIBUTABLE NVIDIA-CUDA NVIDIA EPSON-EULA NVIDIA-cuDNN google-chrome all-rights-reserved android"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O3 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt"
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="-march=native -O3 -pipe"
DISTDIR="/var/cache/distfiles"
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="-march=native -O3 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance binpkg-request-signature buildpkg-live config-protect-if-modified distlocks ebuild-locks fixlafiles getbinpkg 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 strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-march=native -O3 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="de_DE.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-z,pack-relative-relocs"
LEX="flex"
PKGDIR="/var/cache/binpkgs"
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="/var/tmp"
SHELL="/bin/bash"
USE="X a52 aac acl acpi activities alsa amd64 bluetooth branding bzip2 cairo cdda cdr cet contrib crypt cuda cudnn cups dbus declarative dri dts dvd dvdr dvi elogind encode eps exif fits flac fortran gdbm gdbui gif gnutls go gphoto2 gpm graphite gtk gui iconv icu ipv6 jit jpeg kde kf6compat kwallet lcms libnotify libtirpc lm-sensors lto mad mng modules-sign mp3 mp4 mpeg multilib ncurses networkmanager nls nvenc objc objc++ offload ogg ompt opencv opengl openmp pam pango pcre pdf pipewire plasma png policykit postscript ppds pulseaudio qml qt5 qt6 raw readline rust screencast sdl seccomp semantic-desktop sound spell ssl startup-notification svg test-rust tiff tpm truetype udev udisks uefi unicode upower usb vorbis vulkan wayland wcs widgets wxwidgets x264 xattr xcb xft xml xv xvid zlib" ABI_X86="64" ADA_TARGET="gcc_12" 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 f16c fma3 pclmul popcnt rdrand sha sse3 sse4_1 sse4_2 sse4a ssse3" CURL_QUIC="ngtcp2" CURL_SSL="gnutls" 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" 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="ruby32" VIDEO_CARDS="nvidia" 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, EMERGE_DEFAULT_OPTS, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LD, LFLAGS, LIBTOOL, LINGUAS, MAKE, MAKEFLAGS, MAKEOPTS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PYTHONPATH, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS
Comment 1 Benjamin Schulz 2024-12-03 16:32:10 UTC
Created attachment 913250 [details]
build.log
Comment 2 Vlad Bolshakov 2024-12-04 14:18:44 UTC
Have had this recently. As a temporary solution defined NVCC_CCBIN to gcc12 before emerging opencv.
Comment 3 Paul Zander 2024-12-05 11:01:56 UTC
Seems cuda-12.4.1 doesn't adhere to the NVCC_CCBIN env variable. What blocks cuda-12.6 for you guys?

The opencv fix itself is easy, but I'd like to look at the other side as well.
Comment 4 Benjamin Schulz 2024-12-05 16:08:38 UTC
In my case, 

   <dev-util/nvidia-cuda-toolkit-12.5:0/12.4.1=[profiler] 

required by (sci-libs/caffe2-2.5.1-r3:0/0::gentoo, installed) 


USE="cuda numpy opencl openmp -distributed -fbgemm -flash -gloo -mkl -mpi -nnpack -onednn -openblas -qnnpack -rocm -xnnpack" ABI_X86="(64)" AMDGPU_TARGETS="gfx1030 gfx1100 gfx906 gfx908 gfx90a gfx942 -gfx1010 -gfx1011 -gfx1012 -gfx1031 -gfx1101 -gfx1102 -gfx803 -gfx900 -gfx940 -gfx941" PYTHON_SINGLE_TARGET="python3_12 -python3_10 -python3_11"
    ^                             ^^^^^^^^^^^^^^          
So caffe2 prevents a cuda upgrade. I have filed a separate bug on this a few days ago: https://bugs.gentoo.org/945331
Comment 5 Larry the Git Cow gentoo-dev 2024-12-05 18:01:44 UTC
The bug has been closed via the following commit(s):

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

commit 76ad930669a5078e69470a7aed8728f23daba43a
Author:     Paul Zander <negril.nx+gentoo@gmail.com>
AuthorDate: 2024-12-05 11:05:45 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-12-05 18:01:17 +0000

    media-libs/opencv: explicitly pass NVCC_CCBIN to fix <=cuda-12.4.1
    
    Closes: https://bugs.gentoo.org/945333
    Signed-off-by: Paul Zander <negril.nx+gentoo@gmail.com>
    Signed-off-by: Sam James <sam@gentoo.org>

 media-libs/opencv/opencv-4.10.0.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)