Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

www-client/ungoogled-chromium: system-ffmpeg Build Failure (4 Errors) #381

Open
ThisNekoGuy opened this issue Oct 11, 2024 · 47 comments
Open
Labels
bug Something isn't working

Comments

@ThisNekoGuy
Copy link

ThisNekoGuy commented Oct 11, 2024

G-zipped Build Log

Summary:

There were 4 errors in media/filters/ffmpeg_demuxer.cc when building using the system-ffmpeg USE flag.
(For reference, my system's ffmpeg version is media-video/ffmpeg-6.1.1-r8)

Gentoo Profile:

default/linux/amd64/23.0/split-usr/llvm (stable)

Package USE Flags:
[ Legend : U - final flag setting for installation]
[        : I - package is installed with flag     ]
[ Colors : set, unset                             ]
 * Found these USE flags for www-client/ungoogled-chromium-129.0.6668.89_p1:
 U I
 - + X                        : Add support for X11
 + + bluetooth                : Enable Bluetooth. Disabling bluetooth does break WebAuthn. Could also break something else. Improved patch is welcome.
 - - cfi                      : Build with CFI (Control Flow Integrity) enabled. It requires "-stdlib=libc++", see #40 for more details.
 - - convert-dict             : Patch and build the convert_dict utility. The script will be installed into /usr/lib64/chromium-browser/update-dicts.sh. More info here:
                                https://github.com/ungoogled-software/ungoogled-chromium/issues/188#issuecomment-444752907
 - - cromite                  : Apply also select patches from Cromite. Highly experimental! Please consider Cromite licensing terms when deciding if you're allowed to distribute binaries built with these
                                patches.
 + + cups                     : Add support for CUPS (Common Unix Printing System)
 - - custom-cflags            : Build with user-specified CFLAGS (unsupported)
 - - debug                    : Enable DCHECK feature with severity configurable at runtime. Mostly intended for debugging and development, NOT RECOMMENDED for general use.
 - - enable-driver            : Build chromedriver
 - - gtk4                     : Build with GTK4 headers
 - - hangouts                 : Enable support for Google Hangouts features such as screen sharing
 - - headless                 : Build Ozone only with headless backend, NOT RECOMMENDED for general uses
 - - hevc                     : Enable HEVC decoding support. Should work with system-ffmpeg, but might require additional patching for the built-in one.
 - - kerberos                 : Add kerberos support
 + - l10n_af                  : Afrikaans
 + - l10n_am                  : Amharic
 + - l10n_ar                  : Arabic
 + - l10n_bg                  : Bulgarian
 + - l10n_bn                  : Bengali
 + - l10n_ca                  : Catalan
 + - l10n_cs                  : Czech
 + - l10n_da                  : Danish
 + - l10n_de                  : German
 + - l10n_el                  : Modern Greek
 + - l10n_en-GB               : English (United Kingdom)
 + - l10n_es                  : Spanish
 + - l10n_es-419              : Spanish (Latin America)
 + - l10n_et                  : Estonian
 + - l10n_fa                  : Persian
 + - l10n_fi                  : Finnish
 + - l10n_fil                 : Filipino
 + - l10n_fr                  : French
 + - l10n_gu                  : Gujarati
 + - l10n_he                  : Hebrew
 + - l10n_hi                  : Hindi
 + - l10n_hr                  : Croatian
 + - l10n_hu                  : Hungarian
 + - l10n_id                  : Indonesian
 + - l10n_it                  : Italian
 + - l10n_ja                  : Japanese
 + - l10n_kn                  : Kannada
 + - l10n_ko                  : Korean
 + - l10n_lt                  : Lithuanian
 + - l10n_lv                  : Latvian
 + - l10n_ml                  : Malayalam
 + - l10n_mr                  : Marathi
 + - l10n_ms                  : Malay (macrolanguage)
 + - l10n_nb                  : Norwegian Bokmål
 + - l10n_nl                  : Dutch
 + - l10n_pl                  : Polish
 + - l10n_pt-BR               : Portuguese (Brazil)
 + - l10n_pt-PT               : Portuguese (Portugal)
 + - l10n_ro                  : Romanian
 + - l10n_ru                  : Russian
 + - l10n_sk                  : Slovak
 + - l10n_sl                  : Slovenian
 + - l10n_sr                  : Serbian
 + - l10n_sv                  : Swedish
 + - l10n_sw                  : Swahili (macrolanguage)
 + - l10n_ta                  : Tamil
 + - l10n_te                  : Telugu
 + - l10n_th                  : Thai
 + - l10n_tr                  : Turkish
 + - l10n_uk                  : Ukrainian
 + - l10n_ur                  : Urdu
 + - l10n_vi                  : Vietnamese
 + - l10n_zh-CN               : Chinese (China)
 + - l10n_zh-TW               : Chinese (Taiwan)
 - + libcxx                   : Use bundled C++ Standard Library (libc++)
 - - nvidia                   : Use libXNVCtrl library from x11-drivers/nvidia-drivers instead of the bundled one
 + - official                 : Enable Official build instead of Developer build
 - - optimize-thinlto         : Whether to enable ThinLTO optimizations. Turning ThinLTO optimizations on can substantially increase link time and binary size, but they generally also make binaries a fair bit
                                faster.
 + - optimize-webui           : Optimize parts of Chromium's UI written with web technologies (HTML/CSS/JS) for runtime performance purposes. This does more work at compile time for speed benefits at runtime.
 + - override-data-dir        : Change default user data directory to "~/.config/ungoogled-chromium". No data moved automatically.
 - - pax-kernel               : Allow building on a PaX-enabled kernel
 - - pgo                      : Enable PGO. Requires bundled binary profile data in sources tree. Often requires masked/testing llvm.
 + - proprietary-codecs       : Enable proprietary codecs like H.264, MP3
 + + pulseaudio               : Add sound server support via media-libs/libpulse (may be PulseAudio or PipeWire)
 - - qt5                      : Add support for the Qt 5 application and UI framework
 + + qt6                      : Add support for the Qt 6 application and UI framework
 + + screencast               : Enable support for remote desktop and screen cast using media-video/pipewire
 - - system-abseil-cpp        : Use the system dev-cpp/abseil-cpp instead of the bundled one
 - - system-av1               : Use the system media-libs/libaom and media-libs/dav1d instead of the bundled ones
 - - system-brotli            : Use the system app-arch/brotli instead of the bundled one
 + - system-crc32c            : Use the system dev-libs/crc32c instead of the bundled one
 + - system-double-conversion : Use the system dev-libs/double-conversion instead of the bundled one
 + - system-ffmpeg            : Use the system media-video/ffmpeg instead of the bundled one
 + - system-harfbuzz          : Use the system media-libs/harfbuzz instead of the bundled one
 + - system-icu               : Use the system dev-libs/icu instead of the bundled one
 + - system-jsoncpp           : Use the system dev-libs/jsoncpp instead of the bundled one
 + - system-libevent          : Use the system dev-libs/libevent instead of the bundled one
 + - system-libusb            : Use the system dev-libs/libusb instead of the bundled one
 - - system-libvpx            : Use the system media-libs/libvpx instead of the bundled one
 + - system-openh264          : Use the system media-libs/openh264 instead of the bundled one. If disabled, it will restrict USE=bindist.
 + - system-openjpeg          : Use the system-wide media-libs/openjpeg instead of the bundled one. OpenJPEG use are exclusively for Chromium's PDF viewer.
 + - system-png               : Use system libpng instead of the bundled one
 + - system-re2               : Use the system-wide dev-libs/re2 instead of the bundled one
 + - system-snappy            : Use the system-wide app-arch/snappy instead of the bundled one
 + - system-woff2             : Use the system media-libs/woff2 instead of the bundled one
 + - system-zstd              : Use the system app-arch/zstd instead of the bundled one
 - - thinlto                  : Build with ThinLTO support. LTO (Link Time Optimization) achieves better runtime performance through whole-program analysis and cross-module optimization (highly recommended).
 + + vaapi                    : Enable Video Acceleration API for hardware decoding
 + + wayland                  : Enable dev-libs/wayland backend
 + - widevine                 : Unsupported closed-source DRM capability (required by Netflix VOD)

Note: I had actually added -fuse-ld=mold to my LDFLAGS for this package (because using ld.lld was causing "undefined symbol" build failures for some reason) but it isn't showing in the emerge info I've attatched for some reason even though it isn recognized once the build starts (albiet not as an LDFLAG for some reason?).
The emerge info also says I'm using -gddb3, which is also false, because I actually removed it for Ungoogled Chromium because it was causing early build failures... Again, not sure why. Also noticed that -custom-cflags alters MAKEOPTS, which makes the build take ages when it really doesn't have to be that way.

Emerge Info:
Portage 3.0.65 (python 3.12.6-final-0, default/linux/amd64/23.0/split-usr/llvm, gcc-13, glibc-2.39-r6, 6.10.9-tkg-eevdf-gentoo-llvm18-generic_v3 x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-6.10.9-tkg-eevdf-gentoo-llvm18-generic_v3-x86_64-AMD_Ryzen_7_3700X_8-Core_Processor-with-glibc2.39
KiB Mem:    32765596 total,   4794284 free
KiB Swap:   16777212 total,  12815868 free
Timestamp of repository gentoo: Thu, 10 Oct 2024 05:10:59 +0000
Head commit of repository gentoo: 8f058e4c25ce875c4bc591ae8303c774c1c2a26b

Timestamp of repository guru: Wed, 09 Oct 2024 22:53:06 +0000
Head commit of repository guru: bd9ad593ddc50c05ecff792b07d6059d652faa68

Timestamp of repository kde: Wed, 09 Oct 2024 17:18:31 +0000
Head commit of repository kde: e4dad42943ba513be3ba8ee8e67874799eb0e332

Timestamp of repository pf4public: Wed, 09 Oct 2024 22:34:00 +0000
Head commit of repository pf4public: faafbc1bcc5b69b936e8fe8cb3727288a5940282

Timestamp of repository steam-overlay: Tue, 08 Oct 2024 15:50:59 +0000
Head commit of repository steam-overlay: 1dc5a0d57c688eacd472d714a0621b6c277a9385

Head commit of repository waffle-builds: 411893ae555f010adef2fdf97193563064054136

Head commit of repository FireBurn: 2c18009e8ff98bf9685e5c2b8654a89420ba7bdb

Head commit of repository bobwya: a8496a14aee3c337b0e547b97b546b08607242a8

Head commit of repository farmboy0: 2df3b12838fafc77468edff1ca308734f73e2f2a

Head commit of repository kzd: 4fc08d53e07a58db6107a0e9fb508adb5177b493

Head commit of repository librewolf: 177fba0c8902b8ca1522fba68f1ea2967e4378bf

Head commit of repository oxen-overlay: caa06ee33866f344b827f2bf7105839272cd7b3e

Head commit of repository parona-overlay: e41f3f2d982322dc66a3ace7dc2acbfaad0652b6

Head commit of repository src_prepare-overlay: b989c2c307eac2e9dee7a54ec9b459dfd9817276

Head commit of repository tatsh-overlay: 0950cef5af651ff90d8f8718aa1202e0ba729544

Head commit of repository tezeta: 7644636a57317ba864880f7f93a95d3e49ba9474

Head commit of repository thegreatmcpain: 7f7e867d1a3e8a21741dc8027eca41766df428b7

Head commit of repository x0rzavi: e560dddb58c5baebc899623129a9db37f9a8da4b

Head commit of repository xarblu-overlay: 40e0955068fa98f2af76704265a97f7a7ed96bb1

Timestamp of repository xwing: Tue, 08 Oct 2024 15:51:00 +0000
Head commit of repository xwing: d86ef8d9d126ed7406811c77640ed47988bb670b

sh lksh
ld GNU ld (Gentoo 2.42 p6) 2.42.0
app-misc/pax-utils:        1.3.7::gentoo
app-shells/bash:           5.2_p37::gentoo
dev-build/autoconf:        2.13-r8::gentoo, 2.71-r7::gentoo
dev-build/automake:        1.16.5-r2::gentoo
dev-build/cmake:           3.30.2::gentoo
dev-build/libtool:         2.4.7-r4::gentoo
dev-build/make:            4.4.1-r1::gentoo
dev-build/meson:           1.5.2::gentoo
dev-java/java-config:      2.3.4::gentoo
dev-lang/perl:             5.40.0::gentoo
dev-lang/python:           3.12.6_p4::gentoo
dev-lang/rust:             1.80.1::gentoo
sys-apps/baselayout:       2.15::gentoo
sys-apps/openrc:           0.54.2::gentoo
sys-apps/sandbox:          2.39::gentoo
sys-devel/binutils:        2.42-r2::gentoo
sys-devel/binutils-config: 5.5.2::gentoo
sys-devel/clang:           18.1.8::gentoo
sys-devel/gcc:             13.3.1_p20240614::gentoo
sys-devel/gcc-config:      2.11::gentoo
sys-devel/lld:             18.1.8::gentoo
sys-devel/llvm:            17.0.6::gentoo, 18.1.8-r1::gentoo
sys-kernel/linux-headers:  6.10::gentoo (virtual/os-headers)
sys-libs/glibc:            2.39-r6::gentoo
Repositories:

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

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

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

neko-san_override
    location: /var/db/repos/neko-san_override
    masters: gentoo
    volatile: False

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

steam-overlay
    location: /var/db/repos/steam-overlay
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/steam-overlay.git
    masters: gentoo
    volatile: False

waffle-builds
    location: /var/db/repos/waffle-builds
    sync-type: git
    sync-uri: https://github.com/FlyingWaffleDev/waffle-builds
    masters: gentoo
    volatile: False

FireBurn
    location: /var/db/repos/FireBurn
    sync-type: git
    sync-uri: https://github.com/FireBurn/Overlay.git
    masters: gentoo
    priority: 50
    volatile: False

bobwya
    location: /var/db/repos/bobwya
    sync-type: git
    sync-uri: https://github.com/bobwya/bobwya
    masters: gentoo
    priority: 50
    volatile: False

farmboy0
    location: /var/db/repos/farmboy0
    sync-type: git
    sync-uri: https://github.com/farmboy0/portage-overlay.git
    masters: gentoo
    priority: 50
    volatile: False

kzd
    location: /var/db/repos/kzd-ebuilds
    sync-type: git
    sync-uri: https://gitlab.com/kzdixon/kzd-ebuilds.git
    masters: gentoo steam-overlay
    priority: 50
    volatile: False

librewolf
    location: /var/db/repos/librewolf
    sync-type: git
    sync-uri: https://codeberg.org/librewolf/gentoo.git
    masters: gentoo
    priority: 50
    volatile: False

oxen-overlay
    location: /var/db/repos/oxen-overlay
    sync-type: git
    sync-uri: https://github.com/XutaxKamay/oxen-overlay.git
    masters: gentoo
    priority: 50
    volatile: False

parona-overlay
    location: /var/db/repos/parona-overlay
    sync-type: git
    sync-uri: https://gitlab.com/Parona/parona-overlay.git
    masters: gentoo
    priority: 50
    volatile: False

src_prepare-overlay
    location: /var/db/repos/src_prepare-overlay
    sync-type: git
    sync-uri: https://gitlab.com/src_prepare/src_prepare-overlay.git
    masters: gentoo
    priority: 50
    volatile: False

tatsh-overlay
    location: /var/db/repos/tatsh-overlay
    sync-type: git
    sync-uri: https://github.com/Tatsh/tatsh-overlay.git
    masters: gentoo
    priority: 50
    volatile: False

tezeta
    location: /var/db/repos/tezeta
    sync-type: git
    sync-uri: https://github.com/tezeta/tezeta-overlay.git
    masters: gentoo
    priority: 50
    volatile: False

thegreatmcpain
    location: /var/db/repos/thegreatmcpain
    sync-type: git
    sync-uri: https://gitlab.com/TheGreatMcPain/thegreatmcpain-overlay.git
    masters: gentoo
    priority: 50
    volatile: False

x0rzavi
    location: /var/db/repos/x0rzavi
    sync-type: git
    sync-uri: https://github.com/x0rzavi/x0rzavi-overlay.git
    masters: gentoo
    priority: 50
    volatile: False

xarblu-overlay
    location: /var/db/repos/xarblu-overlay
    sync-type: git
    sync-uri: https://github.com/xarblu/xarblu-overlay.git
    masters: gentoo
    priority: 50
    volatile: False

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

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
ADDR2LINE="/usr/lib/llvm/18/bin/llvm-addr2line"
AR="/usr/lib/llvm/18/bin/llvm-ar"
AS="/usr/lib/llvm/18/bin/llvm-as"
CBUILD="x86_64-pc-linux-gnu"
CC="clang-18"
CFLAGS="-march=znver2 -pipe -O2 -mllvm=-polly -mllvm=-polly-ast-use-context -mllvm=-polly-vectorizer=stripmine -mllvm=-polly-invariant-load-hoisting -mllvm=-polly-run-inliner -mllvm=-polly-run-dce -fno-plt -ftrivial-auto-var-init=pattern -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security -fstack-clash-protection -fstack-protector-strong -fcf-protection -fPIC -ggdb3"
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 /etc/terminfo"
CPP="clang-cpp-18"
CXX="clang++-18"
CXXFLAGS="-march=znver2 -pipe -O2 -mllvm=-polly -mllvm=-polly-ast-use-context -mllvm=-polly-vectorizer=stripmine -mllvm=-polly-invariant-load-hoisting -mllvm=-polly-run-inliner -mllvm=-polly-run-dce -fno-plt -ftrivial-auto-var-init=pattern -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security -fstack-clash-protection -fstack-protector-strong -fcf-protection -fPIC -ggdb3"
DISTDIR="/var/cache/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="-march=znver2 -pipe -O2 -mllvm=-polly -mllvm=-polly-ast-use-context -mllvm=-polly-vectorizer=stripmine -mllvm=-polly-invariant-load-hoisting -mllvm=-polly-run-inliner -mllvm=-polly-run-dce -fno-plt -ftrivial-auto-var-init=pattern -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security -fstack-clash-protection -fstack-protector-strong -fcf-protection -fPIC -ggdb3"
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 merge-wait multilib-strict network-sandbox news nostrip parallel-fetch 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="-march=znver2 -pipe -O2 -mllvm=-polly -mllvm=-polly-ast-use-context -mllvm=-polly-vectorizer=stripmine -mllvm=-polly-invariant-load-hoisting -mllvm=-polly-run-inliner -mllvm=-polly-run-dce -fno-plt -ftrivial-auto-var-init=pattern -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security -fstack-clash-protection -fstack-protector-strong -fcf-protection -fPIC -ggdb3"
GENTOO_MIRRORS="https://gentoo.osuosl.org/"
LANG="en_US.utf8"
LD="ld.lld"
LDFLAGS="-Wl,-O2,--sort-common,--as-needed,-z,relro,-z,now"
LEX="flex"
MAKEOPTS="-j7"
NM="/usr/lib/llvm/18/bin/llvm-nm"
OBJCOPY="/usr/lib/llvm/18/bin/llvm-objcopy"
OBJDUMP="/usr/lib/llvm/18/bin/llvm-objdump"
PKGDIR="/var/cache/binpkgs"
PORTAGE_COMPRESS="gzip"
PORTAGE_COMPRESS_FLAGS="-9 -R -p4"
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"
RANLIB="/usr/lib/llvm/18/bin/llvm-ranlib"
READELF="/usr/lib/llvm/18/bin/llvm-readelf"
RUSTFLAGS="-C opt-level=3 -C target-cpu=native -C codegen-units=1"
SHELL="/bin/bash"
STRINGS="/usr/lib/llvm/18/bin/llvm-strings"
STRIP="/usr/lib/llvm/18/bin/llvm-strip"
USE="7z X a52 aac acl acpi activities alsa amd64 autotype bash-completion binutils-plugin bluetooth branding browser browser-integration bzip2 cairo cdda cdr cet clang cli colord crash-handler crypt cups dbus declarative default-compiler-rt default-libcxx default-lld desktop-portal dhclient discover dri dts dvd dvdr echo-cancel elogind encode eselect-ldso exif ffmpeg firewall flac flatpak fluidsynth fortran gbm gdbm gif gles2 gles3 gpm gstreamer gtk gui hardened iconv icu ipv6 iwd jack jack-client jpeg kde kf6compat kwallet lcms legacy-systray libcxx libnotify libtirpc llvm-libunwind lm-sensors mad mgba mng mp3 mp4 mpeg multilib ncurses networkmanager nls nptl ogg opengl openh264 openmp openssl opus pam pango pcre pdf pic pie pipewire pipewire-alsa plasma png policykit ppds pulseaudio qml qt6 raw readline resolvconf retroachievements rtc screencast sddm sdl seccomp sechash semantic-desktop share smart sound sound-server spell split-usr ssl startup-notification svg system-crontab system-man test-rust threads tiff timidity truetype udev udisks unicode upnp upower usb v4l vaapi vdpau vorbis vulkan wallpapers wav wayland widgets wired wxwidgets x264 xattr xcb xcsecurity xft xml xorg xscreensaver xv xvid zeroconf zlib" ABI_X86="64" ADA_TARGET="gcc_12" AMDGPU_TARGETS="gfx1101 gfx908 gfx90a" 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 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 ntrip navcom oceanserver oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 tsip tripmate tnt ublox" GRUB_PLATFORMS="efi-64" GUILE_SINGLE_TARGET="3-0" GUILE_TARGETS="3-0" INPUT_DEVICES="libinput" KERNEL="linux" LCD_DEVICES="bayrad cfontz glk hd44780 lb216 lcdm001 mtxorb text" LLVM_SLOT="18" LLVM_TARGETS="SPIRV X86" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php8-2" POSTGRES_TARGETS="postgres16" PYTHON_SINGLE_TARGET="python3_12" PYTHON_TARGETS="python3_12" QEMU_USER_TARGETS="x86_64" RUBY_TARGETS="ruby32" SANE_BACKENDS="hp" VIDEO_CARDS="fbdev vesa dummy v4l lavapipe amdgpu radeonsi" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipp2p iface geoip fuzzy condition tarpit sysrq proto logmark ipmark dhcpmac delude chaos account"
YACC="byacc"
Unset:  ARFLAGS, ASFLAGS, CCLD, CONFIG_SHELL, CPPFLAGS, CTARGET, CXXFILT, ELFEDIT, EMERGE_DEFAULT_OPTS, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LFLAGS, LIBTOOL, LINGUAS, MAKE, MAKEFLAGS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_RSYNC_EXTRA_OPTS, PYTHONPATH, SIZE, YFLAGS
@ThisNekoGuy ThisNekoGuy added the bug Something isn't working label Oct 11, 2024
@PF4Public
Copy link
Owner

PF4Public commented Oct 11, 2024

If only every bug report was prepared as thorough as you did… Ah dreams :)

Unfortunately you haven't noticed a crucial warning in your logs:

else
ewarn "You need to expose \"av_stream_get_first_dts\" in ffmpeg via user patch"
fi

You could then search through existing issues and find the solution :)

And since you're new here, this comment and that issue in particular might be of interest to you.

@ThisNekoGuy
Copy link
Author

ThisNekoGuy commented Oct 11, 2024

Ah! I did miss that, oops.

That aside though, I did try building again without system-ffmpeg and did come across something similar for re2?
(Though, I did turn on custom-cflags this time because the lack of a higher MAKEOPTS value for build time is atrocious 🤢 - for context, the package.env value I have set for that is -j17)

../../gpu/command_buffer/service/program_manager.cc:610:10: error: no matching function for call to 'Consume'
  610 |   while (RE2::Consume(&input,
      |          ^~~~~~~~~~~~
/usr/include/re2/re2.h:432:15: note: candidate function template not viable: no known conversion from 'std::string_view *' (aka 'basic_string_view<char> *') to 'StringPiece *' for 1st argument
  432 |   static bool Consume(StringPiece* input, const RE2& re, A&&... a) {
      |               ^       ~~~~~~~~~~~~~~~~~~

@PF4Public
Copy link
Owner

PF4Public commented Oct 11, 2024

re2 was always problematic and I would advise you to try default USE flags to begin with. What's disabled by default might not work — FYI.

@ThisNekoGuy
Copy link
Author

And since you're new here, #318 (comment) and that issue in particular might be of interest to you.

Isn't that glibcxx flag only applicable for libstdc++ configurations, though? 🤔

@PF4Public
Copy link
Owner

And since you're new here, #318 (comment) and that issue in particular might be of interest to you.

Isn't that glibcxx flag only applicable for libstdc++ configurations, though? 🤔

Correct. Without libcxx it is exactly the configuration.

@ThisNekoGuy
Copy link
Author

ThisNekoGuy commented Oct 11, 2024

Correct. Without libcxx it is exactly the configuration.

I have the default-libcxx global use flag for my profile, so it's fine, I already use it by default; the Ungoogled-Chromium one just halts the build immediately with my configuration, which was why I turned that one off

@ThisNekoGuy
Copy link
Author

I managed to build it but got a segfault immediately (and I collected a backtrace), so I'm going to try building again overnight with -custom-cflags to see if I can reproduce it again soon

@ThisNekoGuy
Copy link
Author

ThisNekoGuy commented Oct 13, 2024

Alright, I confirmed that the crash happens even if using -custom-cflags:
ungoogled-chromium-backtrace.log

Thread 1 "chrome" received signal SIGSEGV, Segmentation fault.
0x000055555ee1bf76 in renderer_preferences_util::UpdateFromSystemSettings(blink::RendererPreferences*, Profile*) ()

@PF4Public
Copy link
Owner

You don't seem to be using GTK, would you be able to build again, but this time revert https://github.com/PF4Public/gentoo-overlay/blob/master/www-client/ungoogled-chromium/files/gtk-fix-prefers-color-scheme-query.diff?

Perhaps I should make it a conditional.

@ThisNekoGuy
Copy link
Author

Is there another patch it's dependent upon? 🤔
I tried setting things up to make a revert but the patch on its own fails:

sudo ebuild $(portageq get_repo_path / pf4public)/www-client/ungoogled-chromium/ungoogled-chromium-129.0.6668.89_p1.ebuild clean unpack

sudo mv /var/tmp/portage/www-client/ungoogled-chromium-129.0.6668.89_p1/ /mnt/hard-drive/ungoogled-chromium
sudo chown -R username:username /mnt/hard-drive/ungoogled-chromium
cd /mnt/hard-drive/ungoogled-chromium/work/chromium-129.0.6668.89/

git init
git add .
git commit -m "Initial commit"

## Apply the patch so we have something to make a revert patch from:
patch -p1 < /var/db/repos/pf4public/www-client/ungoogled-chromium/files/gtk-fix-prefers-color-scheme-query.diff
patching file ui/gtk/native_theme_gtk.cc
Hunk #1 FAILED at 116.
1 out of 1 hunk FAILED -- saving rejects to file ui/gtk/native_theme_gtk.cc.rej
patching file ui/gtk/native_theme_gtk.h
Hunk #1 succeeded at 65 with fuzz 1 (offset -28 lines).

@PF4Public
Copy link
Owner

I didn't understand what you were trying to do. What I would do is to start emerge as usual, wait until it starts to actually compile the thing, stop it, revert the patch and then continue the build with FEATURES=keepwork.

@ThisNekoGuy
Copy link
Author

ThisNekoGuy commented Oct 16, 2024

Ah, what I was doing was this:
https://wiki.gentoo.org/wiki/Creating_a_patch

But was going to get the diff from before the patch was applied (with git diff) to make a revert after applying the gtk patch that could be placed in /etc/portage/patches since it would be applied after the normal package patches.

actually compile the thing, stop it, revert the patch

How would I know how to revert the patch this way...?

@PF4Public
Copy link
Owner

How would I know how to revert the patch this way...?

If you attempt to apply the patch if it was already applied, patch asks if you'd like to revert it instead, you agree and voilà — patch reverted.

@ThisNekoGuy
Copy link
Author

So, I tried to rever the patch (patch -p1 < /var/db/repos/pf4public/www-client/ungoogled-chromium/files/gtk-fix-prefers-color-scheme-query.diff) :

patching file ui/gtk/native_theme_gtk.cc
Hunk #1 FAILED at 116.
1 out of 1 hunk FAILED -- saving rejects to file ui/gtk/native_theme_gtk.cc.rej
patching file ui/gtk/native_theme_gtk.h
Reversed (or previously applied) patch detected!  Assume -R? [n] y
Hunk #1 succeeded at 65 with fuzz 1 (offset -28 lines).

But then it decided to unpack the source and reapply all the patches again when using FEATURES=keepwork sudo emerge -r:

>>> Emerging (1 of 1) www-client/ungoogled-chromium-129.0.6668.100_p1::pf4public
 * chromium-129.0.6668.100.tar.xz BLAKE2B SHA512 size ;-) ...                                                                                                                                                 [ ok ]
 * ungoogled-chromium-129.0.6668.100-1.tar.gz BLAKE2B SHA512 size ;-) ...                                                                                                                                     [ ok ]
 * chromium-2d529e8960f7b46957445333ca25e6a53ca3141c.patch BLAKE2B SHA512 size ;-) ...                                                                                                                        [ ok ]
 * chromium-9cf5bed15b577aade699d1704bc2967f5bf6963e.patch BLAKE2B SHA512 size ;-) ...                                                                                                                        [ ok ]
 * chromium-32e65e4c14034d82fd856b38f37e9389ed500495.patch BLAKE2B SHA512 size ;-) ...                                                                                                                        [ ok ]
 * chromium-4b232f209824053242aa34d14eb860e392ad30b1.patch BLAKE2B SHA512 size ;-) ...                                                                                                                        [ ok ]
 * ruy-587c2cf8b11d3c32fa26887063eda3171a3d353e.patch BLAKE2B SHA512 size ;-) ...                                                                                                                             [ ok ]
 * chromium-84fcdd0620a72aa73ea521c682fb246067f2c14d.patch BLAKE2B SHA512 size ;-) ...                                                                                                                        [ ok ]
 * Checking for at least 4 GiB RAM ...                                                                                                                                                                        [ ok ]
 * Checking for at least 19 GiB disk space at "/var/tmp/portage/www-client/ungoogled-chromium-129.0.6668.100_p1/temp" ...                                                                                     [ ok ]
 * Determining the location of the kernel source code
 * Found kernel source directory:
 *     /usr/src/linux
 * Found sources for kernel version:
 *     6.10.9-tkg-eevdf-gentoo-llvm18-generic_v3
 * Checking for suitable kernel configuration options ...                                                                                                                                                     [ ok ]
>>> Unpacking source...
 * Unpacking chromium-129.0.6668.100.tar.xz to /var/tmp/portage/www-client/ungoogled-chromium-129.0.6668.100_p1/work

 (patches ensued, after)

@PF4Public
Copy link
Owner

So, did it work in the end?

@ThisNekoGuy
Copy link
Author

I had halted the build right there because it looked like it re-applied the patch...

@PF4Public
Copy link
Owner

Sooo?

What I would do is to start emerge as usual, wait until it starts to actually compile the thing, stop it, revert the patch and then continue the build with FEATURES=keepwork.

@ThisNekoGuy
Copy link
Author

But then it decided to unpack the source and reapply all the patches again when using FEATURES=keepwork sudo emerge -r:

I had halted the build right there because it looked like it re-applied the patch...

Was it supposed to re-apply the patch I just reverted by following those instructions...?

@PF4Public
Copy link
Owner

Well I see :) patch applied the patch with a fuzz and cannot therefore revert it automatically. You can manually revert it then. Just edit the files and remove the code added by it.

@ThisNekoGuy
Copy link
Author

ThisNekoGuy commented Oct 22, 2024

Hmmm, even after rebuilding it without the patch it still segfaults on the same spot...

Thread 1 "chrome" received signal SIGSEGV, Segmentation fault.
0x000055555e6a1e23 in renderer_preferences_util::UpdateFromSystemSettings(blink::RendererPreferences*, Profile*) ()
. . .
Thread 1 (Thread 0x7fffea4b15c0 (LWP 22150) "chrome"):
#0  0x000055555e6a1e23 in renderer_preferences_util::UpdateFromSystemSettings(blink::RendererPreferences*, Profile*) ()

