[GHC] #11587: Place shared objects in LIBDIR
GHC
ghc-devs at haskell.org
Thu Sep 22 14:35:32 UTC 2016
#11587: Place shared objects in LIBDIR
-------------------------------------+-------------------------------------
Reporter: bgamari | Owner:
Type: bug | Status: new
Priority: normal | Milestone: 8.2.1
Component: Package system | Version: 7.10.3
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
Type of failure: Runtime | Unknown/Multiple
performance bug | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by duncan):
Note that some more sharing is possible, given typical layouts.
For example for nix or for cabal new-build we install into a store.
{{{
$store/$pkgid-$hash/libHSpkgname-ver.so
}}}
(Currently it's actually worse than this since the libname includes hashes
too, which should be unnecessary given the separated dirs)
I'm not sure if this is possible with ELF, but if we can include part of
the directory into the libname / location, and a separate RUN_PATH then we
could use a scheme like:
{{{
RUN_PATH /home/me/.cabal/store
SO_NEEDED pkgname-ver-hash/libHSpkgname-ver.so
SO_NEEDED ...
}}}
This does appear to be possible with MachO, ie like:
{{{
LC_RPATH /home/me/.cabal/store
LC_LOAD_DYLIB @rpath/pkgname-ver-hash/libHSpkgname-ver.dynlib
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11587#comment:7>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list