Rust target detection fails to translate the host triple with rustc nightly >= 2026-07-02 (new *-oe-linux-* targets)
Categories
(Firefox Build System :: General, defect)
Tracking
(firefox155 fixed)
| Tracking | Status | |
|---|---|---|
| firefox155 | --- | fixed |
People
(Reporter: truber, Assigned: truber)
References
Details
Attachments
(1 file)
Building Firefox with a Rust nightly toolchain from 2026-07-02 or later fails at configure time:
checking for rust host triplet...
ERROR: Don't know how to translate x86_64-pc-linux-gnu for rustc
This is a latent bug in detect_rustc_target() (build/moz.configure/rust.configure), triggered by rust-lang/rust#157650, which added OpenEmbedded/Yocto Linux targets to rustc --print target-list: x86_64-oe-linux-gnu, aarch64-oe-linux-gnu, i686-oe-linux-gnu, armv7-oe-linux-gnueabihf, and riscv64-oe-linux-gnu.
detect_rustc_target() correlates the autoconf host/target alias against rustc --print target-list. The new oe-vendor targets collide with the generic unknown-vendor targets after OS-based narrowing, and the final vendor tiebreaker only accepts an exact vendor == host.vendor match. The standard config.guess output for x86_64/i686 Linux uses vendor pc, which matches neither oe nor unknown, so detection falls through and calls die().
Impact of the new targets:
- x86_64 / i686 hosts (vendor
pc) fail configure outright. - riscv64 hosts would silently mis-select
riscv64-oe-linux-gnu(whoseraw_cpuisriscv64, matching the host, where the correct generic target isriscv64gc-unknown-linux-gnu). - armv7 hard-float Linux would pick
armv7-oe-linux-gnueabihfin the arm-specific branch.
Fix: when disambiguating rust target candidates, prefer rust's generic unknown vendor. This restores the pre-regression behavior for pc hosts and keeps riscv64/armv7 selecting the generic target.
| Assignee | ||
Comment 1•1 month ago
|
||
Comment 2•1 month ago
|
||
The severity field is not set for this bug.
:ahochheiden, could you have a look please?
For more information, please visit BugBot documentation.
Updated•23 days ago
|
Comment 5•5 days ago
|
||
Hi, would it be possible to uplift this to 153esr?
Description
•