@PF4Public
Copy link
Owner

Is the backtrace exactly the same?

@ThisNekoGuy
Copy link
Author

ThisNekoGuy commented Oct 22, 2024

Yeah: ungoogled-chromium-backtrace.log
Or rather, near identical; the original backtrace had 51 threads and the new one has 52, but the thread that threw the segfault is identical

@PF4Public
Copy link
Owner

Please try

  • Using an empty folder as a profile with --user-data-dir to make sure it is not something with your profile
  • Make sure the permissions for ~/.config/ungoogled-chromium are OK
  • Print local variables info locals, global variables info variables and registers info registers
  • List the sourcecode in place list
  • Print disas maybe

@ThisNekoGuy
Copy link
Author

ThisNekoGuy commented Oct 24, 2024

Used mktemp -d for --user-data-dir; creates user R+W+X directory and passes the path created to the output:

env platform=wayland gdb --args /usr/lib64/chromium-browser/chrome --extra-plugin-dir=/usr/lib64/nsbrowser/plugins --ozone-platform-hint=auto --enable-features=UseOzonePlatform,WaylandWindowDecorations --password-store=basic --user-data-dir="$(mktemp -d)"

Still reproduces the crash, and I can confirm the directory does at least get populated.

  • ~/.config/ungoogled-chromium has the same permissions: user-only read, write, and execute
  • info locals outputs info: No menu item 'locals' in node '(dir)Top'
  • info variables pulls up a man page
  • info registers outputs info: No menu item 'registers' in node '(dir)Top'
  • List the sourcecode in place list

I don't know what this means...

  • disas isn't a valid command on my system, and info disas just outputs info: No menu item 'disas' in node '(dir)Top'

@PF4Public
Copy link
Owner

  • Print local variables info locals, global variables info variables and registers info registers
  • List the sourcecode in place list
  • Print disas maybe

Those are gdb commands

@ThisNekoGuy
Copy link
Author

ThisNekoGuy commented Oct 24, 2024

I'm waiting on info variables at the moment; info locals outputted No symbol table info available. but info registers and disas both had outputs.

Meant to do list, but forgot (I skimmed over it for a moment); info variables seems to be taking a long time to do something for some reason...? (gdb is using 17GBs of RAM, too)

EDIT:
Oh... Oh my. I need a way to log this all to a file because it utterly consumes my terminal's scrollback history (not sure if tee would capture all of GDB's output); info variables dumps a massive amount of data...

...Now that it's finished spamming my terminal, I tried list and only got:

warning: 1      /var/tmp/portage/sys-libs/compiler-rt-18.1.8-r1/work/compiler-rt/lib/builtins/crtbegin.c: No such file or directory

for some reason? 🤔

@PF4Public
Copy link
Owner

info variables dumps a massive amount of data..

Well, that's not helpful :(

bt full might add variables, which is valuable.

