Add superenv for Linuxbrew#263
Conversation
|
@Linuxbrew/core As the title says. In this version, I've copied |
|
My last commit makes |
There was a problem hiding this comment.
The behaviour hasn't changed. --env=inherit still works as before.
|
Succeeded on Linux. Unrelated (I think) error on Mac: |
There was a problem hiding this comment.
Does it make sense to skip this if rpath_paths is empty?
There was a problem hiding this comment.
Yes. It shouldn't happen I think, but better to be paranoid. Thanks for catching that case. Fixed.
There was a problem hiding this comment.
Should this be restricted to runtime dependencies?
For shellinabox I got:
patchelf --print-rpath ~/.linuxbrew/bin/shellinaboxd
/home/linuxbrew/.linuxbrew/lib:/home/linuxbrew/.linuxbrew/opt/libtool/lib:/home/linuxbrew/.linuxbrew/opt/zlib/lib:/home/linuxbrew/.linuxbrew/opt/openssl/libzlib and openssl make sense, but I don't think libtool should be there.
Putting some debugging code in revealed autoconf and automake, both build deps, were also considered, but they didn't end up in the RPATH presumably because they don't have lib directories.
There was a problem hiding this comment.
I haven't yet fixed this for the rpath PR for --env=std. There's shared code, so I think I'll merge this PR first, and then rebase the rpath code on top of this merged PR.
Add the opt_lib directory of each dependency to the RPATH after $HOMEBREW_PREFIX/lib, which is searched first, allowing dependent libraries to be found even when the keg is unlinked.
| ENV.keg_only_deps = keg_only_deps | ||
| ENV.deps = formula_deps | ||
| ENV.run_time_deps = run_time_deps | ||
| ENV.x11 = reqs.any? { |rq| rq.is_a?(X11Requirement) } |
There was a problem hiding this comment.
Tangent: Does this need to be changed to also support XorgRequirement?
Note that when we port that to Homebrew/brew, I think we'll probably drop that name and instead use the extension mechanism Mike made, which is going to require some rather substantive retesting on our end come merge time.
There was a problem hiding this comment.
It's used to point to paths to in the XQuartz SDK, which shouldn't be necessary for xorg because it's in the brew prefix.
Using -rpath=/a -rpath=/a:/b results in /a:/a:/b whereas using -rpath=/a -rpath=/a -rpath=/b results in /a:/b
| exit 1 | ||
| fi | ||
| exec "$HOMEBREW_RUBY_PATH" -x "$0" "$@" | ||
| #!/usr/bin/env ruby -W0 |
There was a problem hiding this comment.
Interesting approach... :)
No description provided.