During the install phase, after successfully compiling, the ebuild attempts to delete the following directory: '/var/tmp/portage/media-libs/opencv-4.6.0-r2/work/opencv-4.6.0_build-abi_amd64/modules/python3'-- which does not exist. A temporary solution I found is to just manually cd into 'modules' and create an empty 'python3' directory while the package is being compiled. This will allow the ebuild to succesfully install. But the workaround has to be repeated every time media-libs/opencv has to be re-emerged for some reason. The failing command of the ebuild script is: "rm -r modules/python3". I believe the solution would just be to remove the aforementioned command from the ebuild script. Below is the full output of 'emerge --info': emerge --info media-libs/opencv Portage 3.0.39 (python 3.10.8-final-0, default/linux/amd64/17.1/desktop/plasma/systemd, gcc-12, glibc-2.36-r6, 6.0.10-gentoo-x86_64 x86_64) ================================================================= System Settings ================================================================= System uname: Linux-6.0.10-gentoo-x86_64-x86_64-11th_Gen_Intel-R-_Core-TM-_i5-11400_@_2.60GHz-with-glibc2.36 KiB Mem: 32735816 total, 25460292 free KiB Swap: 0 total, 0 free Timestamp of repository gentoo: Sun, 27 Nov 2022 20:30:01 +0000 Head commit of repository gentoo: 4cca97c003a0e5515369f8372d6ea6b3320ff795 sh bash 5.2_p12 ld GNU ld (Gentoo 2.39 p5) 2.39.0 app-misc/pax-utils: 1.3.5::gentoo app-shells/bash: 5.2_p12::gentoo dev-lang/perl: 5.36.0-r1::gentoo dev-lang/python: 3.10.8_p3::gentoo, 3.11.0_p2::gentoo dev-lang/rust: 1.65.0::gentoo dev-util/cmake: 3.25.0::gentoo dev-util/meson: 0.64.1::gentoo sys-apps/baselayout: 2.9::gentoo sys-apps/sandbox: 2.29::gentoo sys-apps/systemd: 252.2::gentoo sys-devel/autoconf: 2.13-r7::gentoo, 2.71-r5::gentoo sys-devel/automake: 1.16.5::gentoo sys-devel/binutils: 2.39-r4::gentoo sys-devel/binutils-config: 5.4.1::gentoo sys-devel/clang: 15.0.5::gentoo sys-devel/gcc: 12.2.1_p20221008::gentoo sys-devel/gcc-config: 2.8::gentoo sys-devel/libtool: 2.4.7::gentoo sys-devel/lld: 15.0.5::gentoo sys-devel/llvm: 15.0.5::gentoo sys-devel/make: 4.4::gentoo sys-kernel/linux-headers: 6.0::gentoo (virtual/os-headers) sys-libs/glibc: 2.36-r6::gentoo Repositories: gentoo location: /var/db/repos/gentoo sync-type: rsync sync-uri: rsync://rsync.gentoo.org/gentoo-portage priority: -1000 sync-rsync-extra-opts: sync-rsync-verify-jobs: 1 sync-rsync-verify-max-age: 24 sync-rsync-verify-metamanifest: yes ACCEPT_KEYWORDS="amd64 ~amd64" ACCEPT_LICENSE="*" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=rocketlake -O2 -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/terminfo" CXXFLAGS="-march=rocketlake -O2 -pipe" DISTDIR="/var/cache/distfiles" EMERGE_DEFAULT_OPTS="--jobs 12 --load-average=12" 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 XDG_STATE_HOME" FCFLAGS="-march=rocketlake -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="-march=rocketlake -O2 -pipe" GENTOO_MIRRORS="https://gentoo.c3sl.ufpr.br/ http://gentoo.c3sl.ufpr.br/ rsync://gentoo.c3sl.ufpr.br/gentoo/" LANG="pt_BR.utf8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" MAKEOPTS="-j12" 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 bindist bluetooth branding bzip2 cairo cdda cdr cli crypt cups dbus declarative discover dri dts dvd dvdr encode exif ffmpeg flac fortran gdbm gif gmp-autoupdate gpm grub gui iconv icu initramfs ipv6 jack jpeg kde kwallet lcms libglvnd libnotify libtirpc mad mng mp3 mp4 mpeg multilib ncurses nls nptl ogg opengl openmp pam pango pcre pdf pipewire pipewire-alsa plasma png policykit ppds pulseaudio qml qt5 readline sdl seccomp semantic-desktop sound-server spell split-usr ssl startup-notification svg symlink systemd test-rust tiff truetype udev udisks unicode upower usb vorbis widgets wxwidgets x264 xattr xcb xml xv xvid zlib" ABI_X86="64" ADA_TARGET="gnat_2021" 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="mmx mmxext sse sse2" 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" INPUT_DEVICES="libinput" KERNEL="linux" L10N="pt-BR" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-4 php8-0" POSTGRES_TARGETS="postgres12 postgres13" PYTHON_SINGLE_TARGET="python3_10" PYTHON_TARGETS="python3_10" RUBY_TARGETS="ruby27" USERLAND="GNU" VIDEO_CARDS="amdgpu radeonsi intel" 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, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LD, LEX, LFLAGS, LIBTOOL, LINGUAS, 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 ================================================================= Package Settings ================================================================= media-libs/opencv-4.6.0-r2::gentoo was built with the following: USE="contrib contribdnn eigen features2d ffmpeg jpeg opengl openmp png python qt5 tiff -contribcvv -contribfreetype -contribhdf (-contribovis) -contribsfm -contribxfeatures2d -cuda -debug -dnnsamples -download -examples -gdal -gflags -glog -gphoto2 -gstreamer -gtk3 -ieee1394 -java -jpeg2k -lapack -lto -opencl -opencvapps -openexr -tesseract -testprograms -threads -v4l -vaapi -vtk -webp -xine" ABI_X86="(64) -32 (-x32)" CPU_FLAGS_X86="sse sse2 -avx -avx2 -avx512f -f16c -fma3 -popcnt -sse3 -sse4_1 -sse4_2 -ssse3" PYTHON_TARGETS="python3_10 -python3_11 -python3_8 -python3_9"
Note: I was only able to merge the package after doing the workaround I've mentioned.
build.log? probably a duplicate of bug #882411, but can't tell if cause is the same without the log
(In reply to Ionen Wolkens from comment #2) > build.log? probably a duplicate of bug #882411, but can't tell if cause is > the same without the log Sorry I don't have portage's logging option enabled. Where do I find the file you are asking?
(In reply to LordOfForever from comment #3) > (In reply to Ionen Wolkens from comment #2) > > build.log? probably a duplicate of bug #882411, but can't tell if cause is > > the same without the log > > Sorry I don't have portage's logging option enabled. > Where do I find the file you are asking? FEATURES="keeptemp" emerge -va media-libs/opencv
Or just merge it again without the workaround.
(In reply to Ionen Wolkens from comment #2) > build.log? probably a duplicate of bug #882411, but can't tell if cause is > the same without the log I guess didn't benefit from eclass change (can't check why not right now), may be worth masking the bad version(s) of setuptools to prevent more of these (as people with them installed get a message at least)
(In reply to Sam James from comment #6) > I guess didn't benefit from eclass change (can't check why not right now), > may be worth masking the bad version(s) of setuptools to prevent more of > these (as people with them installed get a message at least) Yeah this is ~arch and it changes nothing there given 65.6.0 is a bad version and eclass does >=65.5.1. To do it through eclass, while keeping current stable, would need something like: || ( ( >=65.5.1 <65.6 ) >=65.6.1 ) ...but that won't help opencv either way given it doesn't use distutils-r1, and setuptools is being indirectly used through numpy.
(In reply to Ionen Wolkens from comment #7) > || ( ( >=65.5.1 <65.6 ) >=65.6.1 ) Or from a quick look at changelogs, I guess need >=65.6.3? I didn't really follow this whole thing and what's affected.
I added `mkdir -p modules/python3` above `rm -r modules/python3 || die "rm failed"` in the opencv ebuild, and this fixed it for me. My overlay with the patched OpenCV: https://github.com/NTULINUX/ntu_overlay/tree/main/media-libs/opencv
Created attachment 851506 [details] opencv ebuild that installs This is probably not the right way to fix it, but I needed it fixed so I just did a quick `mkdir` hack.
(In reply to Alec Ari from comment #10) > Created attachment 851506 [details] > opencv ebuild that installs > > This is probably not the right way to fix it, but I needed it fixed so I > just did a quick `mkdir` hack. The right way to fix it is to emerge -v1 setuptools as a one-off, no?
*** Bug 905835 has been marked as a duplicate of this bug. ***
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0e9205edb9922309ecd568b7085fd59726c7d2ca commit 0e9205edb9922309ecd568b7085fd59726c7d2ca Author: Paul Zander <negril.nx+gentoo@gmail.com> AuthorDate: 2023-12-08 14:58:23 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2024-01-10 12:32:37 +0000 media-libs/opencv: add 4.8.1-r1 Closes: https://bugs.gentoo.org/702258 Closes: https://bugs.gentoo.org/830294 Closes: https://bugs.gentoo.org/883375 Closes: https://bugs.gentoo.org/913740 Closes: https://bugs.gentoo.org/914922 Closes: https://bugs.gentoo.org/917121 Signed-off-by: Paul Zander <negril.nx+gentoo@gmail.com> Signed-off-by: Sam James <sam@gentoo.org> media-libs/opencv/Manifest | 7 + .../files/opencv-4.8.1-ade-0.1.2a.tar.gz.patch | 18 + .../opencv-4.8.1-drop-python2-detection.patch | 23 + ...ncv-4.8.1-eliminate-lto-compiler-warnings.patch | 36 ++ .../opencv/files/opencv-4.8.1-libpng16.patch | 58 ++ .../opencv/files/opencv-4.8.1-opencv_test.patch | 18 + .../files/opencv-4.8.1-python3_12-support.patch | 25 + .../opencv-4.8.1-use-system-flatbuffers.patch | 36 ++ .../files/opencv-4.8.1-use-system-opencl.patch | 25 + ...rib-4.8.1-NVIDIAOpticalFlowSDK-2.0.tar.gz.patch | 20 + .../opencv/files/opencv_contrib-4.8.1-rgbd.patch | 15 + media-libs/opencv/metadata.xml | 34 +- media-libs/opencv/opencv-4.8.1-r1.ebuild | 644 +++++++++++++++++++++ 13 files changed, 945 insertions(+), 14 deletions(-)