Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 915651 - www-client/firefox-118.0.2: Don't know how to translate x86_64-gentoo-linux-musl for rustc with >=dev-lang/rust-1.73
Summary: www-client/firefox-118.0.2: Don't know how to translate x86_64-gentoo-linux-m...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Mozilla Gentoo Team
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2023-10-12 20:48 UTC by Violet Purcell
Modified: 2024-10-28 11:43 UTC (History)
13 users (show)

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


Attachments
Add gentoo vendor alias (add-rust-gentoo-vendor-alias.patch,1.02 KB, patch)
2023-10-15 16:16 UTC, Sven Volkinsfeld
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Violet Purcell 2023-10-12 20:48:17 UTC
This is an issue with >=dev-lang/rust-1.73. In the function detect_rustc_target in build/moz.configure/rust.configure, mach attempts to detect the correct target to pass to rustc. Since rustc does not recognize x86_64-gentoo-linux-musl, it's meant to detect x86_64-unknown-linux-musl using just x86_64-*-linux-musl to match. This worked in the past because x86_64-unknown-linux-musl was the only target that matches x86_64-*-linux-musl. However, 1.73 introduced the x86_64-unikraft-linux-musl, which makes firefox unable to narrow down a rustc target and fail during configure.

emerge --info www-client/firefox:
Portage 3.0.52 (python 3.12.0-final-0, features/hardened/amd64, [unavailable], musl-1.2.4, 6.5.6-gentoo-dist-hardened x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-6.5.6-gentoo-dist-hardened-x86_64-AMD_Ryzen_7_7700X_8-Core_Processor-with-libc
KiB Mem:    32561292 total,   1043536 free
KiB Swap:          0 total,         0 free
Head commit of repository gentoo: 86ff5ce7c85ec720fa4bd5e48e05f4644dfecf5f

Head commit of repository guru: 72ea9fe9f35fd1c3d93932224e7abd92543c9823

Head commit of repository haskell: 74a21c9046a6656c0bd5f76017d0b4054dc9c0af

Head commit of repository vimproved: 124c7cc66b3939374c68dcbbd34c1667a19988cc

sh mksh 59c
ld LLD 17.0.2 (compatible with GNU linkers)
app-misc/pax-utils:        1.3.7::gentoo
app-shells/bash:           5.2_p15-r7::gentoo
dev-lang/perl:             5.38.0-r1::gentoo
dev-lang/python:           3.11.6::gentoo, 3.12.0::gentoo
dev-lang/rust:             1.73.0::gentoo
dev-util/cmake:            3.27.7::gentoo
dev-util/meson:            1.2.2-r1::gentoo
sys-apps/baselayout:       2.14::gentoo
sys-apps/openrc:           0.51::gentoo
sys-apps/sandbox:          2.38::gentoo
sys-devel/autoconf:        2.13-r8::gentoo, 2.71-r7::gentoo
sys-devel/automake:        1.16.5-r1::gentoo
sys-devel/binutils-config: 5.5::gentoo
sys-devel/clang:           16.0.6::gentoo, 17.0.2::gentoo
sys-devel/libtool:         2.4.7-r1::gentoo
sys-devel/lld:             16.0.6::gentoo, 17.0.2::gentoo
sys-devel/llvm:            16.0.6::gentoo, 17.0.2-r1::gentoo
sys-devel/make:            4.4.1-r1::gentoo
sys-kernel/linux-headers:  6.5-r1::gentoo (virtual/os-headers)
sys-libs/musl:             1.2.4::gentoo
Repositories:

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

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

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

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

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="@FREE"
ADDR2LINE="llvm-addr2line"
AR="llvm-ar"
AS="clang -c"
CBUILD="x86_64-gentoo-linux-musl"
CC="clang"
CFLAGS="-march=znver4 -O3 -pipe -flto=thin"
CHOST="x86_64-gentoo-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"
CPP="clang-cpp"
CXX="clang++"
CXXFLAGS="-march=znver4 -O3 -pipe -flto=thin"
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 candy config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync network-sandbox news 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="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
INSTALL_MASK="charset.alias /usr/share/locale/locale.alias"
LANG="C.UTF-8"
LD="ld.lld"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-z,pack-relative-relocs -Wl,--as-needed"
LEX="reflex"
MAKEOPTS="-j16"
NM="llvm-nm"
OBJCOPY="llvm-objcopy"
OBJDUMP="llvm-objdump"
PKGDIR="/var/cache/binpkgs"
PORTAGE_COMPRESS="gzip"
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="llvm-ranlib"
READELF="llvm-readelf"
RUSTFLAGS="-C target-cpu=znver4"
SHELL="/bin/bash"
STRINGS="llvm-strings"
STRIP="llvm-strip"
USE="amd64 bzip2 cet clang crypt dist-kernel hardened iconv ipv6 libtirpc llvm-libunwind lzma modules-sign ncurses nptl pam pcre pie readline seccomp secureboot ssl ssp test-rust unicode xattr xtpax zlib zstd" ABI_X86="64" ADA_TARGET="gnat_2021" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache 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 avx512f avx512dq avx512cd avx512bw avx512vl avx512vbmi f16c fma3 mmx mmxext pclmul popcnt rdrand sha sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3" ELIBC="musl" 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="libinput" KERNEL="linux" L10N="en" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LLVM_TARGETS="AArch64 AMDGPU X86" LUA_SINGLE_TARGET="luajit" LUA_TARGETS="luajit" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php8-1" POSTGRES_TARGETS="postgres15" PYTHON_SINGLE_TARGET="python3_12" PYTHON_TARGETS="python3_11 python3_12" RUBY_TARGETS="ruby32" VIDEO_CARDS="amdgpu radeonsi" 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"
YACC="byacc"
Unset:  ARFLAGS, ASFLAGS, CCLD, CONFIG_SHELL, CPPFLAGS, CTARGET, CXXFILT, ELFEDIT, EMERGE_DEFAULT_OPTS, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, LC_ALL, LFLAGS, LIBTOOL, LINGUAS, MAKE, MAKEFLAGS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, SIZE, YFLAGS

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

www-client/firefox-118.0.1::gentoo was built with the following:
USE="(clang) eme-free hardened hwaccel jumbo-build lto openh264 pulseaudio screencast system-av1 system-harfbuzz system-icu system-jpeg (system-libevent) system-libvpx system-png system-webp wayland -X -dbus -debug -geckodriver (-gmp-autoupdate) -jack -libproxy (-pgo) (-selinux) -sndio (-system-python-libs) -telemetry (-valgrind) -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 -sl -son -sq -sr -sv -szl -ta -te -th -tl -tr -trs -uk -ur -uz -vi -xh -zh-CN -zh-TW"
CFLAGS="-march=znver4 -pipe"
CXXFLAGS="-march=znver4 -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 network-sandbox news 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"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-z,pack-relative-relocs -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,--compress-debug-sections=zlib -Wl,-rpath=/usr/lib/firefox,--enable-new-dtags"
Comment 1 Violet Purcell 2023-10-12 20:51:06 UTC
I know that many other musl distros that set a custom triple (i.e. alpine) patch rust to add a new target. Is this a possibility for gentoo or would it just be too much because of the amount of tuples?
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-10-12 23:25:37 UTC
Take a look at the patch I popped in bug 748849 (which is based on the one q66 mentioned to you). Maybe it's time to just revisit that again.
Comment 3 Sven Volkinsfeld 2023-10-15 16:16:04 UTC
Created attachment 872936 [details, diff]
Add gentoo vendor alias

Could we just add an alias for the "gentoo" vendor in rust.configure, similar to the "w64" or "windows" vendor on WINNT?
Comment 4 Joonas Niilola gentoo-dev 2023-10-15 17:19:26 UTC
(In reply to Sven Volkinsfeld from comment #3)
> Created attachment 872936 [details, diff] [details, diff]
> Add gentoo vendor alias
> 
> Could we just add an alias for the "gentoo" vendor in rust.configure,
> similar to the "w64" or "windows" vendor on WINNT?

Not as a longterm solution if it requires rebasing the patch every release (or every time upstream updates that rust.configure).
Comment 5 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-10-15 17:21:33 UTC
Right, if we're going to do that, it makes more sense to use my one as it's way smaller and it fixes the real issue (the build system being too smart).
Comment 6 Joonas Niilola gentoo-dev 2023-10-17 16:10:56 UTC
Btw is this only happening with rust-bin-1.73? So the source version of rust works, or downgrading to rust-bin-1.72?


(In reply to Sven Volkinsfeld from comment #3)
> Created attachment 872936 [details, diff] [details, diff]
> Add gentoo vendor alias
> 
> Could we just add an alias for the "gentoo" vendor in rust.configure,
> similar to the "w64" or "windows" vendor on WINNT?

Actually the file has pretty low activity overall, 
https://hg.mozilla.org/releases/mozilla-release/log/tip/build/moz.configure/rust.configure
but unfortunately the patch didn't work for me. There'll be a mismatch between our toolchain and rust which segfaults rust when compiling.
Comment 7 orbea 2023-10-18 14:55:12 UTC
> So the source version of rust works

No, I can reproduce this with dev-lang/rust-1.73.0.
Comment 8 Violet Purcell 2023-10-19 19:12:45 UTC
(In reply to Joonas Niilola from comment #6)
> Btw is this only happening with rust-bin-1.73? So the source version of rust
> works, or downgrading to rust-bin-1.72?
> 
> 
> (In reply to Sven Volkinsfeld from comment #3)
> > Created attachment 872936 [details, diff] [details, diff] [details, diff]
> > Add gentoo vendor alias
> > 
> > Could we just add an alias for the "gentoo" vendor in rust.configure,
> > similar to the "w64" or "windows" vendor on WINNT?
> 
> Actually the file has pretty low activity overall, 
> https://hg.mozilla.org/releases/mozilla-release/log/tip/build/moz.configure/
> rust.configure
> but unfortunately the patch didn't work for me. There'll be a mismatch
> between our toolchain and rust which segfaults rust when compiling.

This is just a general rust 1.73 issue, not specific to source or bin.
Comment 9 ernsteiswuerfel archtester 2023-12-04 15:58:25 UTC
(In reply to Sam James from comment #2)
> Take a look at the patch I popped in bug 748849 (which is based on the one
> q66 mentioned to you). Maybe it's time to just revisit that again.
Put in /etc/patches/www-client/firefox this patch applies but unfortunately it does not fix the build.

That is on firefox-115.5.0.
Comment 10 orbea 2023-12-04 18:50:23 UTC
You also need this line somewhere in /etc/portage/env/

  RUST_TARGET='x86_64-unknown-linux-musl'

And in /etc/portage/package.env/ add a line like:

  www-client/firefox firefox-hack.conf
Comment 11 Joonas Niilola gentoo-dev 2023-12-04 19:08:23 UTC
(In reply to orbea from comment #10)
> You also need this line somewhere in /etc/portage/env/
> 
>   RUST_TARGET='x86_64-unknown-linux-musl'
> 
> And in /etc/portage/package.env/ add a line like:
> 
>   www-client/firefox firefox-hack.conf

Can you make it build with that? Because adding the patch and exporting that in our ebuild would be easy. I think it still failed for me.
Comment 12 orbea 2023-12-05 15:00:01 UTC
Using both the patch and exporting that has worked for me ever since this issue was reintroduced for both firefox and librewolf (From an overlay).

Essentially what is written in this comment works. https://bugs.gentoo.org/748849#c5
Comment 13 Joonas Niilola gentoo-dev 2023-12-05 15:02:46 UTC
(In reply to orbea from comment #12)
> Using both the patch and exporting that has worked for me ever since this
> issue was reintroduced for both firefox and librewolf (From an overlay).
> 
> Essentially what is written in this comment works.
> https://bugs.gentoo.org/748849#c5

Do you inherit rust-toolchain.eclass? My rustc segfaults if I only add the patch and 
  export RUST_TARGET="x86_64-unknown-linux-musl"

using rust-bin though. Wonder if the source version works better (the comments say no)
Comment 14 orbea 2023-12-05 15:16:27 UTC
I was inheriting rust-toolchain.eclass until I got tired of updating the ebuilds every bump and switched to the hack in /etc/portage/env/. I am also using the source version of rust and am unsure if the rust-bin works or not.
Comment 15 Joonas Niilola gentoo-dev 2023-12-05 17:59:31 UTC
Hmm indeed it does work with source-rust, but not with rust-bin.
Comment 16 Larry the Git Cow gentoo-dev 2023-12-19 12:14:10 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8817a6cb6beab2104b7d4c90b3bb2280391e8e90

commit 8817a6cb6beab2104b7d4c90b3bb2280391e8e90
Author:     Joonas Niilola <juippis@gentoo.org>
AuthorDate: 2023-12-19 12:11:39 +0000
Commit:     Joonas Niilola <juippis@gentoo.org>
CommitDate: 2023-12-19 12:11:58 +0000

    www-client/firefox: add 121.0
    
     - attempt a fix on musl, where >=rust-bin-1.73 doesn't work anymore,
       but a source-built version does.
    
    Bug: https://bugs.gentoo.org/915651
    Signed-off-by: Joonas Niilola <juippis@gentoo.org>

 www-client/firefox/Manifest             |  101 +++
 www-client/firefox/firefox-121.0.ebuild | 1461 +++++++++++++++++++++++++++++++
 2 files changed, 1562 insertions(+)
Comment 17 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-12-19 12:37:38 UTC
Is there a reason to not go with my patch?
Comment 18 Joonas Niilola gentoo-dev 2023-12-19 16:12:08 UTC
So as per the discussion in #gentoo-mozilla the real fix needs to happen in rust-toolchain.eclass. That'll allow us to use $(rust_abi) correctly in the ebuild which should work with glibc and musl.
Comment 19 Mia Rain 2024-01-16 11:00:08 UTC
this also appears to be happening with dev-lang/spidermonkey
Comment 20 Petr Vaněk gentoo-dev 2024-01-17 19:35:30 UTC
For the record, I encountered this issue with www-client/firefox-115.6.0:esr and dev-lang/rust-1.74.1.
Comment 21 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-01-19 05:10:34 UTC
Note that the dep added here is also confusing Portage (bug 915494).
Comment 22 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-01-19 05:11:27 UTC
(In reply to Petr Vaněk from comment #20)
> For the record, I encountered this issue with www-client/firefox-115.6.0:esr
> and dev-lang/rust-1.74.1.

Could you implement the fix? It should be straightforward.

See https://bugs.gentoo.org/915651#c18 -- we need to add a variable into rust-toolchain.eclass to allow disabling its multilib bits so that inheriting it in the firefox ebuild doesn't cause it to gain ABI_X86_64/32.
Comment 23 12101111 2024-01-23 15:46:22 UTC
I got this message on a aarch64-unknown-linux-musl system: Unknown musl chost, please post your rustc -vV along with emerge --info on Gentoo's bug #915651.

So I post those output here:

> rustc -Vv
rustc 1.75.0 (82e1608df 2023-12-21) (gentoo)
binary: rustc
commit-hash: 82e1608dfa6e0b5569232559e3d385fea5a93112
commit-date: 2023-12-21
host: aarch64-unknown-linux-musl
release: 1.75.0
LLVM version: 17.0.6

> emerge --info www-client/firefox
--- Unmatched removal atom(s) in /usr/portage/gentoo/profiles/features/merged-usr/package.mask: ->=sys-apps/systemd-255
Portage 3.0.61 (python 3.11.7-final-0, targets/systemd, gcc-13, musl-1.2.4-r1, 6.6.0-asahi+ aarch64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-6.6.0-asahi+-aarch64-with-libc
KiB Mem:    65708704 total,   8438896 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Tue, 23 Jan 2024 14:03:20 +0000
Head commit of repository gentoo: 95c4cd758931f2e517b26c3af63155a292f9a281

Head commit of repository asahi: c5cbf46e8ebc820d6b926746996decf5df478875

Timestamp of repository gentoo-zh: Tue, 23 Jan 2024 13:48:05 +0000
Head commit of repository gentoo-zh: 74c93ade88e3a2dcc703291b5cf1823dc93e7de3

Timestamp of repository guru: Mon, 22 Jan 2024 17:35:12 +0000
Head commit of repository guru: cdad4c7b392e13622e10f68e81bb3fdf61872b99

Timestamp of repository mv: Sat, 20 Jan 2024 15:33:14 +0000
Head commit of repository mv: 846490679f76f29614ddbe0d141b5898c7cb895c

sh bash 5.2_p26
ld GNU ld (Gentoo 2.41 p4) 2.41.0
ccache version 4.9 [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-r1::gentoo
dev-build/cmake:           3.28.1-r1::gentoo
dev-build/libtool:         2.4.7-r2::gentoo
dev-build/make:            4.4.1-r1::gentoo
dev-build/meson:           1.3.1-r1::gentoo
dev-lang/perl:             5.38.2-r1::gentoo
dev-lang/python:           3.11.7::gentoo, 3.12.1_p1::gentoo
dev-lang/rust:             1.75.0::12101111-overlay
dev-util/ccache:           4.9::gentoo
sys-apps/baselayout:       2.14-r1::gentoo
sys-apps/sandbox:          2.38::gentoo
sys-apps/systemd:          254.8-r1::12101111-overlay
sys-devel/binutils:        2.41-r4::12101111-overlay
sys-devel/binutils-config: 5.5::gentoo
sys-devel/clang:           17.0.6::gentoo
sys-devel/gcc:             13.2.1_p20240113-r1::gentoo
sys-devel/gcc-config:      2.11::gentoo
sys-devel/lld:             17.0.6::gentoo
sys-devel/llvm:            17.0.6::gentoo
sys-kernel/linux-headers:  6.7::gentoo (virtual/os-headers)
sys-libs/musl:             1.2.4-r1::12101111-overlay
Repositories:

gentoo
    location: /usr/portage/gentoo
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/gentoo
    priority: -1000
    volatile: True

asahi
    location: /usr/portage/asahi
    sync-type: git
    sync-uri: https://github.com/chadmed/asahi-overlay
    masters: gentoo
    volatile: True

gentoo-zh
    location: /usr/portage/gentoo-zh
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/gentoo-zh.git
    masters: gentoo
    volatile: True

guru
    location: /usr/portage/guru
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/guru.git
    masters: gentoo
    volatile: True

mv
    location: /usr/portage/mv
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/mv.git
    masters: gentoo
    volatile: True

12101111-overlay
    location: /usr/portage/local
    masters: gentoo
    priority: 1000
    volatile: True

ACCEPT_KEYWORDS="arm64 ~arm64"
ACCEPT_LICENSE="@FREE"
ADDR2LINE="llvm-addr2line"
AR="llvm-ar"
AS="clang -c"
CBUILD="aarch64-unknown-linux-musl"
CC="clang"
CFLAGS="-mcpu=apple-m1 -O3 -pipe"
CHOST="aarch64-unknown-linux-musl"
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"
CPP="clang-cpp"
CXX="clang++"
CXXFLAGS="-mcpu=apple-m1 -O3 -pipe -stdlib=libc++"
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 buildpkg-live candy config-protect-if-modified distlocks downgrade-backup ebuild-locks fixlafiles ipc-sandbox merge-sync network-sandbox news 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="-O2 -pipe"
GENTOO_MIRRORS="https://mirrors.tuna.tsinghua.edu.cn/gentoo"
INSTALL_MASK="charset.alias /usr/share/locale/locale.alias"
LANG="zh_CN.UTF-8"
LD="ld.lld"
LDFLAGS="-fuse-ld=lld -rtlib=compiler-rt -unwindlib=libunwind  -Wl,--lto-O3,-O3,--icf=safe,-zrelro,-znow -Wl,--as-needed -Wl,--gc-sections -mcpu=apple-m1"
LEX="flex"
MAKEOPTS="-j10"
NM="llvm-nm"
OBJCOPY="llvm-objcopy"
OBJDUMP="llvm-objdump"
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="/tmp"
RANLIB="llvm-ranlib"
READELF="llvm-readelf"
RUSTFLAGS="-Ctarget-cpu=apple-m1 -Clinker=clang -Clink-arg=-fuse-ld=lld -Ctarget-feature=-crt-static"
SHELL="/bin/zsh"
STRINGS="llvm-strings"
STRIP="llvm-strip"
USE="X acl alsa arm64 bluetooth bzip2 clang compiler-rt crypt cups dbus default-compiler-rt default-libcxx iconv ipv6 libcxx libcxxabi libtirpc libunwind llvm-libunwind lto lzma ncurses nls opengl pam pcre pgo pic policykit pulseaudio readline seccomp ssl systemd test-rust udev unicode wayland xattr zlib zstd" ADA_TARGET="gnat_2021" ALSA_CARDS="usb-audio" 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 vfp vfpv3 vfpv4 vfp-d32 aes sha1 sha2 crc32 v8" ELIBC="musl" 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="evdev libinput" KERNEL="linux" L10N="zh-CN zh" LCD_DEVICES="bayrad cfontz glk hd44780 lb216 lcdm001 mtxorb text" LLVM_TARGETS="X86 ARM AArch64 RISCV WebAssembly AMDGPU AVR BPF Hexagon Lanai MSP430 Mips NVPTX PowerPC Sparc SystemZ XCore" LUA_SINGLE_TARGET="luajit" LUA_TARGETS="luajit" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php8-1" POSTGRES_TARGETS="postgres15" PYTHON_SINGLE_TARGET="python3_11" PYTHON_TARGETS="python3_11" QEMU_USER_TARGETS="i386 x86_64 arm riscv32 riscv64" RUBY_TARGETS="ruby32" VIDEO_CARDS="virgl asahi" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipp2p iface geoip fuzzy condition tarpit sysrq proto logmark ipmark dhcpmac delude chaos account"
Unset:  ARFLAGS, ASFLAGS, CCLD, CONFIG_SHELL, CPPFLAGS, CTARGET, CXXFILT, ELFEDIT, EMERGE_DEFAULT_OPTS, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, LC_ALL, LFLAGS, LIBTOOL, LINGUAS, MAKE, MAKEFLAGS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PYTHONPATH, SIZE, YACC, YFLAGS

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

www-client/firefox-120.0.1::gentoo was built with the following:
USE="X (clang) dbus geckodriver gmp-autoupdate hwaccel jumbo-build lto pulseaudio screencast system-av1 system-harfbuzz system-icu system-jpeg (system-libevent) system-libvpx system-png system-webp telemetry wayland -debug (-eme-free) (-hardened) -jack -libproxy -openh264 -pgo (-selinux) -sndio (-system-python-libs) (-valgrind) -wifi" CPU_FLAGS_ARM="(-neon)" L10N="zh-CN -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 -sl -son -sq -sr -sv -szl -ta -te -th -tl -tr -trs -uk -ur -uz -vi -xh -zh-TW"
CFLAGS="-mcpu=apple-m1 -pipe"
CXXFLAGS="-mcpu=apple-m1 -pipe -stdlib=libc++"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs buildpkg-live candy config-protect-if-modified distlocks downgrade-backup ebuild-locks fixlafiles ipc-sandbox merge-sync network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
LDFLAGS="-fuse-ld=lld -rtlib=compiler-rt -unwindlib=libunwind -Wl,--lto-O3,-O3,--icf=safe,-zrelro,-znow -Wl,--as-needed -Wl,--gc-sections -mcpu=apple-m1 -Wl,--compress-debug-sections=zlib -Wl,-rpath=/usr/lib/firefox,--enable-new-dtags"

It seems this check is only needed for x86 and arm

> rustc --print target-list | grep linux-musl | grep aarch64
aarch64-unknown-linux-musl
> rustc --print target-list | grep linux-musl | grep 86
i586-unknown-linux-musl
i686-unknown-linux-musl
x86_64-unikraft-linux-musl
x86_64-unknown-linux-musl
> rustc --print target-list | grep linux-musl | grep riscv
riscv32gc-unknown-linux-musl
riscv64gc-unknown-linux-musl
> rustc --print target-list | grep linux-musl | grep powerpc
powerpc-unknown-linux-musl
powerpc64-unknown-linux-musl
powerpc64le-unknown-linux-musl
> rustc --print target-list | grep linux-musl | grep arm
arm-unknown-linux-musleabi
arm-unknown-linux-musleabihf
armv5te-unknown-linux-musleabi
armv7-unknown-linux-musleabi
armv7-unknown-linux-musleabihf
Comment 24 Michael Orlitzky gentoo-dev 2024-10-28 11:43:57 UTC
 * ERROR: www-client/firefox-131.0.3::gentoo failed (prepare phase):
 *   Unknown musl chost, please post your rustc -vV along with emerge --info on Gentoo's bug #915651

As requested:

$ rustc -vV
rustc 1.82.0 (f6e511eec 2024-10-15) (gentoo)
binary: rustc
commit-hash: f6e511eec7342f59a25f7c0534f1dbea00d01b14
commit-date: 2024-10-15
host: riscv64gc-unknown-linux-musl
release: 1.82.0
LLVM version: 19.1.1

And,

$ emerge --info
Portage 3.0.66.1 (python 3.12.7-final-0, default/linux/riscv/23.0/rv64/lp64d/musl, gcc-14, musl-1.2.5-r1, 6.1.80+ riscv64)
=================================================================
System uname: Linux-6.1.80+-riscv64-with-libc
KiB Mem:   131934008 total, 129517668 free
KiB Swap:   31483896 total,  31483896 free
Head commit of repository gentoo: ea954079af6a11a5d5451daeec5652fed1b2c72b

Head commit of repository sage-on-gentoo: f6e50e81e0681f8a01931405a3f6bb8f2bcb8075

Head commit of repository viabit: f5f4552366e70deb5257f6de96f7e476d5f5e8db

sh dash 0.5.12
ld GNU ld (Gentoo 2.43 p2) 2.43.1
app-misc/pax-utils:        1.3.8::gentoo
app-shells/bash:           5.2_p37::gentoo
dev-build/autoconf:        2.13-r8::gentoo, 2.72-r1::gentoo
dev-build/automake:        1.17-r1::gentoo
dev-build/cmake:           3.30.5::gentoo
dev-build/libtool:         2.5.3::gentoo
dev-build/make:            4.4.1-r100::gentoo
dev-build/meson:           1.5.2::gentoo
dev-lang/perl:             5.40.0::gentoo
dev-lang/python:           3.12.7_p1::gentoo, 3.13.0::gentoo
dev-lang/rust:             1.82.0::gentoo
dev-lang/rust-bin:         1.82.0::gentoo
sys-apps/baselayout:       2.15::gentoo
sys-apps/openrc:           0.55.1::gentoo
sys-apps/sandbox:          2.39::gentoo
sys-devel/binutils:        2.43-r1::gentoo
sys-devel/binutils-config: 5.5.2::gentoo
sys-devel/clang:           19.1.2::gentoo
sys-devel/gcc:             14.2.1_p20240921::gentoo
sys-devel/gcc-config:      2.11::gentoo
sys-devel/lld:             19.1.2::gentoo
sys-devel/llvm:            19.1.2::gentoo
sys-kernel/linux-headers:  6.11::gentoo (virtual/os-headers)
sys-libs/musl:             1.2.5-r1::gentoo
Repositories:

gentoo
    location: /var/db/repos/gentoo.git
    sync-type: git
    sync-uri: git+ssh://git@git.gentoo.org/repo/gentoo.git
    priority: -1000
    volatile: True

sage-on-gentoo
    location: /var/db/repos/sage-on-gentoo.git
    sync-type: git
    sync-uri: https://github.com/cschwan/sage-on-gentoo.git
    masters: gentoo
    volatile: True

viabit
    location: /var/db/repos/viabit.git
    sync-type: git
    sync-uri: git+ssh://http1.viabit.com:/var/www/viabit.com/git/public/overlays/viabit.git
    masters: gentoo
    volatile: True

Binary Repositories:

rv64_lp64d_musl
    priority: 1
    sync-uri: https://distfiles.gentoo.org/releases/riscv/binpackages/23.0/rv64_lp64d_musl

Installed sets: @emacs-extra-modes, @sagemath, @viabit
ACCEPT_KEYWORDS="riscv ~riscv"
ACCEPT_LICENSE="@FREE"
CBUILD="riscv64-unknown-linux-musl"
CFLAGS="-O2 -pipe -mabi=lp64d -march=rv64gc"
CHOST="riscv64-unknown-linux-musl"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -pipe -mabi=lp64d -march=rv64gc"
DISTDIR="/var/cache/distfiles"
EMERGE_DEFAULT_OPTS="--jobs=2"
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 -mabi=lp64d -march=rv64gc"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance buildpkg-live clean-logs config-protect-if-modified distlocks ebuild-locks fail-clean 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 sfperms sign strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe -mabi=lp64d -march=rv64gc"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
INSTALL_MASK="charset.alias /usr/share/locale/locale.alias"
LANG="C.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LEX="flex"
LINGUAS="en"
MAKEOPTS="-j32"
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="/var/lib/portage/tmp"
SHELL="/bin/bash"
USE="acl bzip2 crypt hardened iconv ncurses openmp pam pcre pic readline riscv seccomp ssl test-rust unicode xattr zlib" ADA_TARGET="gcc_12" 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" 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" L10N="en" LCD_DEVICES="bayrad cfontz glk hd44780 lb216 lcdm001 mtxorb text" LLVM_SLOT="19" 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" RUBY_TARGETS="ruby33" VIDEO_CARDS="radeon r600" 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, LC_ALL, 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