-
Notifications
You must be signed in to change notification settings - Fork 81
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
Add relative RUNPATH entries in haskell_cabal_* targets #1267
Conversation
134cd1e
to
68c3cc4
Compare
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.
Hello darkness, my old friend
py_inline_test( | ||
name = "stackage_zlib_runpath", | ||
args = [ | ||
"$(rootpath :libz_soname)", |
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.
are solib_names
exported as targets?
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.
It's an output attribute that means that it becomes accessible as a label.
By default Cabal generates `RUNPATH` entries pointing to the sandbox directory. These no longer work outside of that particular sandbox.
Adds a regression test to check that haskell_cabal_library will generate a relative `RUNPATH` entry for the nixpkgs provided zlib.
Addressing #1267 (comment)
haskell_cabal_binary|library
targets that depended on Bazel managed dynamic C libraries (e.g. the nixpkgs providedlibz
for@stackage//:zlib
) were missing relativeRUNPATH
entries. Instead, Cabal only generated absoluteRUNPATH
entries pointing to the sandbox's execroot, which are invalid outside that sandbox, see #1130. This can cause build failures with Cabal packages that depend transitively on dynamic C libraries, e.g.hie-bios
failed to build in #1262.This PR adds relative
RUNPATH
entries in the same fashion as is done for regular Haskell targets.This PR also adds a regression test that checks for the presence of a relative
RUNPATH
entry.