my setup: emerge -pv firefox-120.0 [ebuild NS ~] www-client/firefox-120.0:rapid::gentoo [115.5.0_rc1:esr::gentoo] USE="X eme-free hwaccel jumbo-build%* system-harfbuzz system-icu system-jpeg system-libevent system-libvpx system-png system-webp telemetry%* -clang -dbus -debug -geckodriver -gmp-autoupdate -hardened -jack -libproxy -lto -openh264 -pgo -pulseaudio -screencast (-selinux) -sndio -system-av1 (-system-python-libs) (-valgrind) -wayland -wifi" L10N="de -ach -af -an -ar -ast -az -be -bg -bn -br -bs -ca -ca-valencia -cak -cs -cy -da -dsb -el -en-CA -en-GB -eo -es-AR -es-CL -es-ES -es-MX -et -eu -fa -ff -fi -fr -fur -fy -ga -gd -gl -gn -gu -he -hi -hr -hsb -hu -hy -ia -id -is -it -ja -ka -kab -kk -km -kn -ko -lij -lt -lv -mk -mr -ms -my -nb -ne -nl -nn -oc -pa -pl -pt-BR -pt-PT -rm -ro -ru -sc -sco -si -sk -sl -son -sq -sr -sv -szl -ta -te -th -tl -tr -trs -uk -ur -uz -vi -xh -zh-CN -zh-TW" 0 KiB Total: 1 package (1 in new slot), Size of downloads: 0 KiB still, the patch is applied: * Applying patches from /var/tmp/portage/www-client/firefox-122.0/work/firefox-patches ... * 0001-Don-t-use-build-id.patch ... [ ok ] * 0002-Fortify-sources-properly.patch ... [ ok ] * 0003-bmo-847568-Support-system-harfbuzz.patch ... [ ok ] * 0004-bmo-847568-Support-system-graphite2.patch ... [ ok ] * 0005-bmo-1559213-Support-system-av1.patch ... [ ok ] * 0006-musl-Add-alternate-name-for-private-siginfo-struct-m.patch ... [ ok ] * 0007-musl-Fix-syscall-wrappers.patch ... [ ok ] * 0008-musl-Only-use-system-heap-reporter-with-glibc.patch ... [ ok ] * 0009-musl-Set-pthread-name-for-non-glibc-systems.patch ... [ ok ] * 0010-musl-sys-auvx.h-avaliable-on-more-then-just-glibc-sy.patch ... patching file third_party/libwebrtc/system_wrappers/source/cpu_features_linux.cc Hunk #3 succeeded at 58 with fuzz 2. [ ok ] * 0011-musl-make-SYS_fork-non-fatal-musl-uses-it-for-fork-2.patch ... [ ok ] * 0012-build-Disable-Werror.patch ... [ ok ] * 0013-LTO-Only-enable-LTO-for-Rust-when-complete-build-use.patch ... [ ok ] * 0014-Enable-FLAC-on-platforms-without-ffvpx-via-ffmpeg.patch ... [ ok ] * 0015-bgo-816975-fix-build-on-x86.patch ... patching file modules/fdlibm/src/math_private.h Hunk #1 succeeded at 30 with fuzz 2. [ ok ] * 0016-bmo-1559213-fix-system-av1-libs.patch ... [ ok ] * 0017-bmo-1196777-Set-GDK_FOCUS_CHANGE_MASK.patch ... [ ok ] * 0018-bmo-1754469-memory_mozalloc_throw.patch ... [ ok ] * 0019-bgo-860033-firefox-wayland-no-dbus.patch ... patching file toolkit/moz.configure Hunk #1 succeeded at 2586 with fuzz 2 (offset 233 lines). Hunk #2 succeeded at 3206 (offset 318 lines). [ ok ] * 0021-bmo-1516803-gcc-lto-sandbox.patch ... [ ok ] * 0022-enable-vaapi-on-all-amd-cards.patch ... patching file widget/gtk/GfxInfo.cpp Hunk #1 succeeded at 1105 with fuzz 2 (offset 135 lines). [ ok ] * 0023-bgo-907963-rustflags-single-string.patch ... [ ok ] * 0024-bgo-910309-dont-link-widevineplugin-to-libgcc_s.patch ... (Stripping trailing CRs from patch; use --binary to disable.) patching file security/sandbox/linux/Sandbox.cpp patch unexpectedly ends in middle of line Hunk #2 succeeded at 688 with fuzz 1 (offset 1 line). [ ok ] * 0025-gcc-lto-patch-from-opensuse.patch ... [ ok ] * 0026-bgo-914738-nodbus-fix2.patch ... [ ok ] * 0027-bmo-1864083-missing-MOZ_DBUS_CFLAGS-after-dbus-glib-removal.patch ... [ ok ] * 0028-bmo-1862601-system-icu-74.patch ... [ ok ] and only after it has been applied it is consequently removed from the workdir: removed '/var/tmp/portage/www-client/firefox-122.0/work/firefox-patches/0028-bmo-1862601-system-icu-74.patch'
if you want to remove a patch from the workdir/firefox-patches/ dir, it must be so before eapply "${WORKDIR}/firefox-patches" is called. Just like it's done for if use lto and if ! use ppc64 in lines 650-656
Created attachment 875324 [details] build failure I think the issue I have is the result of the patch not being dropped properly, since I get ICU related mismatch between firefox's class and icu's class. Look for `static_assert` in the attached log.
I'm having a similar issue. build fails with: 0:05.89 In file included from Unified_cpp_intl_lwbrk0.cpp:2: 0:05.90 /var/tmp/portage/www-client/firefox-120.0/work/firefox-120.0/intl/lwbrk/LineBreaker.cpp:459:3: error: static assertion failed due to requirement 'U_LB_COUNT == mozilla::ArrayLength(sUnicodeLineBreakToClass)': Gecko vs ICU LineBreak class mismatch 0:05.90 static_assert(U_LB_COUNT == mozilla::ArrayLength(sUnicodeLineBreakToClass), 0:05.90 ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 0:05.91 /var/tmp/portage/www-client/firefox-120.0/work/firefox-120.0/intl/lwbrk/LineBreaker.cpp:459:28: note: expression evaluates to '43 == 48' 0:05.91 static_assert(U_LB_COUNT == mozilla::ArrayLength(sUnicodeLineBreakToClass), 0:05.91 ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 0:05.92 1 error generated. 0:05.92 gmake[4]: *** [/var/tmp/portage/www-client/firefox-120.0/work/firefox-120.0/config/rules.mk:690: Unified_cpp_intl_lwbrk0.o] Error 1 0:05.92 gmake[4]: Leaving directory '/var/tmp/portage/www-client/firefox-120.0/work/firefox_build/intl/lwbrk' 0:05.92 gmake[3]: *** [/var/tmp/portage/www-client/firefox-120.0/work/firefox-120.0/config/recurse.mk:72: intl/lwbrk/target-objects] Error 2 0:05.93 gmake[3]: *** Waiting for unfinished jobs.... emerge --info Portage 3.0.51 (python 3.11.5-final-0, default/linux/amd64/17.1/desktop/plasma/systemd, gcc-13, glibc-2.37-r7, 6.5.12 x86_64) ================================================================= System uname: Linux-6.5.12-x86_64-Intel-R-_Core-TM-_i5-10310U_CPU_@_1.70GHz-with-glibc2.37 KiB Mem: 15981412 total, 4756236 free KiB Swap: 25165820 total, 25137660 free Timestamp of repository gentoo: Wed, 22 Nov 2023 11:00:01 +0000 Head commit of repository gentoo: c62c1f13ae7cc1bacd9fc5cefbe4fbf5e5e547b6 sh bash 5.1_p16-r6 ld GNU ld (Gentoo 2.40 p5) 2.40.0 ccache version 4.8.2 [enabled] app-misc/pax-utils: 1.3.5::gentoo app-shells/bash: 5.1_p16-r6::gentoo dev-lang/perl: 5.38.0-r1::gentoo dev-lang/python: 3.11.5::gentoo dev-lang/rust: 1.71.1::gentoo dev-util/ccache: 4.8.2::gentoo dev-util/cmake: 3.26.5-r2::gentoo dev-util/meson: 1.2.3::gentoo sys-apps/baselayout: 2.14::gentoo sys-apps/sandbox: 2.38::gentoo sys-apps/systemd: 254.5-r1::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: 16.0.6::gentoo sys-devel/gcc: 13.2.1_p20230826::gentoo sys-devel/gcc-config: 2.11::gentoo sys-devel/libtool: 2.4.7-r1::gentoo sys-devel/lld: 16.0.6::gentoo sys-devel/llvm: 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-r7::gentoo Repositories: gentoo location: /usr/portage sync-type: rsync sync-uri: rsync://rsync.gentoo.org/gentoo-portage priority: -1000 volatile: True sync-rsync-verify-jobs: 1 sync-rsync-verify-metamanifest: yes sync-rsync-extra-opts: sync-rsync-verify-max-age: 24 x-portage location: /usr/local/portage masters: gentoo priority: 0 volatile: True ACCEPT_KEYWORDS="amd64" ACCEPT_LICENSE="@FREE @FREE" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -pipe -march=native" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/X11/xkb /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/init.d /etc/revdep-rebuild /etc/sandbox.d /etc/ssl/certs /etc/terminfo" CXXFLAGS="-O2 -pipe -march=native" DISTDIR="/usr/portage/distfiles" 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 ccache 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 splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr" FFLAGS="-O2 -pipe" GENTOO_MIRRORS="https://mirror.dkm.cz/gentoo/ http://ftp.fi.muni.cz/pub/linux/gentoo/ http://gentoo.mirror.web4u.cz/ http://ftp.wh2.tu-dresden.de/pub/mirrors/gentoo " LANG="en_US.utf8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" LEX="flex" LINGUAS="en_US" MAKEOPTS="-j8" 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="X a52 aac acpi activities alsa amd64 arts avi bluetooth branding bzip2 cairo cdda cli crypt css cups dbus declarative divx4linux dri dts encode exif flac fortran gdbm gif gtk gtk2 gui iconv icq icu imagemagick imap jabber jpeg kde kwallet lcms libnotify libtirpc live mad matroska mmx mng mozilla mp3 mp4 mpeg multilib ncurses networkmanager nls nptl offensive ogg opengl openmp pam pango pcre pdf perl plasma png policykit ppds pulseaudio qml qt qt3support qt5 quicktime readline sdl seccomp smp sound split-usr sse sse2 ssl startup-notification svg systemd tcpd test-rust theora tiff truetype udev udisks unicode upower usb v4l vhosts vorbis vulkan wayland widgets wifi wxwidgets x264 xattr xcb xft xml xml2 xv xvid zlib" ABI_X86="64" ADA_TARGET="gnat_2021" APACHE2_MODULES="rewrite authz_host dir mime proxy proxy_http" CALLIGRA_FEATURES="karbon sheets words" CAMERAS="canon ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt sse sse2 sse3 sse4_1 sse4_2 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 keyboard mouse synaptics" KERNEL="linux" L10N="en cs" 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="php8-1" POSTGRES_TARGETS="postgres15" PYTHON_SINGLE_TARGET="python3_11" PYTHON_TARGETS="python3_11" RUBY_TARGETS="ruby31" VIDEO_CARDS="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, EMERGE_DEFAULT_OPTS, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LD, 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
you can try to test my proposed fix, all you've got to do is to move the lines 665-668 directly above line 663
Heh indeed, should just copy-paste the ebuild used in testing rather than writing changes from memory.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d872234b5a418f06611f011f4d817d4580a8b748 commit d872234b5a418f06611f011f4d817d4580a8b748 Author: Joonas Niilola <juippis@gentoo.org> AuthorDate: 2023-11-22 12:51:52 +0000 Commit: Joonas Niilola <juippis@gentoo.org> CommitDate: 2023-11-22 12:52:44 +0000 www-client/firefox: move the system-icu patch if-block in 120.0 Closes: https://bugs.gentoo.org/917700 Signed-off-by: Joonas Niilola <juippis@gentoo.org> www-client/firefox/firefox-120.0.ebuild | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Hmm I wonder if the logic is still wrong. The use flag check should be negative. Maybe something like if has_version "<=dev-libs/icu-74" && ! use system-icu ; then works best.
(In reply to Joonas Niilola from comment #7) > Hmm I wonder if the logic is still wrong. The use flag check should be > negative. Maybe something like > > if has_version "<=dev-libs/icu-74" && ! use system-icu ; then > > works best. * if has_version "<dev-libs/icu-74"
The fix worked for me only after I enabled system-icu USE flag. Which seems kind of weird, because it means the patch broke the build on icu version that was shipped with Firefox. Anyways, +system-icu and patching the ebuild did it.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9b59b019166a637a92a0fa20ef5b8dcbb035281f commit 9b59b019166a637a92a0fa20ef5b8dcbb035281f Author: Joonas Niilola <juippis@gentoo.org> AuthorDate: 2023-11-22 14:15:27 +0000 Commit: Joonas Niilola <juippis@gentoo.org> CommitDate: 2023-11-22 14:22:24 +0000 www-client/firefox: update the icu patch logic to be consistent Closes: https://bugs.gentoo.org/917700 Signed-off-by: Joonas Niilola <juippis@gentoo.org> www-client/firefox/firefox-120.0.ebuild | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)