@ThisNekoGuy
Copy link
Author

ThisNekoGuy commented Oct 25, 2024

Just in case I made a mistake, I rebuilt the package and lowered my compilation threads to 7, then added -ggdb3 (which worked this time - the original reason why this didn't work was a package.env mistake I made a while ago).

Includes:

  • thread apply all bt full
  • info locals (which works now)
  • list (which also works now)
  • and disas

@PF4Public
Copy link
Owner

PF4Public commented Oct 26, 2024

It is trying to call ThemeServiceFactory::GetForProfile(profile)->UsingSystemTheme(), but ThemeServiceFactory::GetForProfile(profile) returns null. I suspect this might be due to context = GetContextToUse(context); down the call chain returns null. If I'd be to debug this I'd put a break on chrome/browser/renderer_preferences_util.cc, void UpdateFromSystemSettings(blink::RendererPreferences* prefs, and stepped further to find out, what and why returns null.

I would also try omitting every commandline argument except --user-data-dir

@ThisNekoGuy
Copy link
Author

To be honest, I'm not particularly familiar with GDB to know how to set breakpoints for it like that...

@PF4Public
Copy link
Owner

I would also try omitting every commandline argument except --user-data-dir

?

@ThisNekoGuy
Copy link
Author

I understand that part (I can do that), it's this I was referring to:

If I'd be to debug this I'd put a break on chrome/browser/renderer_preferences_util.cc, void UpdateFromSystemSettings(blink::RendererPreferences* prefs, and stepped further to find out, what and why returns null.

Which I interpreted as a suggestion, since I have the affected build... Which was why I said what I did (#381 (comment))

@PF4Public
Copy link
Owner

I understand that part (I can do that)

I'm eager to see if it would make any difference :)

Which I interpreted as a suggestion, since I have the affected build...

That is absolutely correct, but if you're not familiar with gdb I cannot expect you to magically get familiar with it, so that further tinkering with gdb is ruled out.

@ThisNekoGuy
Copy link
Author

I reduced it to:

env platform=wayland gdb --args /usr/lib64/chromium-browser/chrome --user-data-dir="$(mktemp -d)"

(Although, I'll note that I only originally included --extra-plugin-dir=/usr/lib64/nsbrowser/plugins in the other attempts because it's used in the /usr/bin/chromium launch script)

This one is slightly different because it says it still crashes in renderer_preferences_util::UpdateFromSystemSettings but then doesn't specify blink::RendererPreferences* prefs for some reason.

@PF4Public
Copy link
Owner

Try --single-process chromium commandline

@ThisNekoGuy
Copy link
Author

@Kawanaao
Copy link
Contributor

I think we won't understand anything without debugging, as we're encountering the error when accessing nullptr, returning nullptr itself is not an error

I'll try to build it

@PF4Public
Copy link
Owner

I think we won't understand anything without debugging

I've already hinted that above ;) Unfortunately I'm very limited with my Internet access, computing power and I don't use wayland.

as we're encountering the error when accessing nullptr, returning nullptr itself is not an error

returning nullptr is not that bad, but dereferencing it (via -> operator) is!

@Kawanaao
Copy link
Contributor

Well.. I couldn't repeat the error, everything works :\

@ThisNekoGuy
Copy link
Author

It is trying to call ThemeServiceFactory::GetForProfile(profile)->UsingSystemTheme(), but ThemeServiceFactory::GetForProfile(profile) returns null. I suspect this might be due to context = GetContextToUse(context); down the call chain returns null. If I'd be to debug this I'd put a break on chrome/browser/renderer_preferences_util.cc, void UpdateFromSystemSettings(blink::RendererPreferences* prefs, and stepped further to find out, what and why returns null.

Trying to figure out how to do this but I'm struggling a bit. Specifically with chrome/browser/renderer_preferences_util.cc because it throws a "file not found" message after passing the breakpoint. Setting break renderer_preferences_util::UpdateFromSystemSettings works though, I'm just not sure how to proceed past that.

@ThisNekoGuy
Copy link
Author

Okay, so I set the breakpoint at:

renderer_preferences_util::UpdateFromSystemSettings(blink::RendererPreferences*, Profile*)

then, I stepped through the whole thing with next and used info locals, disas, then thread apply all bt full after each step until I eventually arrived at the crash. Hopefully this helps...?

@Kawanaao
Copy link
Contributor

I think you just went through the steps of the function itself, since I only see how the parameters inside UpdateFromSystemSettings change, but you need to go inside the functions that are called by UpdateFromSystemSettings, I think I can give some instructions, I'll write it out (or a script?)

@ThisNekoGuy
Copy link
Author

If you have instructions, I can try it
I don't know if a shell script would work since gdb would be a separate process?

@Kawanaao
Copy link
Contributor

Well.. tried working with rr, it doesn't support ipc, worked with gdb replay, but it couldn't collect information for two lines in 6 hours, suggest a compromise

cat <<EOF > script.gdb
set pagination off

define next_it_all
    set logging enabled on
    set logging file log.txt
    while 1
        thread 1
        next
        backtrace 3
        info locals
    end
end
EOF

gdb /usr/lib64/chromium-browser/chrome

(gdb) source script.gdb
(gdb) break GetServiceForContext
(gdb) run > /dev/null 2>&1
(gdb) next_it_all
(gdb) continue

The entire log will be saved in log.txt
I would like to use step, but it is too slow, it is much better to manually expand the stack step-by-step

@ThisNekoGuy
Copy link
Author

@Kawanaao
Copy link
Contributor

Kawanaao commented Oct 29, 2024

Something related to components/keyed_service/core/keyed_service_templated_factory.cc a function with nullptr comes out here

auto iterator = FindOrCreateMapping(context);
CHECK(iterator != mapping_.end());

MappingInfo& info = iterator->second;
...
if constexpr (std::same_as<ServicePtr, OwnedServicePtr>) {
        return info.service;
} else {
-->    return info.service.get();
}

It would be nice to see

cat <<EOF > script.gdb
set pagination off

define next_it_all
    set logging enabled on
    set logging file log.txt
    while 1
        thread 1
        next
        backtrace 3
        info locals
    end
end
EOF

gdb /usr/lib64/chromium-browser/chrome

(gdb) source script.gdb
(gdb) break FindOrCreateMapping
(gdb) run > /dev/null 2>&1
(gdb) next_it_all
(gdb) continue

@ThisNekoGuy
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants