Hi Nathan, thanks for the report. The move from riscv64gc-unknown-linux-gnu to riscv64a23-unknown-linux-gnu is intentional and a part of Ubuntu's move to the RISC-V RVA23 profile in 25.10. We made RVA23 the default RISC-V profile in Rust 1.92.
I don't believe this is a rustc packaging problem, as we saw a similar problem with mozjs as well (LP: #2143666). Here's what I think is happening: 1. split_triplet() in build/moz.configure/init.configure only accepts riscv64 and riscv64gc as CPU names, so riscv64a23 raises an error. This causes it to be dropped from the target list. 2. detect_rustc_target() then maps riscv64-unknown-linux-gnu to riscv64gc-... 3. Finally, rust_host_triple() compares that to rustc's host, finds riscv64a23, and triggers the error you're seeing. [ Steps to reproduce ] Of course you know how to build Firefox, but since I don't, I'm including these steps just so you can make sure that *my* reproduction is accurate ;) Apologies, it's a little hacky because I just wanted to run the configure step instead of needing to do the whole snap build, and I needed to spoof LLVM 19 as the default. I did the following in a RISC-V Stonking VM. # apt install -y rustc cargo cmake clang-19 lld-19 llvm-19 libclang-19-dev \ file git g++ m4 make nasm nodejs npm quilt unzip wget zip \ libasound2-dev libdbus-glib-1-dev libgtk2.0-dev libgtk-3-dev libpulse-dev \ libpython3-dev libx11-xcb-dev libxt-dev libc++abi-19-dev \ libclang-rt-19-dev libclang-rt-19-dev-wasm32 libc++-19-dev-wasm32 \ libc++abi-19-dev-wasm32 wasi-libc [...] $ mkdir /tmp/test-ff && cd /tmp/test-ff $ wget -O- \ https://ftp.mozilla.org/pub/firefox/candidates/161.0-candidates/build1/source/firefox-161.0.source.tar.xz \ | tar xJ [...] $ cd firefox-161.0 $ mkdir bin $ for o in /usr/bin/llvm-*-19 /usr/bin/lld-19 /usr/bin/lld-link-19 /usr/bin/ld.lld-19 \ /usr/bin/wasm-ld-19 /usr/bin/clang-19 /usr/bin/clang++-19; do b=$(basename "$o"); ln -sf "$o" "bin/${b%-19}" done $ export PATH=$PWD/bin:$PATH $ printf '%s\n' 'ac_add_options --with-libclang-path=/usr/lib/llvm-19/lib/' \ 'ac_add_options --disable-tests' > mozconfig $ export MOZCONFIG=$PWD/mozconfig $ ./mach configure [...] 1:15.12 checking for rust host triplet... 1:15.12 ERROR: The rust compiler host (riscv64a23-unknown-linux-gnu) is not suitable for the configure host (riscv64-unknown-linux-gnu/riscv64gc-unknown-linux-gnu). [...] [ The fix ] I've attached a potential fix as riscv:rust-riscv64a23-host.patch. If you're happy with it, it can probably be forwarded upstream too but I'm not sure. Feel free to make any changes/edits as you see fit. I fixed mozjs in a similar manner[1]. The patch adds RVA23 host triple support while also trying not to change existing behaviour. In init.configure, it treats riscv64a23 as riscv64. In rust.configure, it passes rustc's host triple into detect_rustc_target(), so if several targets match then it prioritizes the one which matches rustc's host, keeping riscv64gc as a fallback. This new logic only runs in cases which would otherwise fail, so other architectures should be unaffected. [1]: https://salsa.debian.org/gnome- team/mozjs/-/commit/84afd5c6a7bad2c7df69153fe37934beacd7344f [ Testing the fix ] Note that I've only tested the configure step on an upstream release, not the full snap build, so if you think this seems reasonable make sure the full snap build gets tested. I applied the patch, which allowed the configure step to continue: $ patch -p1 < riscv:rust-riscv64a23-host.patch $ ./mach configure [...] 1:26.09 checking for rust host triplet... riscv64a23-unknown-linux-gnu 1:28.20 checking for rust target triplet... riscv64a23-unknown-linux-gnu [...] ** Patch added: "riscv:rust-riscv64a23-host.patch" https://bugs.launchpad.net/ubuntu/+source/rustc-1.97/+bug/2176160/+attachment/6021165/+files/riscv%3Arust-riscv64a23-host.patch -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2176160 Title: Risc-V: The rust compiler host (riscv64a23-unknown-linux-gnu) is not suitable for the configure host (riscv64-unknown-linux-gnu/riscv64gc- unknown-linux-gnu) To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/rustc-1.97/+bug/2176160/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
