Description
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
Activity
TimNN commentedon Nov 21, 2016
Intuitively I would guess that you're missing the i686 version of glibc (although I think that intrinsic should come from compiler-rt (at least for later stages)?).
Looking at the i686 linux docker file, it installs
g++-multilib
, if you have not yet done so, you could try installing that.alexcrichton commentedon Nov 21, 2016
I believe this is a known bug and where rustbuild is just broken right now. rust-lang/compiler-builtins#119 is the fix for this which is being included in #37817
est31 commentedon Nov 21, 2016
@TimNN I had gcc-multilib installed, will try with g++-multilib.
TimNN commentedon Nov 21, 2016
@est31: It's probably save to ignore my comment, given @alexcrichton's response.
est31 commentedon Nov 21, 2016
@TimNN nope, same error with both gcc-multilib and g++-multilib installed. Will try with @alexcrichton 's PR...
est31 commentedon Nov 21, 2016
I confirm that with #37817 applied the bug is fixed. Thanks @alexcrichton !
hanna-kruppe commentedon Dec 4, 2016
I cherry-picked the fix in #38046, so this issue can be closed even though #37817 is not merged yet.
est31 commentedon Dec 4, 2016
Thanks! I haven't confirmed whether the issue is fixed, but I assume so.