Skip to content

Skip rpath relocation of ELF files with protodesc_cold sections #20403

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

carlocab
Copy link
Member

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same change?
  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes? Here's an example.
  • Have you successfully run brew style with your changes locally?
  • Have you successfully run brew typecheck with your changes locally?
  • Have you successfully run brew tests with your changes locally?

We have multiple formulae (e.g. ola, openvino, opencv, or-tools,
pytorch) that seem to be broken by patchelf.rb on x86_64 Linux.1 The
common thread seems to be the presence of a protodesc_cold section in
the ELF header.

Let's avoid breaking these bottles by skipping relocation when a binary
file has a protodesc_cold section. It will probably hurt
relocatability of these bottles, but that's better shipping broken
binaries.

Footnotes

  1. https://github.com/Homebrew/homebrew-core/pull/210860#issue-2918569212

We have multiple formulae (e.g. `ola`, `openvino`, `opencv`, `or-tools`,
`pytorch`) that seem to be broken by `patchelf.rb` on x86_64 Linux.[^1] The
common thread seems to be the presence of a `protodesc_cold` section in
the ELF header.

Let's avoid breaking these bottles by skipping relocation when a binary
file has a `protodesc_cold` section. It will probably hurt
relocatability of these bottles, but that's better shipping broken
binaries.

[^1]: Homebrew/homebrew-core#210860 (comment)
@carlocab
Copy link
Member Author

carlocab commented Aug 10, 2025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant