Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 829777 - media-libs/opencv-4.5.4: fails to compile (CUDA; upstream)
Summary: media-libs/opencv-4.5.4: fails to compile (CUDA; upstream)
Status: UNCONFIRMED
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: 2021-12-21 18:29 UTC by Oleg Korsak
Modified: 2023-11-19 21:55 UTC (History)
6 users (show)

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


Attachments
build.log (build.log,58.72 KB, text/plain)
2021-12-21 18:30 UTC, Oleg Korsak
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Oleg Korsak 2021-12-21 18:29:47 UTC
It seems this is a repeating error for any CUDA-enabled package (like tensorflow).
GCC 11.2.1
CUDA 11.5.1-r1

Reproducible: Always

Steps to Reproduce:
1. emerge opencv
2.
3.
Actual Results:  
/usr/lib/gcc/x86_64-pc-linux-gnu/11.2.1/include/g++-v11/bits/std_function.h:435:145: error: parameter packs not expanded with ‘...’:
  435 |         function(_Functor&& __f)
      |                                                                                                                                                 ^ 
/usr/lib/gcc/x86_64-pc-linux-gnu/11.2.1/include/g++-v11/bits/std_function.h:435:145: note:         ‘_ArgTypes’
/usr/lib/gcc/x86_64-pc-linux-gnu/11.2.1/include/g++-v11/bits/std_function.h:530:146: error: parameter packs not expanded with ‘...’:
  530 |         operator=(_Functor&& __f)
      |                                                                                                                                                  ^ 
/usr/lib/gcc/x86_64-pc-linux-gnu/11.2.1/include/g++-v11/bits/std_function.h:530:146: note:         ‘_ArgTypes’
CMake Error at cuda_compile_1_generated_gpu_mat.cu.o.Gentoo.cmake:282 (message):
  Error generating file
  /var/tmp/portage/media-libs/opencv-4.5.4/work/opencv-4.5.4_build-abi_x86_64.amd64/modules/core/CMakeFiles/cuda_compile_1.dir/src/cuda/./cuda_compile_1_generated_gpu_mat.cu.o

Expected Results:  
compiles and installs

Portage 3.0.30 (python 3.10.1-final-0, default/linux/amd64/17.1/desktop/plasma, gcc-11.2.1, glibc-2.34-r4, 5.15.10-gentoo-x86_64 x86_64)
=================================================================
System uname: Linux-5.15.10-gentoo-x86_64-x86_64-Intel-R-_Core-TM-_i7-4710HQ_CPU_@_2.50GHz-with-glibc2.34
KiB Mem:    16313368 total,   2376548 free
KiB Swap:   17300476 total,  17300476 free
Timestamp of repository gentoo: Tue, 21 Dec 2021 17:00:01 +0000
Head commit of repository gentoo: 13be0a858319f0de3874bb05c32e59aa2a61ea63
sh bash 5.1_p12
ld GNU ld (Gentoo 2.37_p1 p1) 2.37
distcc 3.4 x86_64-pc-linux-gnu [disabled]
app-misc/pax-utils:        1.3.3::gentoo
app-shells/bash:           5.1_p12::gentoo
dev-java/java-config:      2.3.1::gentoo
dev-lang/perl:             5.34.0-r6::gentoo
dev-lang/python:           2.7.18_p13::gentoo, 3.7.12_p1::gentoo, 3.8.12_p1::gentoo, 3.9.9::gentoo, 3.10.1-r1::gentoo, 3.11.0_alpha3::gentoo
dev-lang/rust:             1.57.0::gentoo
dev-util/cmake:            3.22.1::gentoo
dev-util/meson:            0.60.2-r1::gentoo
sys-apps/baselayout:       2.8::gentoo
sys-apps/openrc:           0.44.10::gentoo
sys-apps/sandbox:          2.29::gentoo
sys-devel/autoconf:        2.13-r1::gentoo, 2.71-r1::gentoo
sys-devel/automake:        1.16.5::gentoo
sys-devel/binutils:        2.37_p1-r1::gentoo
sys-devel/binutils-config: 5.4::gentoo
sys-devel/clang:           13.0.0::gentoo
sys-devel/gcc:             11.2.1_p20211127::gentoo
sys-devel/gcc-config:      2.5-r1::gentoo
sys-devel/libtool:         2.4.6-r6::gentoo
sys-devel/lld:             13.0.0::gentoo
sys-devel/llvm:            13.0.0::gentoo
sys-devel/make:            4.3::gentoo
sys-kernel/linux-headers:  5.15-r1::gentoo (virtual/os-headers)
sys-libs/glibc:            2.34-r4::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-verify-max-age: 24
    sync-rsync-extra-opts: 
    sync-rsync-verify-jobs: 1
    sync-rsync-verify-metamanifest: no

