[ebuild N ~] dev-python/PyQt6-6.5.2::gentoo USE="dbus designer gui multimedia network opengl printsupport qml serialport sql ssl svg webchannel websockets widgets xml -debug -examples -gles2-only -help -positioning -quick -quick3d -spatialaudio -testlib" PYTHON_TARGETS="python3_11 -python3_10 -python3_12" The build fails with: Generating the .pro file for the QtWebSockets module... Generating the top-level .pro file... Generating the Makefiles... /usr/lib64/qt6/bin/qmake -recursive PyQt6.pro gpep517: '/usr/lib64/qt6/bin/qmake -recursive PyQt6.pro' failed returning 3 Project ERROR: Cannot run compiler 'g++'. Output: =================== =================== Maybe you forgot to setup the environment? Reproducible: Always Portage 3.0.49 (python 3.11.5-final-0, default/linux/amd64/17.1/systemd/merged-usr, gcc-12, glibc-2.37-r3, 6.5.0-gentoo x86_64) ================================================================= System uname: Linux-6.5.0-gentoo-x86_64-Processor-with-glibc2.37 KiB Mem: 64946500 total, 40111984 free KiB Swap: 0 total, 0 free Timestamp of repository gentoo: Sat, 02 Sep 2023 07:00:01 +0000 Head commit of repository gentoo: b699daad47d1796f725f774c8e36ec4d8e71f55e sh bash 5.1_p16-r6 ld GNU ld (Gentoo 2.40 p5) 2.40.0 distcc 3.4 x86_64-pc-linux-gnu [disabled] ccache version 4.8.2 [disabled] app-misc/pax-utils: 1.3.5::gentoo app-shells/bash: 5.1_p16-r6::gentoo dev-java/java-config: 2.3.1-r1::gentoo dev-lang/perl: 5.38.0-r1::gentoo dev-lang/python: 3.10.13::gentoo, 3.11.5::gentoo dev-lang/rust: 1.69.0-r1::gentoo dev-util/ccache: 4.8.2::gentoo dev-util/cmake: 3.26.5-r2::gentoo dev-util/meson: 1.1.1::gentoo sys-apps/baselayout: 2.14::gentoo sys-apps/sandbox: 2.37::gentoo sys-apps/systemd: 253.6::gentoo sys-devel/autoconf: 2.13-r7::gentoo, 2.71-r6::gentoo sys-devel/automake: 1.16.5-r1::gentoo sys-devel/binutils: 2.40-r5::gentoo sys-devel/binutils-config: 5.5::gentoo sys-devel/clang: 14.0.6-r4::gentoo, 15.0.7-r3::gentoo, 16.0.6::gentoo sys-devel/gcc: 11.3.1_p20230427::gentoo, 12.3.1_p20230526::gentoo sys-devel/gcc-config: 2.11::gentoo sys-devel/libtool: 2.4.7-r1::gentoo sys-devel/lld: 15.0.7::gentoo, 16.0.6::gentoo sys-devel/llvm: 14.0.6-r4::gentoo, 15.0.7-r3::gentoo, 16.0.6::gentoo sys-devel/make: 4.4.1-r1::gentoo sys-kernel/linux-headers: 6.1::gentoo (virtual/os-headers) sys-libs/glibc: 2.37-r3::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-metamanifest: yes sync-rsync-verify-max-age: 24 sync-rsync-verify-jobs: 1 sync-rsync-extra-opts: ACCEPT_KEYWORDS="amd64" ACCEPT_LICENSE="@FREE" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=native -O3 -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /etc/stunnel/stunnel.conf /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/themes/oxygen-gtk/gtk-2.0 /usr/share/themes/oxygen-gtk/gtk-3.0" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php8.1/ext-active/ /etc/php/cgi-php8.1/ext-active/ /etc/php/cli-php8.1/ext-active/ /etc/php/fpm-php8.1/ext-active/ /etc/php/phpdbg-php8.1/ext-active/ /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" EMERGE_DEFAULT_OPTS="--with-bdeps y --verbose-conflicts" 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 buildpkg buildpkg-live candy config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch parallel-install pid-sandbox 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://ftp.fau.de/gentoo" LANG="de_DE.UTF-8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" LEX="flex" MAKEOPTS="-j4" 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" RUSTFLAGS="-C target-cpu=native" SHELL="/bin/bash" USE="acl amd64 bzip2 cli crypt dri fortran gdbm iconv ipv6 libtirpc multilib ncurses nls nptl openmp pam pcre perl python readline seccomp ssl systemd test-rust udev unicode xattr 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="aes avx avx2 avx512f avx512dq avx512cd avx512bw avx512vl avx512vbmi f16c fma3 mmx mmxext pclmul popcnt rdrand sha sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3" 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" INPUT_DEVICES="evdev wacom" KERNEL="linux" L10N="de" LCD_DEVICES="curses hd44780 lcd2usb sureelec" LIBREOFFICE_EXTENSIONS="wiki-publisher" LLVM_TARGETS="AArch64 ARM BPF RISCV WebAssembly" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php8-1" POSTGRES_TARGETS="postgres15" PYTHON_SINGLE_TARGET="python3_11" PYTHON_TARGETS="python3_11" QEMU_SOFTMMU_TARGETS="arm aarch64 i386 x86_64" QEMU_USER_TARGETS="arm aarch64 i386 x86_64" RUBY_TARGETS="ruby31" VIDEO_CARDS="amdgpu nvidia radeon radeonsi" 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, LFLAGS, LIBTOOL, LINGUAS, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RANLIB, READELF, SIZE, STRINGS, STRIP, YACC, YFLAGS
Created attachment 869218 [details] build log
What does the following two commands show? (assuming build dir exists) ls -l /var/tmp/portage/dev-python/PyQt6-6.5.2/temp/cxx /var/tmp/portage/dev-python/PyQt6-6.5.2/temp/cxx/g++ --version
ls -l /var/tmp/portage/dev-python/PyQt6-6.5.2/temp/cxx total 0 lrwxrwxrwx 1 portage portage 48 Sep 2 13:14 clang++ -> /usr/lib/llvm/16/bin/x86_64-pc-linux-gnu-clang++ lrwxrwxrwx 1 portage portage 32 Sep 2 13:14 g++ -> /usr/bin/x86_64-pc-linux-gnu-g++ /var/tmp/portage/dev-python/PyQt6-6.5.2/temp/cxx/g++ --version g++ (Gentoo 12.3.1_p20230526 p2) 12.3.1 20230526 Copyright (C) 2022 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE
That looks normal, strange. Anything special about your system? Like security features that may have potentially prevented the portage user (but not root) from executing that g++ through a symlink. Don't really have ideas beside that right now (can't reproduce).
No, I have no special mount options, SELinux policies or anything else I can think of in place on that system. Portage can call the g++ symlink (tested with "su portage -s /bin/bash"). But your comment gave me the idea to try FEATURES="-sandbox -userpriv -usersandbox" for this build which completed successfully. So I'd call it a workaround but not solved.
I doubt(?) sandbox/usersandbox would have an impact, but -userpriv would make it run as root, so it may indeed be a permission problem somewhere (qmake doesn't help by hiding errors). Maybe this could reveal something: namei -mo /var/tmp/portage/dev-python/PyQt6-6.5.2/temp/cxx/g++ For me it looks like: f: /var/tmp/portage/dev-python/PyQt6-6.5.2/temp/cxx/g++ drwxr-xr-x root root / drwxr-xr-x root root var drwxrwxrwt root root tmp drwxrwxr-x portage portage portage drwxrwxr-x portage portage dev-python drwx------ portage portage PyQt6-6.5.2 drwxr-xr-x portage portage temp drwxr-xr-x portage portage cxx lrwxrwxrwx portage portage g++ -> /usr/bin/x86_64-pc-linux-gnu-g++ drwxr-xr-x root root / drwxr-xr-x root root usr drwxr-xr-x root root bin lrwxrwxrwx root root x86_64-pc-linux-gnu-g++ -> /usr/x86_64-pc-linux-gnu/gcc-bin/13/x86_64-pc-linux-gnu-g++ drwxr-xr-x root root / drwxr-xr-x root root usr drwxr-xr-x root root x86_64-pc-linux-gnu drwxr-xr-x root root gcc-bin drwxr-xr-x root root 13 -rwxr-xr-x root root x86_64-pc-linux-gnu-g++
Then again if portage user was able to run it I guess this wouldn't add up.
namei looks identical (with 12 instead of 13 on your system): f: /var/tmp/portage/dev-python/PyQt6-6.5.2/temp/cxx/g++ drwxr-xr-x root root / drwxr-xr-x root root var drwxrwxrwt root root tmp drwxrwxr-x portage portage portage drwxrwxr-x portage portage dev-python drwx------ portage portage PyQt6-6.5.2 drwxr-xr-x portage portage temp drwxr-xr-x portage portage cxx lrwxrwxrwx portage portage g++ -> /usr/bin/x86_64-pc-linux-gnu-g++ drwxr-xr-x root root / drwxr-xr-x root root usr drwxr-xr-x root root bin lrwxrwxrwx root root x86_64-pc-linux-gnu-g++ -> /usr/x86_64-pc-linux-gnu/gcc-bin/12/x86_64-pc-linux-gnu-g++ drwxr-xr-x root root / drwxr-xr-x root root usr drwxr-xr-x root root x86_64-pc-linux-gnu drwxr-xr-x root root gcc-bin drwxr-xr-x root root 12 -rwxr-xr-x root root x86_64-pc-linux-gnu-g++
Well, still no idea. I could change the handling a bit but, without knowing why it happens, it does not amount to much. I'll leave this open for now and see if anyone else is affected.
Hm, I thought it was the symlink (somehow) but I was looking at qt-related bugs and looks awfully like bug #908809 (which is also due to sandbox). This may just be a general qmake6+sandbox issue, not that I've run into that myself.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9152c25f592db19e2d6f6ab0aab991a463503a34 commit 9152c25f592db19e2d6f6ab0aab991a463503a34 Author: Ionen Wolkens <ionen@gentoo.org> AuthorDate: 2023-10-21 05:46:22 +0000 Commit: Ionen Wolkens <ionen@gentoo.org> CommitDate: 2023-10-21 06:21:50 +0000 dev-qt/qtbase: fix qsb and qmake with sandbox Also add to 6.5.3, while the issue has been less prominent in 6.5.x, there has been users that ran into issues with older versions, and is needed for stable users. See bug #915695 for details, the others are essentially duplicates which are hopefully fixed too (please report if still issues given I could never reproduce myself and cannot confirm). Closes: https://bugs.gentoo.org/908809 Closes: https://bugs.gentoo.org/908816 Closes: https://bugs.gentoo.org/913493 Closes: https://bugs.gentoo.org/915695 Thanks-to: vowstar Thanks-to: Mike Gilbert <floppym@gentoo.org> Signed-off-by: Ionen Wolkens <ionen@gentoo.org> .../qtbase-6.5.3-forkfd-childstack-size.patch | 27 ++++++++++++++++++++++ ...{qtbase-6.5.3.ebuild => qtbase-6.5.3-r1.ebuild} | 1 + ...{qtbase-6.6.0.ebuild => qtbase-6.6.0-r1.ebuild} | 1 + 3 files changed, 29 insertions(+)