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
Relocation breaks Qt installs on Linux #13922
Comments
CC @Homebrew/linux |
I don't know if this is helpful, but some |
@carlocab Is this a (or: are these) |
The bottle seems to never work ever. I think the bug is in |
Also see an issue in Needs further analysis to know if all these issues ( |
Good news is I've got a fix for the issue: Bo98/patchelf.rb@8dc5568 (paired with Bo98/rbelftools@63e0d32). Bad news is we get patching errors on existing bottles that have already been corrupted by the bug ("cannot normalize PT_NOTE segment: non-contiguous SHT_NOTE sections"). The |
Maybe do this when |
The tricky bit is doing something that's upstreamable, which would mean upstreaming a conditional. I've looked at it a bit closer and the main issue seems to be empty NOTE program segments being left under the bugged version. I could probably make it a warning under that specific condition with the reasoning of backwards compatibility, and still error if there's other junk (non-empty). I think that's all we would need for our cases. |
|
Does it not throw a specific error that we can catch? If so we can probably do that here. Or, if not, we can upstream the throwing a specific error with the justification that downstream projects should be able to decide how to handle the previous erroneous behaviour. I suspect lots of formulae are affected by this -- I think |
Might be different than the note section issue but I've fixed a couple of other corruption bugs too in that commit so it could cover this - I'll have a look as I'll need to see the
It throws a generic PatchError, but with a specific message. However the problem is this raising the error will mean nothing is written to disk when we actually want a "best-effort" patch since patching nothing will result in a non-functional binary. So the only real solution beyond a conditional is to make it a warning for the specific scope we need it to be, which I think can make sense as a backwards compatibility with older patchelf case. |
Submitted a bunch of patches to upstream of upstream (grand upstream?): The second one in particular should resolve the concerns I mentioned previously. I'll port these to Ruby shortly. |
Ruby port: Bo98/patchelf.rb@3a4a39d (in addition to Bo98/patchelf.rb@8dc5568 and Bo98/rbelftools@63e0d32 from before) Not sure what the best way to test all this is. |
Not exactly the correct way to do it (we'll do it properly and get a new upstream release), but if someone wants to try Bo98/brew@0a16d77 and install a bunch of bottles then please do. Just make sure you've run I'm not just interested in problematic bottles - I'm also interested in general compatibility of these changes with all the bottles we currently have available. |
These have now made it into a release: https://github.com/NixOS/patchelf/releases/tag/0.16.0 |
Ruby port has been merged now too. |
brew config
outputbrew doctor
outputVerification
brew update
and am still able to reproduce my issue.brew doctor
and that did not fix my problem.What were you trying to do (and why)?
Test Qt after pouring a just-built bottle for distribution.
What happened (include all command output)?
Running the test fails with
This is because relocation breaks the bottle. See Homebrew/homebrew-core#111031.
What did you expect to happen?
Successful test.
Step-by-step reproduction instructions (by running
brew
commands)brew install --build-bottle qt brew bottle --json qt --keep-old --only-json-tab brew install --only-dependencies ./qt--6.3.1_4.x86_64_linux.bottle.tar.gz brew install ./qt--6.3.1_4.x86_64_linux.bottle.tar.gz brew test qt
The text was updated successfully, but these errors were encountered: