Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Unsupported Software
  • Search

librewolf fails to build on musl

This forum covers all Gentoo-related software not officially supported by Gentoo. Ebuilds/software posted here might harm the health and stability of your system(s), and are not supported by Gentoo developers. Bugs/errors caused by ebuilds from overlays.gentoo.org are covered by this forum, too.
Post Reply
Advanced search
3 posts • Page 1 of 1
Author
Message
stdnt
n00b
n00b
Posts: 6
Joined: Thu Apr 25, 2024 11:54 pm

librewolf fails to build on musl

  • Quote

Post by stdnt » Mon Jan 05, 2026 11:12 pm

emerge --info '=www-client/librewolf-146.0_p2::librewolf'

Code: Select all

Portage 3.0.72 (python 3.13.9-final-0, default/linux/amd64/23.0/musl/hardened, gcc-15, musl-1.2.5-r5, 6.12.58-gentoo-dist x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-6.12.58-gentoo-dist-x86_64-Intel-R-_Core-TM-2_Duo_CPU_L9300_@_1.60GHz-with-libc
KiB Mem:     3831288 total,   2094896 free
KiB Swap:   16777212 total,  16777212 free
Timestamp of repository gentoo: Mon, 29 Dec 2025 13:50:00 +0000
Head commit of repository gentoo: dd5eca9f660e52f9a7cfbba84fd7e802e6aa2bcd
Timestamp of repository guru: Sat, 27 Dec 2025 21:16:21 +0000
Head commit of repository guru: f0d934197e9e16cb2b8439b888300fbdb5733b15

Head commit of repository librewolf: eb04f8eddaa130053e1779ca69dd5b510d848f64

sh bash 5.3_p3-r3
ld GNU ld (Gentoo 2.45.1 p1) 2.45.1
app-misc/pax-utils:        1.3.8::gentoo
app-shells/bash:           5.3_p3-r3::gentoo
dev-build/autoconf:        2.72-r4::gentoo
dev-build/automake:        1.18.1::gentoo
dev-build/cmake:           4.1.2-r1::gentoo
dev-build/libtool:         2.5.4::gentoo
dev-build/make:            4.4.1-r102::gentoo
dev-build/meson:           1.9.1::gentoo
dev-lang/perl:             5.42.0-r1::gentoo
dev-lang/python:           3.13.9::gentoo, 3.14.0_p1::gentoo
dev-lang/rust:             1.89.0::gentoo, 1.90.0-r1::gentoo, 1.91.0::gentoo
llvm-core/clang:           20.1.8::gentoo, 21.1.8::gentoo
llvm-core/lld:             20.1.8::gentoo, 21.1.8::gentoo
llvm-core/llvm:            20.1.8::gentoo, 21.1.8::gentoo
sys-apps/baselayout:       2.18::gentoo
sys-apps/openrc:           0.62.10::gentoo
sys-apps/sandbox:          2.46::gentoo
sys-devel/binutils:        2.45.1::gentoo
sys-devel/binutils-config: 5.6::gentoo
sys-devel/gcc:             15.2.1_p20251122::gentoo
sys-devel/gcc-config:      2.12.2::gentoo
sys-kernel/linux-headers:  6.12::gentoo (virtual/os-headers)
sys-libs/musl:             1.2.5-r5::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-jobs: 1
    sync-rsync-extra-opts: 
    sync-rsync-verify-max-age: 3
    sync-rsync-verify-metamanifest: yes

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

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

Binary Repositories:

gentoobinhost
    priority: 1
    sync-uri: https://distfiles.gentoo.org/releases/amd64/binpackages/23.0/x86-64_musl_hardened

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-musl"
CFLAGS="-O2 -pipe"
CHOST="x86_64-pc-linux-musl"
CONFIG_PROTECT="/etc /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/sandbox.d"
CXXFLAGS="-O2 -pipe"
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="-O2 -pipe"
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 network-sandbox news parallel-fetch pid-sandbox pkgdir-index-trusted preserve-libs protect-owned qa-unresolved-soname-deps sandbox strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="https://gentoo.osuosl.org/"
INSTALL_MASK="charset.alias /usr/share/locale/locale.alias"
LANG="en_US.UTF-8"
LC_ALL="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-z,pack-relative-relocs"
LEX="flex"
MAKEOPTS="-j2"
PKGDIR="/var/cache/binpkgs"
PORTAGE_COMPRESS="bzip2"
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="/usr/bin/bash"
USE="acl alsa amd64 bzip2 cet crypt dbus hardened iconv ipv6 libtirpc ncurses openmp pam pcre pic pie pipewire readline seccomp ssl ssp test-rust unicode wayland xattr xtpax zlib" ABI_X86="64" ADA_TARGET="gcc_15" 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="mmx mmxext sse sse2" ELIBC="musl" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax navcom oceanserver oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 tsip tripmate tnt ublox" 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_TARGETS="X86" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php8-3" POSTGRES_TARGETS="postgres17" PYTHON_SINGLE_TARGET="python3_13" PYTHON_TARGETS="python3_13" RUBY_TARGETS="ruby32 ruby33" VIDEO_CARDS="amdgpu fbdev intel nouveau radeon radeonsi vesa dummy" 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, EMERGE_DEFAULT_OPTS, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, LD, LFLAGS, LIBTOOL, LINGUAS, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PYTHONPATH, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS

emerge -pqv '=www-client/librewolf-146.0_p2::librewolf'

Code: Select all

[ebuild  N    ] www-client/librewolf-146.0_p2  USE="X clang dbus gmp-autoupdate hardened jumbo-build openh264 pulseaudio system-av1 system-harfbuzz system-icu system-jpeg system-libevent system-libvpx system-webp wayland -debug -eme-free -hwaccel -jack -jpegxl -libproxy -pgo (-selinux) -sndio -system-pipewire -system-png -telemetry -test -valgrind -wasm-sandbox -wifi" L10N="-ach -af -an -ar -ast -az -be -bg -bn -br -bs -ca -ca-valencia -cak -cs -cy -da -de -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 -skr -sl -son -sq -sr -sv -szl -ta -te -th -tl -tr -trs -uk -ur -uz -vi -xh -zh-CN -zh-TW" LLVM_SLOT="21 -19 -20"
cat /var/tmp/portage/www-client/librewolf-146.0_p2/temp/build.log
https://gofile.io/d/VVrSKF
Top
GDH-gentoo
Advocate
Advocate
User avatar
Posts: 2110
Joined: Sat Jul 20, 2019 7:02 pm
Location: South America

Re: librewolf fails to build on musl

  • Quote

Post by GDH-gentoo » Tue Jan 06, 2026 8:07 pm

Note: this is coming from an alternative ebuild repository.
stdnt wrote:cat /var/tmp/portage/www-client/librewolf-146.0_p2/temp/build.log
https://gofile.io/d/VVrSKF
(it was hard getting that to display correctly, next time use something else)

Code: Select all

 In file included from Unified_cpp_form_thread_types_gn0.cpp:2:
 In file included from /var/tmp/portage/www-client/librewolf-146.0_p2/work/librewolf-146.0-2/third_party/libwebrtc/rtc_base/platform_thread_types.cc:16:
 In file included from /var/tmp/portage/www-client/librewolf-146.0_p2/work/librewolf_build/dist/system_wrappers/sys/prctl.h:3:
 /usr/include/sys/prctl.h:88:8: error: redefinition of 'prctl_mm_map'
    88 | struct prctl_mm_map {
       |        ^
 /usr/include/linux/prctl.h:134:8: note: previous definition is here
   134 | struct prctl_mm_map {
       |        ^
 1 warning and 1 error generated.
As far as I can see:

librewolf-146.0-2/third_party/libwebrtc/rtc_base/platform_thread_types.cc

Code: Select all

// IWYU pragma: begin_keep
#if defined(WEBRTC_LINUX)
#include <linux/prctl.h>
#include <sys/prctl.h>
// ...
#endif
Looks like a portability bug, probably upstream: <linux/prctl.h> from the kernel headers package and <sys/prctl.h> from the libc can't end up getting both included in the same source file when using musl; musl's version of the libc header defines struct prctl_mm_map (in a way that is compatible with what the Linux system call expects, obviously), while GNU libc's version contains an #include <linux/prctl.h> directive instead, and gets the definition of the structure type from the kernel header. So with musl, including both headers creates a double definition.
NeddySeagoon wrote:I'm not a witch, I'm a retired electronics engineer :)
Ionen wrote:As a packager I just don't want things to get messier with weird build systems and multiple toolchains requirements though :)
Top
yuviazzz
n00b
n00b
Posts: 32
Joined: Fri Sep 06, 2024 7:23 pm
Location: Sweden

Re: librewolf fails to build on musl

  • Quote

Post by yuviazzz » Thu Jan 08, 2026 6:56 pm

until librewolf maintainers update librewolf (on the overlay and just in general) you can patch out the <linux/prctl.h> include with a user patch. i encountered this too and this was my solution until update fixed it
Top
Post Reply

3 posts • Page 1 of 1

Return to “Unsupported Software”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy