You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
+1 I am one of the unfortunate winner of a release-blocking CI build failure for Android now that we've upgraded to 1.41.0. We've disabled android-x86 builds for now :(
76a252e Auto merge of #67110 - tmandry:bump-compiler-builtins, r=alexcrichton 7de9402 Auto merge of #67096 - mark-i-m:fix-rustc-guide-2, r=ehuss 3ff17e7 Auto merge of #67016 - lqd:placeholder_loans, r=matthewjasper dbbe4f1 Auto merge of #67004 - estebank:issue-66958, r=eddyb 2b0e6d2 Auto merge of #67003 - cjgillot:corrida, r=Mark-Simulacrum 14195e1 Auto merge of #66984 - GuillaumeGomez:move-clean-types, r=kinnison
While rustup-toolchain-install-master compiles ( 😅 ): I see that https://github.com/rust-lang/rust/pull/67110 upgrades compiler-builtins. I had a look at the commits in compiler-builtins which touch __rust_probestack, and I think we can likely narrow it down to rust-lang/compiler-builtins@2566aa6.
At this point I'm too much out of my depth, this needs people more knowledgeable than me 😉 . I hope I could help debugging this, and will continue watching the issue as I'm learning a great deal just by investigating this.
Besides the actual fix, there are two additional things I'd love to understand:
why doesn't scanelf -qT std-c3eaafedbae89cb4.std.52ue7rpt-cgu.0.rcgu.o detect this? It looks like the obj file is not marked in any way has having a TEXTREL, but maybe the inline asm from that commit defines __rust_probestack in such a way that relocating it needs touching the .text section (wild guess)
how would we go at testing this? Where in the rust project would I add a test for this? And given that scanelf can't detect this, maybe a good way to "integration test" this would be to build a minimal rust static lib, and try to link it into a shared object with --warn-shared-textrel --fatal-warnings like I'm doing in the repro code. Do I understand correctly that "all code produced by rustc should be relocatable" is a guaranteed property (thus worth testing), or am I completely mistaken?
I'm not sure this is the right place to bring it up, but without this fix it is impossible to deploy a rust static library to platforms that enforce properly-relocatable code (x86 android). It didn't make the cut for 1.41.1, is there any chance for 1.42? Can we help to make this happen?
Activity
jonas-schievink commentedon Feb 5, 2020
This apparently breaks Android builds, since that forbids text relocations
https://users.rust-lang.org/t/cant-link-rust-code-on-i686-linux-android-with-rust-1-41/37807
awakecoding commentedon Feb 5, 2020
+1 I am one of the unfortunate winner of a release-blocking CI build failure for Android now that we've upgraded to 1.41.0. We've disabled android-x86 builds for now :(
brainlock commentedon Feb 6, 2020
I added a minimal repro to my repository here: https://github.com/brainlock/rust-1.41-android-linker-bug-repro, in the hope that it can help debugging this (and because I was curious to dig into this myself :-) ).
You can clone the repo, then
docker build -t repro .docker run --rm -it repro bashIn the container you can run
./repro-min.sh.I bisected it using rustup and nightly releases, 2012-12-09 is good, 2019-12-10 is bad:
When using nightly-2019-12-10:
Mark-Simulacrum commentedon Feb 6, 2020
Conveniently, no rollups!
76a252e Auto merge of #67110 - tmandry:bump-compiler-builtins, r=alexcrichton
7de9402 Auto merge of #67096 - mark-i-m:fix-rustc-guide-2, r=ehuss
3ff17e7 Auto merge of #67016 - lqd:placeholder_loans, r=matthewjasper
dbbe4f1 Auto merge of #67004 - estebank:issue-66958, r=eddyb
2b0e6d2 Auto merge of #67003 - cjgillot:corrida, r=Mark-Simulacrum
14195e1 Auto merge of #66984 - GuillaumeGomez:move-clean-types, r=kinnison
I would personally suspect #67110.
Can you try checking this via https://crates.io/crates/rustup-toolchain-install-master/?
Specifically, comparing 76a252e and 7de9402?
brainlock commentedon Feb 6, 2020
While rustup-toolchain-install-master compiles ( 😅 ): I see that
https://github.com/rust-lang/rust/pull/67110upgrades compiler-builtins. I had a look at the commits in compiler-builtins which touch__rust_probestack, and I think we can likely narrow it down to rust-lang/compiler-builtins@2566aa6.At this point I'm too much out of my depth, this needs people more knowledgeable than me 😉 . I hope I could help debugging this, and will continue watching the issue as I'm learning a great deal just by investigating this.
Besides the actual fix, there are two additional things I'd love to understand:
why doesn't
scanelf -qT std-c3eaafedbae89cb4.std.52ue7rpt-cgu.0.rcgu.odetect this? It looks like the obj file is not marked in any way has having a TEXTREL, but maybe the inline asm from that commit defines __rust_probestack in such a way that relocating it needs touching the .text section (wild guess)how would we go at testing this? Where in the rust project would I add a test for this? And given that scanelf can't detect this, maybe a good way to "integration test" this would be to build a minimal rust static lib, and try to link it into a shared object with
--warn-shared-textrel --fatal-warningslike I'm doing in the repro code. Do I understand correctly that "all code produced by rustc should be relocatable" is a guaranteed property (thus worth testing), or am I completely mistaken?brainlock commentedon Feb 6, 2020
Meanwhile, I can confirm that we got the right commit (76a252e):
pnkfelix commentedon Feb 6, 2020
triage: P-high. Assigning to self. Leaving nominated because I'd like to discuss this at today's meeting.
22 remaining items
Auto merge of #69168 - brainlock:test-textrel-regression, r=Mark-Simu…
brainlock commentedon Mar 2, 2020
I'm not sure this is the right place to bring it up, but without this fix it is impossible to deploy a rust static library to platforms that enforce properly-relocatable code (x86 android). It didn't make the cut for 1.41.1, is there any chance for 1.42? Can we help to make this happen?
Thanks!
mati865 commentedon Mar 2, 2020
#69086 is beta nominated, it will be backported soon and included in 1.42 release.
brainlock commentedon Mar 2, 2020
Fantastic, thanks. Do you think it would be worth it to also include the regression test (#69168) in the release?
mati865 commentedon Mar 2, 2020
CCing the reviewers @tmandry @Mark-Simulacrum
awakecoding commentedon Mar 2, 2020
awesome, I am waiting for a release with this fix. Any idea when 1.42 is planned?
Cogitri commentedon Mar 2, 2020
Stable releases usually occur every 6 weeks, so it should land in ~2 weeks.
Mark-Simulacrum commentedon Mar 3, 2020
I've nominated the regression test as well!
add regression test for issue rust-lang#68794