Summary: | 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 | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Violet Purcell <vimproved> |
Component: | Current packages | Assignee: | Mozilla Gentoo Team <mozilla> |
Status: | UNCONFIRMED --- | ||
Severity: | normal | CC: | alexander, arkamar, eason, gyakovlev, herrtimson, mia-rain, navi, randy, rust, sam, sven.volkinsfeld, w12101111 |
Priority: | Normal | Keywords: | PullRequest |
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
See Also: |
https://bugs.gentoo.org/show_bug.cgi?id=748849 https://bugs.gentoo.org/show_bug.cgi?id=915494 https://bugs.gentoo.org/show_bug.cgi?id=923077 https://github.com/gentoo/gentoo/pull/35268 |
||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: | Add gentoo vendor alias |
Description
Violet Purcell
2023-10-12 20:48:17 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? 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. 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?
(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). 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). 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. > So the source version of rust works
No, I can reproduce this with dev-lang/rust-1.73.0.
(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. (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. 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 (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. 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 (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) 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. Hmm indeed it does work with source-rust, but not with rust-bin. 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(+) Is there a reason to not go with my patch? 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. this also appears to be happening with dev-lang/spidermonkey For the record, I encountered this issue with www-client/firefox-115.6.0:esr and dev-lang/rust-1.74.1. Note that the dep added here is also confusing Portage (bug 915494). (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. 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 |