-
-
Notifications
You must be signed in to change notification settings - Fork 9.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
keg_relocate: Don't relocate duplicated Rust dylibs. #2764
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code looks fine but I don't know how I feel about the precedent of writing language version specific hacks into our core code. How does this break things for Homebrew users today? Has work started upstream on fixing their issue?
To add to my previous comment: what are the options for making a change in Homebrew/homebrew-core for this? |
My understanding is that the
They've gotten an issue open at rust-lang/rust#39875, but I don't think any work has been started.
I think the simplest equivalent solution would be to glob all dylibs under I went with this because it avoids a second rewrite, but it is awfully specific to be included in core. The in-formula solution isn't that much more complex, I'll have it ready in a day or two. |
I'm 👎 on basically permanently (I don't think upstream is going to "fix" something that isn't broken) carrying an in-formula "solution" for this since it's unwinding changes that brew just made. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd rather see effort directed at a general solution in brew for this situation than accepting a hack into homebrew/core that will have little to no prospect of ever being removed.
This PR is pretty specific right now, but I could definitely morph it into a more general solution for excluding files or patterns from relocation. That would avoid making a rust-specific change to |
Maybe take a look at |
Thanks. Yeah, I was thinking something along the lines of One potential problem is that we don't need to skip install name relocation in rust's case - only dylib ID relocation. I could split those two up, but you can see how that would get ugly/complicated fast. |
Is it a problem though? Does rust break if we don't do the install name relocation either? |
Actually, I'm not sure. I wouldn't expect it to break with the unrelocated paths, we just haven't needed to do it. I'll test this evening. |
FYI, I've shipped 1.18.0 (Homebrew/homebrew-core#14375) in its currently "broken" state so no need to worry about that waiting on this or anything like that. |
This is the less invasive version of Homebrew/brew#2764.
I think we should go ahead and merge Homebrew/homebrew-core#14490, since this is indeed pretty specific to one language/formula. I'm going to test how the |
This is the less invasive version of Homebrew/brew#2764. Closes #14490. Signed-off-by: ilovezfs <ilovezfs@icloud.com>
This is a workaround for rust-lang/rust#39870.
We could make the filename match even more restrictive, but I think that
/lib/rustlib/
will probably be exclusive enough.cc @ilovezfs
brew tests
with your changes locally?