Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 926166 - www-client/chromium depends on qt5 if USE qt6 is enabled
Summary: www-client/chromium depends on qt5 if USE qt6 is enabled
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Chromium Project
URL: https://issues.chromium.org/issues/32...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-03-04 16:23 UTC by Steffen Hau
Modified: 2024-04-05 08:15 UTC (History)
2 users (show)

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


Attachments
Adjust ebuild and GN files to seperate Qt5 and Qt6 (chromium-qt56.patch,5.27 KB, patch)
2024-03-15 08:28 UTC, Steffen Hau
Details | Diff
Adjust ebuild an GN files to make gtk, glib/gio and atk optional (chromium-gtk_glib_atk_optional.patch,5.67 KB, patch)
2024-03-15 08:29 UTC, Steffen Hau
Details | Diff
Adjust ebuild and GN files to seperate Qt5 and Qt6 (chromium_qt56.patch,5.49 KB, patch)
2024-04-05 08:12 UTC, Steffen Hau
Details | Diff
Adjust ebuild an GN files to make gtk, glib/gio and atk optional (chromium_optional_glib_gio_pangocairo_gtk_atk.patch,5.88 KB, patch)
2024-04-05 08:12 UTC, Steffen Hau
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Steffen Hau 2024-03-04 16:23:30 UTC
Both currently available version of chromium in portage tree have:
REQUIRED_USE="qt6? ( qt5 )" in place. Qt5 and Qt6 are afaik completely independend of each other so I don't understand why enabling qt6 also requires  qt5 to be enabled. The build ends up building a shim file for each but I don't see a dependency. Looking in the src and also asking google didn't reveal any hints wether this is really necessary. Could you please check wether the REQUIRED_USE is really required?


Reproducible: Always
Comment 1 Matt Jolly gentoo-dev 2024-03-06 07:52:15 UTC
I'll look into it, this isn't something that I've looked into since inheriting the package.

A brief look at the appropriate `build.gn` suggests that qt6 still extends the qt5 build steps:

https://github.com/chromium/chromium/blob/main/ui/qt/BUILD.gn#L110

If you're willing to fiddle with GN scripts and submit some changes upstream it's likely possible to tidy up the logic, but it doesn't look like Chromium currently supports what you want.

If you want to test further I recommend enabling ccache and trying a few chromium builds while hacking at the ebuild.
Comment 2 Steffen Hau 2024-03-06 12:35:14 UTC
I'm happy to help. I've also reported upstream
Comment 3 Steffen Hau 2024-03-06 12:36:59 UTC
I'm happy to help. I've reported it upstream and have linked the issue here for reference.

I have never used ccache before. Can you maybe give a short instruction how to enable it just for chromium? It's a good idea as building chromium takes over 7 hours each time.
Comment 4 Steffen Hau 2024-03-07 15:19:38 UTC
I managed to setup ccache just for chromium.

I have created to patches: one for the ebuild and one for the affected GN scripts.

I'll get back to you if the build will succeed *and* chromium is usable :-)
Comment 5 Steffen Hau 2024-03-15 08:28:50 UTC
Created attachment 887673 [details, diff]
Adjust ebuild and GN files to seperate Qt5 and Qt6
Comment 6 Steffen Hau 2024-03-15 08:29:45 UTC
Created attachment 887674 [details, diff]
Adjust ebuild an GN files to make gtk, glib/gio and atk optional
Comment 7 Steffen Hau 2024-03-15 08:44:04 UTC
I have attached two patches which I use since a couple of days.

The first patch adds a use_qt5 to Chromiums GN files so that Qt5 and Qt6 are seperate options.

The second patch came up when I studied the GN files. Chromium doesn not hard depend on GTK, it is deactivateable with use_gtk=false. The same applies to use_glib/use_gio. To disable accessiblity support, I had to make a small change so that use_atk can be supplied as build argument to gn. The ebuild changes reflect some dependencies:
- enabling screencast leads to a define of WEBRTC_USE_GIO which is used as a guard fo include gio/gio.h which will not be found if use_gio=false, maybe upstream should check that in detail
- support for atk/atspi requires glib
- it seems that cairo, pango and gdk-pixbuf are not required for a pure Qt[5,6] build so I made that DEPEND conditional on use gtk/gtk4
Comment 8 Steffen Hau 2024-03-15 12:17:19 UTC
And here my emerge --info chromium for completeness:

Portage 3.0.63 (python 3.11.8-final-0, default/linux/amd64/23.0/systemd, gcc-13, glibc-2.39-r2, 6.8.0-HAUIHAU x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-6.8.0-HAUIHAU-x86_64-Intel-R-_Core-TM-_i5-10210U_CPU_@_1.60GHz-with-glibc2.39
KiB Mem:    32593228 total,   2576824 free
KiB Swap:   16777212 total,  16769276 free
Timestamp of repository gentoo: Thu, 14 Mar 2024 17:04:12 +0000
Head commit of repository gentoo: 08b0fb1fd8207077e16b47b9b32828912d5f3b29

sh bash 5.2_p26
ld GNU ld (Gentoo 2.42 p3) 2.42.0
ccache version 4.9.1 [disabled]
app-misc/pax-utils:        1.3.7::gentoo
app-shells/bash:           5.2_p26::gentoo
dev-build/autoconf:        2.13-r8::gentoo, 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.4.0::gentoo
dev-java/java-config:      2.3.3-r1::gentoo
dev-lang/perl:             5.38.2-r2::gentoo
dev-lang/python:           3.11.8_p1::gentoo, 3.12.2_p1::gentoo
dev-lang/rust:             1.76.0::gentoo
dev-util/ccache:           4.9.1::gentoo
sys-apps/baselayout:       2.15::gentoo
sys-apps/sandbox:          2.38::gentoo
sys-apps/systemd:          255.4::gentoo
sys-devel/binutils:        2.42-r1::gentoo
sys-devel/binutils-config: 5.5::gentoo
sys-devel/clang:           17.0.6::gentoo, 18.1.0::gentoo
sys-devel/gcc:             13.2.1_p20240210::gentoo
sys-devel/gcc-config:      2.11::gentoo
sys-devel/lld:             17.0.6::gentoo, 18.1.0::gentoo
sys-devel/llvm:            17.0.6::gentoo, 18.1.0::gentoo
sys-kernel/linux-headers:  6.7::gentoo (virtual/os-headers)
sys-libs/glibc:            2.39-r2::gentoo
Repositories:

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

hauihau
    location: /var/db/repos/hauihau
    masters: gentoo
    priority: 0
    volatile: False

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O3 -pipe -flto=auto"
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"
CXXFLAGS="-march=native -O3 -pipe -flto=auto"
DISTDIR="/home/gentoo/distfiles"
EMERGE_DEFAULT_OPTS="--autounmask=n --keep-going=y --quiet-build=y --quiet-fail=y --with-bdeps=y --changed-deps-report=n"
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"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs buildpkg-live config-protect-if-modified distlocks ebuild-locks fakeroot fixlafiles ipc-sandbox merge-sync merge-wait metadata-transfer multilib-strict network-sandbox news parallel-fetch parallel-install 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="-O2 -pipe"
GENTOO_MIRRORS="https://ftp.fau.de/gentoo/ https://ftp.gwdg.de/pub/linux/gentoo/ https://ftp-stud.hs-esslingen.de/pub/Mirrors/gentoo/"
LANG="de_DE.UTF-8"
LC_ALL="de_DE.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-z,pack-relative-relocs -Wl,--gc-sections -fuse-ld=mold"
LEX="flex"
LINGUAS="de"
MAKEOPTS="-j9"
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="/home/gentoo/tmp"
SHELL="/bin/bash"
USE="a52 aac aalib acl alsa amd64 avx avx2 bluetooth bluray branding bzip2 cairo caps cdda cddb cet crypt cups curl cxx dbus dts dvd egl encode exif ffmpeg flac fontconfig ftp gd gdbm gif gmp gstreamer iconv icu ipv6 jpeg jpeg2k kde kerberos lame libsamplerate libtirpc lzma lzo mad matroska mmx mmxext mng mp3 mpeg mtp multilib musepack ncurses networkmanager nls nptl ogg openal opengl openmp opus pam pcre pdf pipewire png policykit pulseaudio qt6 readline screencast seccomp sndfile spell sse sse2 sse3 sse4 sse4_1 sse4_2 ssl ssse3 svg systemd test-rust theora threads tiff truetype udev unicode upower usb v4l vaapi vim-syntax vorbis vulkan wavpack wayland x264 xattr xml xmp xvid zlib zstd" ABI_X86="64" ADA_TARGET="gnat_2021" ALSA_CARDS="hda-intel" 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="aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt rdrand sse sse2 sse3 sse4_1 sse4_2 ssse3" 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" GRUB_PLATFORMS="efi-64" 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-1" POSTGRES_TARGETS="postgres15" PYTHON_SINGLE_TARGET="python3_11" PYTHON_TARGETS="python3_11" QEMU_SOFTMMU_TARGETS="i386 x86_64" QEMU_USER_TARGETS="i386 x86_64" RUBY_TARGETS="ruby31" VIDEO_CARDS="intel" 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, LD, LFLAGS, LIBTOOL, MAKE, MAKEFLAGS, 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

=================================================================
                        Package Settings
=================================================================

www-client/chromium-123.0.6312.46::hauihau was built with the following:
USE="cups kerberos lto official proprietary-codecs pulseaudio qt6 system-harfbuzz system-icu system-png system-toolchain system-zstd vaapi wayland widevine -X -accessibility -custom-cflags -debug -glib -gtk -gtk4 -hangouts (-headless) -libcxx -pax-kernel (-pgo) -qt5 -screencast (-selinux)" ABI_X86="(64)" L10N="de -af -am -ar -bg -bn -ca -cs -da -el -en-GB -es -es-419 -et -fa -fi -fil -fr -gu -he -hi -hr -hu -id -it -ja -kn -ko -lt -lv -ml -mr -ms -nb -nl -pl -pt-BR -pt-PT -ro -ru -sk -sl -sr -sv -sw -ta -te -th -tr -uk -ur -vi -zh-CN -zh-TW"
CFLAGS="-march=native -O3 -pipe -Wno-unknown-warning-option"
CXXFLAGS="-march=native -O3 -pipe -Wno-unknown-warning-option"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs buildpkg-live ccache config-protect-if-modified distlocks ebuild-locks fakeroot fixlafiles ipc-sandbox merge-sync merge-wait metadata-transfer multilib-strict network-sandbox news parallel-fetch parallel-install 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"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-z,pack-relative-relocs -Wl,--gc-sections -Wl,--undefined-version"
Comment 9 Steffen Hau 2024-04-05 08:12:14 UTC
Created attachment 889506 [details, diff]
Adjust ebuild and GN files to seperate Qt5 and Qt6
Comment 10 Steffen Hau 2024-04-05 08:12:51 UTC
Created attachment 889507 [details, diff]
Adjust ebuild an GN files to make gtk, glib/gio and atk optional
Comment 11 Steffen Hau 2024-04-05 08:15:09 UTC
I have attached updated patches which are in use for several weeks now and I haven't found any issues.

I have additionally also disabled use_pangocairo if gtk is not in use.

Did you have thhe chance to test yourself? It  would be great if these changes could make it into the ebuild.