-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Fallback to append if objcopy is not available on Linux #5991
base: develop
Are you sure you want to change the base?
Conversation
The I'd also prefer to deal with only single executable layout (the one where CArchive is stored in ELF section, even if there weren't for #1812). But perhaps we can look into alternatives such as the ELF manipulation libraries mentioned in the linked conda issue (bonus points if that allows us to deal with rpath as well). |
The utilities from binutils are quite robust and battle-tested for different architectures. So depending on them for querying & manipulating ELF binaries makes a lot of sense. I couldn't find a python library that understands and is able to manipulate ELF that well. The closest one that I could find is lief (no major release yet). It is already used by conda-build. I have opened a PR at #5996 to show that one can indeed get rid of binutils. That being said, the CI on GitHub doesn't seem to cover all architectures and *nixes, so we wouldn't know if we'll be breaking anyone unknowingly. I would like know your thoughts on a different proposal: Add a CLI option for explicitly using the EOF append method and make the option an opt-in so that the user knows what they are getting into. And they can choose that if installing binutils is not an option. That way there is no automatic 'fallback' and wouldn't lead to any regressions. |
The lief option sounds pretty tempting. I'm giving it a trial run on some of the less common platforms which we don't or can't test on CI. So far I've found that it makes installation on musl Linux ugly because PyPI doesn't support musl wheels so lief has to be built from source. This drags in CMake, make and g++ and takes a very long time to compile (been going 30 minutes now - still not done yet...). Honestly, this feels very extreme just to eliminate the dependency on something as standard as binutils. This comment, which seems to be the only motivation for it, doesn't feel very compelling. |
I'd really prefer not to go down that road... having such an option implies that such configuration is supported/endorsed and brings us back to having to support two different executable layout options for linux. Is installing If someone really wanted to do EOF-appended builds, I'd prefer they patched their PyInstaller, and take full responsibility for it. |
No description provided.