localrepo
    location: /usr/local/portage
    masters: gentoo

Miezhiko
    location: /var/lib/layman/Miezhiko
    masters: gentoo
    priority: 50

torbrowser
    location: /var/lib/layman/torbrowser
    masters: gentoo
    priority: 50

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=haswell -mmmx -mpopcnt -msse -msse2 -msse3 -mssse3 -msse4.1 -msse4.2 -mavx -mavx2 -mno-sse4a -mno-fma4 -mno-xop -mfma -mno-avx512f -mbmi -mbmi2 -maes -mpclmul -mno-avx512vl -mno-avx512bw -mno-avx512dq -mno-avx512cd -mno-avx512er -mno-avx512pf -mno-avx512vbmi -mno-avx512ifma -mno-avx5124vnniw -mno-avx5124fmaps -mno-avx512vpopcntdq -mno-avx512vbmi2 -mno-gfni -mno-vpclmulqdq -mno-avx512vnni -mno-avx512bitalg -mno-avx512bf16 -mno-avx512vp2intersect -mno-3dnow -mno-adx -mabm -mno-cldemote -mno-clflushopt -mno-clwb -mno-clzero -mcx16 -mno-enqcmd -mf16c -mfsgsbase -mfxsr -mno-hle -msahf -mno-lwp -mlzcnt -mmovbe -mno-movdir64b -mno-movdiri -mno-mwaitx -mno-pconfig -mno-pku -mno-prefetchwt1 -mno-prfchw -mno-ptwrite -mno-rdpid -mrdrnd -mno-rdseed -mno-rtm -mno-serialize -mno-sgx -mno-sha -mno-shstk -mno-tbm -mno-tsxldtrk -mno-vaes -mno-waitpkg -mno-wbnoinvd -mxsave -mno-xsavec -mxsaveopt -mno-xsaves -mno-amx-tile -mno-amx-int8 -mno-amx-bf16 -mno-uintr -mno-hreset -mno-kl -mno-widekl -mno-avxvnni --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=6144 -mtune=haswell"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /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/terminfo"
CXXFLAGS="-O2 -pipe -march=haswell -mmmx -mpopcnt -msse -msse2 -msse3 -mssse3 -msse4.1 -msse4.2 -mavx -mavx2 -mno-sse4a -mno-fma4 -mno-xop -mfma -mno-avx512f -mbmi -mbmi2 -maes -mpclmul -mno-avx512vl -mno-avx512bw -mno-avx512dq -mno-avx512cd -mno-avx512er -mno-avx512pf -mno-avx512vbmi -mno-avx512ifma -mno-avx5124vnniw -mno-avx5124fmaps -mno-avx512vpopcntdq -mno-avx512vbmi2 -mno-gfni -mno-vpclmulqdq -mno-avx512vnni -mno-avx512bitalg -mno-avx512bf16 -mno-avx512vp2intersect -mno-3dnow -mno-adx -mabm -mno-cldemote -mno-clflushopt -mno-clwb -mno-clzero -mcx16 -mno-enqcmd -mf16c -mfsgsbase -mfxsr -mno-hle -msahf -mno-lwp -mlzcnt -mmovbe -mno-movdir64b -mno-movdiri -mno-mwaitx -mno-pconfig -mno-pku -mno-prefetchwt1 -mno-prfchw -mno-ptwrite -mno-rdpid -mrdrnd -mno-rdseed -mno-rtm -mno-serialize -mno-sgx -mno-sha -mno-shstk -mno-tbm -mno-tsxldtrk -mno-vaes -mno-waitpkg -mno-wbnoinvd -mxsave -mno-xsavec -mxsaveopt -mno-xsaves -mno-amx-tile -mno-amx-int8 -mno-amx-bf16 -mno-uintr -mno-hreset -mno-kl -mno-widekl -mno-avxvnni --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=6144 -mtune=haswell"
DISTDIR="/usr/portage/distfiles"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY 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"
FCFLAGS="-O2 -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 multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-fallow-argument-mismatch"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="lv_LV.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="ru en"
MAKEOPTS="-j9"
PKGDIR="/usr/portage/packages"
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="7zip X a52 aac acl acpi activities alsa amd64 ao audiofile avx avx2 bluetooth branding bzip2 cairo cdda cdr clang cli crypt cuda cups curl cxx dbus declarative dhcpcd dri dts dvd dvdr elogind emboss encode exif extraengine fat fbcon ffmpeg flac gcrypt gd gdbm gif gimp git gles2 glut gmp gnuplot gnutls gpg gpm gsl gtk gtk3 gudev gui gzip hddtemp heif iconv icu ieee1394 inotify ipv6 javascript jemalloc jpeg jpeg2k kde kipi kwallet lame lcms ldac legacy-systray libglvnd libnotify libtirpc lm_sensors lzma lzo mad matroska mdnsresponder-compat memlimit mhash mime minizip mmap mmx mng modules mozilla mp3 mp4 mpeg mplayer mtp multitarget ncurses networkmanager nls nocd nptl nsplugin ntfs ogg openal opencl opengl openmp pam pango pch pcntl pcre pdf pie pipewire plasma plotutils png policykit portaudio posix postgres ppds profile pulseaudio python qml qt5 quicktime raw rdesktop readline recode resolvconf sasl scrypt sdl sdl2 seccomp session sharedmem slang smp sockets sound spell split-usr sqlite sqlite3 sse sse2 sse3 sse4_1 sse4_2 ssl ssse3 startup-notification steamruntime suid svg symlink syslog sysvipc szip tcmalloc theora threads tiff truetype udev udisks unicode upower usb v4l vaapi vdpau vhosts videos vnc vorbis vulkan wavpack webkit widgets wifi wxwidgets x264 xattr xcb xcomposite xml xmp xmpp xosd xpm xsl xv xvid zeroconf zlib" ABI_X86="64" ADA_TARGET="gnat_2020" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache 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="aes avx avx2 fma3 mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3 f16c" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="efi-64 pc" INPUT_DEVICES="evdev synaptics libinput wacom" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LLVM_TARGETS="AMDGPU BPF NVPTX ARM X86 AArch64 Hexagon MSP430 Mips PowerPC Sparc SystemZ XCore Lanai RISCV" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-7" POSTGRES_TARGETS="postgres14" PYTHON_SINGLE_TARGET="python3_9" PYTHON_TARGETS="python3_10 python3_9" QEMU_SOFTMMU_TARGETS="aarch64 arm x86_64" QEMU_USER_TARGETS="aarch64 arm x86_64" RUBY_TARGETS="ruby27 ruby30" USERLAND="GNU" VIDEO_CARDS="i965 nvidia" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq proto steal rawnat 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, LEX, LFLAGS, LIBTOOL, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS
Comment 1 Oleg Korsak 2021-12-21 18:30:13 UTC
Created attachment 759991 [details]
build.log
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-12-21 18:37:33 UTC
CUDA bug. Soap has reported it upstream and they've acknowledged it. We hope it can be fixed in time for GCC 11.3.

Try GCC 11.2.
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-01-18 16:07:29 UTC
The nvidia bug tracker is private but it's been confirmed that it should be fixed soon, possibly in the next CUDA release.
Comment 4 Vasily A. Lebedev 2023-11-19 21:55:08 UTC
I successfully worked around it with nvidia-cuda-toolkit-12.3.0, gcc-12.3.1, and opencv-4.8.1

I've faced another pure opencv bug that does not appear to be reported here yet, but since it was resolved in the opencv upstream https://github.com/opencv/opencv/pull/24104 , I just applied the corresponding patch https://github.com/opencv/opencv/commit/ab8cb6f8a9034da2a289b84685c6d959266029be.patch , so, finally, I have a working opencv[cuda] now.