https://blogs.gentoo.org/ago/2020/07/04/gentoo-tinderbox/ Issue: dev-util/qdevicemonitor-1.0.1-r2 fails to compile. Discovered on: amd64 (internal ref: ci) NOTE: If you think this is a GCC-11 related issue, please block bug 732706.
Created attachment 764994 [details] build.log build log and emerge --info
Cannot reproduce. If it still has been reproducing — most likely it's solved by fixing https://bugs.gentoo.org/919714
Created attachment 895242 [details] ninja failure of libcamera build Build failure when building libcamera manually (no ebuild for it yet). /usr/include/qt5/QtGui/qtgui-config.h:26: error: "QT_NO_IMAGEFORMAT_JPEG" redefined ... 26 | #define QT_NO_IMAGEFORMAT_JPEG true /usr/include/qt5/Gentoo/gentoo-qconfig.h:8: note: this is the location of the previous definition 8 | #define QT_NO_IMAGEFORMAT_JPEG So should Gentoo/gentoo-qconfig.h define it something, like "true"? Because that does fix it...
emerge --info for my comment 3. I didn't realize the attachment comment was the main comment... # emerge --info Portage 3.0.63 (python 3.11.8-final-0, default/linux/arm64/17.0, gcc-13, glibc-2.39-r1, 6.6.28_p20240423-raspberrypi-linux-gnu aarch64) ================================================================= System uname: Linux-6.6.28_p20240423-raspberrypi-linux-gnu-aarch64-with-glibc2.39 KiB Mem: 8235760 total, 6828816 free KiB Swap: 0 total, 0 free sh bash 5.2_p26 ld GNU ld (Gentoo 2.42 p3) 2.42.0 app-misc/pax-utils: 1.3.7::gentoo app-shells/bash: 5.2_p26::gentoo dev-build/autoconf: 2.72-r1::gentoo dev-build/automake: 1.16.5-r2::gentoo dev-build/cmake: 3.28.3::gentoo dev-build/libtool: 2.4.7-r2::gentoo dev-build/make: 4.4.1-r1::gentoo dev-build/meson: 1.3.2::gentoo dev-java/java-config: 2.3.3-r1::gentoo dev-lang/perl: 5.38.2-r1::gentoo dev-lang/python: 2.7.18_p16-r2::gentoo, 3.11.8_p1::gentoo, 3.12.2_p1::gentoo dev-lang/rust-bin: 1.75.0::gentoo sys-apps/baselayout: 2.14-r2::gentoo sys-apps/openrc: 0.53::gentoo sys-apps/sandbox: 2.38::gentoo sys-devel/binutils: 2.42-r1::gentoo sys-devel/binutils-config: 5.5::gentoo sys-devel/gcc: 12.3.1_p20240112::gentoo, 13.2.1_p20240210::gentoo sys-devel/gcc-config: 2.11::gentoo sys-devel/llvm: 17.0.6::gentoo sys-kernel/linux-headers: 6.7::gentoo (virtual/os-headers) sys-libs/glibc: 2.39-r1::gentoo Repositories: gentoo location: /usr/portage sync-type: rsync sync-uri: file:///data/gentoo sync-user: portage:portage priority: -1000 volatile: True sync-rsync-vcs-ignore: true sync-rsync-extra-opts: --delete-delay --quiet sync-rsync-verify-metamanifest: no sync-rsync-verify-max-age: 0 sync-rsync-verify-jobs: 1 ACCEPT_KEYWORDS="arm64 ~arm64" ACCEPT_LICENSE="@FREE" CBUILD="aarch64-unknown-linux-gnu" CFLAGS="-O2 -pipe -mcpu=cortex-a76+rcpc+fp16+crypto+dotprod" CHOST="aarch64-unknown-linux-gnu" CONFIG_PROTECT="/etc /usr/share/easy-rsa /usr/share/gnupg/qualified.txt /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/terminfo" CXXFLAGS="-O2 -pipe -mcpu=cortex-a76+rcpc+fp16+crypto+dotprod" DISTDIR="/data/distfiles" EMERGE_DEFAULT_OPTS=" --buildpkg --usepkg" 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 -pipe -mcpu=cortex-a76+rcpc+fp16+crypto+dotprod" FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance buildpkg buildpkg-live config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync merge-wait multilib-strict network-sandbox news parallel-fetch 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="-O2 -pipe -mcpu=cortex-a76+rcpc+fp16+crypto+dotprod" GENTOO_MIRRORS="http://distfiles.gentoo.org" LANG="en_US.utf8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" LEX="flex" MAKEOPTS="-j2" PKGDIR="/data/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" USE="X acl alsa arm64 bluetooth bzip2 cli consolekit crypt cups dbus dri fortran gdbm gps gtk gui harfbuzz iconv icu introspection ipv6 libtirpc mysql ncurses network networkmanager nls openmp pcre policykit printsupport pulseaudio python qt5 readline seccomp split-usr sql ssl svg test-rust udev udisks unicode widgets xattr xinetd xml zlib" ADA_TARGET="gnat_2021" 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_ARM="edsp v8 vfp vfp-d32 vfpv3 vfpv4" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 ntrip navcom oceanserver oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 tsip tripmate tnt ublox" INPUT_DEVICES="libinput synaptics joystick" KERNEL="linux" L10N="en en-US en_US hu" 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-1" POSTGRES_TARGETS="postgres15" PYTHON_SINGLE_TARGET="python3_11" PYTHON_TARGETS="python3_11" RUBY_TARGETS="ruby31" VIDEO_CARDS="fbdev v3d vc4" 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, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PYTHONPATH, RANLIB, READELF, RUSTFLAGS, SHELL, SIZE, STRINGS, STRIP, YACC, YFLAGS ###### To be fair, I tried building the dev-util/qdevicemonitor-1.0.1-r2 package, and yes, that is fixed with https://bugs.gentoo.org/919714 (the error is now just a warning): /usr/include/qt5/QtGui/qtgui-config.h:26: warning: "QT_NO_IMAGEFORMAT_JPEG" redefined 26 | #define QT_NO_IMAGEFORMAT_JPEG true | In file included from /usr/include/qt5/QtCore/qconfig.h:1, from /usr/include/qt5/QtCore/qglobal.h:66, from /usr/include/qt5/QtCore/qatomic.h:41, from /usr/include/qt5/QtCore/qvariant.h:43, from /usr/include/qt5/QtCore/QVariant:1, from ./ui_DeviceWidget.h:12: /usr/include/qt5/Gentoo/gentoo-qconfig.h:8: note: this is the location of the previous definition 8 | #define QT_NO_IMAGEFORMAT_JPEG | However, is this the right way to fix it? Are there going to be more packages that get hit with this, and we'll patch each of them as we go? Or is there something more systemically-wrong with gentoo-qconfig.h: #define QT_CUPS #define QT_DBUS #define QT_FREETYPE #define QT_IMAGEFORMAT_PNG #define QT_LIBINPUT #define QT_LINKED_OPENSSL true #define QT_NO_ACCESSIBILITY_ATSPI_BRIDGE #define QT_NO_IMAGEFORMAT_JPEG #define QT_NO_OPENGL_ES #define QT_NO_OPENGL_ES_2 #define QT_OPENGL #define QT_OPENSSL #define QT_SSL #define QT_WIDGETS Does it bother anyone that these are being defined to <"empty"> values? Is that really correct? If that is true, then I would at least wrap each #define in an "#ifndef ..." just to be safe. Not sure if there is a root-cause here yet...
I dug into the Qt5 includes a little more, and the only solution that comes to mind that appears reasonably doable (because gentoo already appears to do it elsewhere) is to special-case the /usr/include/qt5/Gentoo/gentoo-qconfig.h:8:#define QT_NO_IMAGEFORMAT_JPEG setting as /usr/include/qt5/Gentoo/gentoo-qconfig.h:8:#define QT_NO_IMAGEFORMAT_JPEG true just like it is already being done for: #define QT_LINKED_OPENSSL true also in /usr/include/qt5/Gentoo/gentoo-qconfig.h, which seems to overcome a very similar issue in: /usr/include/qt5/QtNetwork/qtnetwork-config.h:6:#define QT_LINKED_OPENSSL true So wherever this /usr/include/qt5/Gentoo/gentoo-qconfig.h originates/is-generated, treat the QT_NO_IMAGEFORMAT_JPEG #define the same as QT_LINKED_OPENSSL and don't let the "#define..." stay empty (though that is technically legal), give it a "true" value just to avoid this issue system-wide rather than have to fix the -pedantic error/warning compiler flags on each package that hits this issue. At least that's the theory...I haven't confirmed because I didn't track-down the origins of /usr/include/qt5/Gentoo/gentoo-qconfig.h, but I think that at least makes sense. Either way, patching the /usr/include/qt5/Gentoo/gentoo-qconfig.h file is likely the solution like I mention in comment 3, but where best to put it...gentoo maintainers get to make that call. Just trying to help...