-
Notifications
You must be signed in to change notification settings - Fork 711
Add foreign-library to LD_LIBRARY_PATH during cabal exec #4049
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
Comments
The motivation seems reasonable. The big question, however, is WHICH paths should get added to LD_LIBRARY_PATH? After all, a foreign library could itself depend on (1) dynamic Haskell libraries that were installed user-wide, or (2) a different foreign library. All of these paths need to be added to LD_LIBRARY_PATH for things to "work" (although I guess we do bake in RPATHs to make sure that things can be found without LD_LIBRARY_PATH).
@abooij does this make sense? Would you be interested in implementing this? |
@ezyang That does make sense. And you are able to make more precise what I was somewhat worried about when I proposed this -- thanks for that. We discussed this a bit on IRC and I can try to work on this. |
OK, I added you to the Cabal project and assigned you this ticket. |
@abooij Would you like an architectural overview on this ticket? |
Signed-off-by: Edward Z. Yang <[email protected]>
Signed-off-by: Edward Z. Yang <[email protected]> Signed-off-by: Auke Booij <[email protected]>
Signed-off-by: Edward Z. Yang <[email protected]> Signed-off-by: Auke Booij <[email protected]>
Signed-off-by: Edward Z. Yang <[email protected]> Signed-off-by: Auke Booij <[email protected]>
Signed-off-by: Edward Z. Yang <[email protected]> Signed-off-by: Auke Booij <[email protected]>
Signed-off-by: Edward Z. Yang <[email protected]> Signed-off-by: Auke Booij <[email protected]>
Signed-off-by: Edward Z. Yang <[email protected]> Signed-off-by: Auke Booij <[email protected]>
Signed-off-by: Edward Z. Yang <[email protected]> Signed-off-by: Auke Booij <[email protected]>
Signed-off-by: Edward Z. Yang <[email protected]> Signed-off-by: Auke Booij <[email protected]>
Signed-off-by: Edward Z. Yang <[email protected]> Signed-off-by: Auke Booij <[email protected]>
Signed-off-by: Edward Z. Yang <[email protected]> Signed-off-by: Auke Booij <[email protected]>
Signed-off-by: Edward Z. Yang <[email protected]> Signed-off-by: Auke Booij <[email protected]>
Signed-off-by: Edward Z. Yang <[email protected]> Signed-off-by: Auke Booij <[email protected]>
Signed-off-by: Edward Z. Yang <[email protected]> Signed-off-by: Auke Booij <[email protected]>
Signed-off-by: Edward Z. Yang <[email protected]> Signed-off-by: Auke Booij <[email protected]>
Signed-off-by: Edward Z. Yang <[email protected]> Signed-off-by: Auke Booij <[email protected]>
Signed-off-by: Edward Z. Yang <[email protected]> Signed-off-by: Auke Booij <[email protected]>
Signed-off-by: Edward Z. Yang <[email protected]> Signed-off-by: Auke Booij <[email protected]>
Uh oh!
There was an error while loading. Please reload this page.
Thanks for the work on the new
foreign-library
section. I have started using it for one of my projects, and it seems to work!My use case is to reimplement a C library's ABI, and run existing binaries written in C against the Haskell version. At development time, this means building my haskell code as a foreign library, adding the relevant directory to
LD_LIBRARY_PATH
, and then running the existing binaries.It would be convenient if cabal could add the haskell foreign library to
LD_LIBRARY_PATH
. I suppose thecabal exec
command could be the right place to do this. So instead ofone would instead simply:
The text was updated successfully, but these errors were encountered: