Skip to content

rustbuild: linker error during 32 bit compilation #37906

Closed
@est31

Description

@est31

I'm on a 64 bit OS and want to test 32 bit rust so that I can confirm the intrinsics for #37900 work. But unfortunately, rustbuild doesn't even get so far and fails with an error early on. Obviously, I've tested without the PR too, but same result. The results below are all from a test run after a git checkout to current master (commit 4bc9290), git clean -xfd to get rid of all artifacts and taking config.toml from config.toml.example and changing two things: setting build = "i686-unknown-linux-gnu" and codegen-units = 1. I've also tested with letting codegen-units as default, but same result (the logs are still from the test run with codegen-units == 1 but I guess there is no difference).

The relevant part of the full build log:

/usr/bin/ld: ~/src/rust/build/i686-unknown-linux-gnu/stage0-sysroot/lib/rustlib/i686-unknown-linux-gnu/lib/libstd-b0aea2b84e953509.so: __umoddi3: invalid version 21 (max 0)
~/src/rust/build/i686-unknown-linux-gnu/stage0-sysroot/lib/rustlib/i686-unknown-linux-gnu/lib/libstd-b0aea2b84e953509.so: error adding symbols: Ungültiger Wert

readelf on the file in question gives:

$ readelf -s ~/src/rust/build/i686-unknown-linux-gnu/stage0-sysroot/lib/rustlib/i686-unknown-linux-gnu/lib/libstd-b0aea2b84e953509.so | rg __umoddi3
1638:  1634: 000ad4ac    41 FUNC    GLOBAL DEFAULT   12 __umoddi3@GLIBC_2.3.3 (21)
5674:  3055: 000ad4ac    41 FUNC    GLOBAL DEFAULT   12 __umoddi3

Metadata

Metadata

Assignees

No one assigned

    Labels

    T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions