Repository navigation
Compilation on Ubuntu 12.04 no longer succeeds #37786
Description
Activity
- addedregression-from-stable-to-nightlyPerformance or correctness regression from stable to nightly.Performance or correctness regression from stable to nightly.
on Nov 15, 2016 Ok I'm now quite sure this was caused by rust-lang-deprecated/rust-buildbot@a5d7cb7.
The current container is working with binutils 2.27, the old container used 2.25.1, and I've also tested out 2.26. The results I got below were from a
cargo buildof the standard library in the container with the respective binutils version, all in therust-slave-distcontainer base (just differing in binutils versions). Taking this compiled standard library I then attempted to link each standard library with a ubuntu 12.04 container with the following results- Libstd built with 2.25 binutils worked, this is the state of the world before rust-lang-deprecated/rust-buildbot@a5d7cb7
- Libstd built with 2.26 binutils failed to compile with an assert in the linker
- Libstd built with 2.27 binutils failed to compile with the assert above
So overall this seems very similar to #34978 which happened because we updated from ubuntu 15.10 to 16.04, picking up a newer binutils version. That only affected the musl target, thankfully, though. The problem there was tracked down to a problem that was fixable, and we then since fixed it.
Searching through the gas changelog we can see two changes in 2.27 and 2.6 that seem relevant:
Changes in 2.27: * Default to --enable-compressed-debug-sections=gas for Linux/x86 targets. Changes in 2.26: * --compress-debug-sections is turned on for Linux/x86 by default.So with that in mind I passed
--nocompress-debug-sectionsto the assembler viaCFLAGSbut I still got same error that the 2.26 build above got. Remembering #34978, though, I then also passed-mrelax-relocations=noand lo and behold it worked!So tl;dr; we need to pass
-mrelax-relocationsbasically everywhere, and we also need to pass--nocompress-debug-sectionsas well when compiling C code.(sorry for the double post, deleted the first one which I clicked post too soon on)
IRC snippets:
15:10 <~acrichto> we have two options 15:10 <~acrichto> 1) revert back to binutils 2.25 15:10 <~acrichto> 2) pass two new fancy flags to disable the new behavior 15:10 <~acrichto> so (1) is quite easy, just go build a new container and call it a day 15:10 <~acrichto> will make rillian unhappy though 15:10 <~acrichto> unfortunately I don't think we can do (2) though 15:11 <~acrichto> passing two new fancy flags will break the rust build on a ton of platforms presumably which don't understand the flags 15:11 <~acrichto> and the last thing I want to do is to do feature detection here 15:11 <~acrichto> oh and I also don't know how to pass cflags just on the builders 15:11 <~acrichto> so my curret thinking for a plan of action is: 15:11 <~acrichto> a) revert back to binutils 2.25 15:11 <~acrichto> b) switch nightlies to use rustbuild 15:11 <~acrichto> c) update back to 2.27, but pass the fancy flags *only* on the builder 15:12 <~acrichto> where (c) is possible b/c rustflags is much easier to configure w/ CFLAGS env vars and whatnot 15:12 <~acrichto> or rather, I trust it a whole lot moreBuilding the revert back to 2.25 now
cc @rillian, this is going to revert the containers back to binutils 2.25, presumably breaking your i586 linux builds which you needed to fix your builds. We hope to upgrade back to 2.27 shortly, but just wanted to give you a heads up
Ok, closing as the new image is now deployed. Hopefully tomorrow's nightly will have a fix for this, and if it doesn't we can reopen and rediagnose.
Thanks for the heads up. We should be on your builds starting with 1.14, and the i586-linux requirement is going away in a similar timeframe anyway. I'll keep an eye on it.
I can't find any evidence of
compress-debug-sectionsbeing passed anywhere, was it determined that this is not needed after all?
A simple hello world fails with:
Notably, this means that nightlies on Travis will fail to compile by default. Introduced at some point during cae6ab1...0ed9519, or maybe a recent change on the dist builder.
My money is currently on rust-lang-deprecated/rust-buildbot@a5d7cb7, but I have no idea why.