-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Rust snapshot binaries aren't recognized by RHEL5 #1345
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Seriously? To support STT_GNU_IFUNC? Come on. I think this is likely happening well below the tools we're actually in control of. BFD (driven by ld) is probably writing that field. And/or the LLVM linker when or if we use it. |
Updated the title to reflect that this is a problem with the Rust snapshots, not the Rust compiler. |
Possibly there is some flag we can invoke ld with that tells it not to do this nonsense? We're not using STT_GNU_IFUNC and I dearly hope it doesn't infect upwards from glibc doing so. |
After doing some searching I cannot find a way to actually set the ELF ABI from GCC/LD's command line; but the FreeBSD dudes luckily have a wonderful utility known as brandelf which can do this for you. It's trivially compilable on Linux (with a few modifications,) and then you can set the ABI back to SVR4 by saying:
This of course only applies to snapshots, since on old systems the linker will build using SVR4 ABI anyway. Doing it this way of course adds another step in the process of building snapshots, but as that seems like a rather infrequent event I think it's fine. If this seems like an OK route (I think it's fine considering it's very self contained and just uses |
I'm still digging around on this. It's possible we could use brandelf but there are larger and more mysterious issues at work here:
IOW, issue still ongoing, don't hack around it just yet. |
I'm going to switch over to ubuntu for a bit to diagnose this further. If the ABI is understood on both RHEL and ubuntu, I'm going to recommend deferring this to 0.3 or later since the majority of our users will be bootstrapping on one or the other. |
Wait, is this RHEL5 stock, not just the scientific-linux rebuild? RHEL5 has a long-term support lifecycle stretching to ... 2020! |
Further digging, it appears this was fixed with a recent update to binutils, such that you only get the new ABI if you actually include an |
This should now be fixed (as of 071dedd). Anyone with such an old system want to confirm? |
I did even-more-filing-down on this bug (disabling recent glibc symbols in libuv / librustrt) in commit bd03998. Now I really really think it ought to work :) |
Hi Graydon I've patched the python build scripts to work with Python 2.4 (see pull request). Unfortunately it won't build on my machine.
That's with the default C++ compiler:
|
Ah, apologies - I see now I've completely missed the point, and should have had newer Python and g++. Sorry! |
No worries, I'm finding -- pressing onwards on this -- that it's quite involved (will require changing bits of llvm possibly to not use iostreams and such) and I'm not going to be able to finish it in a reasonable timeframe. The original title of the bug is now closed (the binaries are now recognized) so I'm going to ask that we split this up into followup bugs for "general backwards compatibility in older linuxes". I don't think we're going to have 0.2 building on stock RHEL5. Too much is different at this point, not enough porting effort available. |
This is a follow-up to rust-lang#1345 where these appeared as unstable in the standard library docs because they are only stabilized for ARM. They were missed in the original PR.
The elf we generate uses the
Linux
ABI, which is a recent invention, older Linuxes having used theSystem V
ABI. On Scientific Linux 5 this results in the snapshots being unrunnable:See http://stackoverflow.com/questions/7647818/glibc-elf-file-os-abi-invalid
The text was updated successfully, but these errors were encountered: