rust newer than 1.82.0 unable to build firefox on NetBSD "i386" port (really i586 or i686 in 32-bit mode)
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
Description
Code
It appears that rust versions newer than 1.82.0 fail to build recent firefox versions on NetBSD's "i386" port (which covers i486, i586 and i686, but since we provide rust only for i586 or above, that's the sub-parts which are affected). All these are "ILP32" ports, and provide a maximum per-process data segment size somewhere around 3GB.
The testing scoreboard I've created looks like this:
| firefox version | rust version | result |
|---|---|---|
| 138.0.4 | 1.82.0 | OK |
| 138.0.4 | 1.83.0 | failed: Cannot allocate memory (os error 12) |
| 138.0.4 | 1.85.0 | failed: Cannot allocate memory (os error 12) |
| 138.0.4 | 1.86.0 | failed: error: could not compile style (lib) |
| 135.0.1 | 1.87.0 | failed: Cannot allocate memory (os error 12) |
| 136.0.2 | 1.87.0 | failed: memory allocation of 71061296 bytes failed |
| 137.0.2 | 1.87.0 | failed: rustc-LLVM ERROR: out of memory |
| 138.0.4 | 1.88.0 | failed: rustc-LLVM ERROR: out of memory |
A typical build error looks like this:
Compiling mls-platform-api v0.1.0 (https://github.com/beurdouche/mls-platform-api?rev=19c3f18b747d13354370ba84440bb0b963932634#19c3f18b)
Compiling neqo-http3 v0.11.0 (https://github.com/mozilla/neqo?tag=v0.11.0#c6d5502f)
Compiling socket2 v0.4.999 (/usr/pkgsrc/www/firefox/work/firefox-135.0.1/build/rust/socket2)
Compiling storage v0.1.0 (/usr/pkgsrc/www/firefox/work/firefox-135.0.1/storage/rust)
Compiling dogear v0.5.0
error: failed to build archive at `/usr/pkgsrc/www/firefox/work/build/i586-unknown-netbsd/release/deps/libstyle-5354116ed6cc56c6.rlib`: failed to map object file: Cannot allocate memory (os error 12)
error: could not compile `style` (lib) due to 1 previous error
warning: build failed, waiting for other jobs to finish...
and it goes downhill from there.
Version it worked on
It most recently worked on: version 1.82.0.
Version with regression
rustc --version --verbose:
$ rustc --version --verbose
rustc 1.88.0 (6b00bc388 2025-06-23) (built from a source tarball)
binary: rustc
commit-hash: 6b00bc3880198600130e1cf62b8f8a93494488cc
commit-date: 2025-06-23
host: i586-unknown-netbsd
release: 1.88.0
LLVM version: 19.1.7
$
This is with an externally built LLVM. The same problem occurs with the internal LLVM.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No source file or test is named. Reproduce the Firefox builds on the i586-unknown-netbsd target with Rust 1.82.0 and later versions, then compare the reported allocation and LLVM out-of-memory failures; done means identifying the regression and establishing a validated fix or narrowly defined next step.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- build-system, compilers, operating-systems
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100