-
-
Notifications
You must be signed in to change notification settings - Fork 563
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
architecture detection broken with recent »file« releases #810
Comments
I am getting
I don't think we can handle |
it’s the default output for libraries on Arch Linux |
|
i’m aware it seems to be a change in
vs the 1. post fyi an executable looks like this with 5.33:
|
Uh, that's interesting. So possibly a bug should be reported against |
@probonopd as I found out recently the First of all, it seems like older libmagic binaries can't read newer magic files properly, which means libmagic returns the "random binary file" type for everything (like ELF files). This renders libmagic completely unusable for my purposes. Next, the I think we have to bundle the magic database in order to work around these limitations. This guarantees the correct output on every system. I already thought about developing a linuxdeploy plugin for the purpose. This plugin should ideally patch the libmagic binary to make sure the magic database is loaded relative to the library, as otherwise, one would have to use e.g., environment variables, to load the bundled database by default. |
@Optiligence can you try |
file-5.33
|
Uh, that's not even telling us the architecture at all. Maybe we should not use the |
That'd be better, yes. See https://github.com/AppImage/AppImageKit/blob/appimagetool/master/src/elf.c#L135. |
the relevant file commits, for reference: |
@Optiligence the best solution would be to get rid of file or any sort of magic database for detecting ELF files. We can just replicate this in our source code, the ELF format is very well defined, there's magic bytes, e.g.,
Furthermore, there's a flag defining the architecture which can simply be read, our ELF code is even capable of this. See https://github.com/AppImage/AppImageKit/blob/appimagetool/master/src/elf.c#L135 |
Sure. but since it also seemed like a It’s just a confirmation that it is, indeed, a bug, and that it’s also fixed already. For the time being i’ll set the environment variable |
Adding this issue to my current TODO list. |
So a bug in |
But why bother using |
Because it is working (besides one bug in one version of it that already has been fixed by them)? I prefer not to touch what we already have working, and focus on the things that we either don't have yet or are not working properly yet (e.g., |
Please close this issue as |
AppImageKit/src/appimagetool.c
Line 357 in 5b5ca1a
using file-5.33
The text was updated successfully, but these errors were encountered: