
#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 rwbarton): According to my experiments (I only tested on Debian x86_64 with GNU ld, not gold) you can set up the NEEDED entry in that way if either * `libHSpkgname-ver.so` was built with `-soname pkgname-ver-hash /libHSpkgname-ver.so`, or * `libHSpkgname-ver.so` was built without any `-soname` set, and you link to it with {{{ -L/home/me/.cabal/store -l:pkgname-ver-hash/libHSpkgname-ver.so }}} If you set a SONAME when building `libHSpkgname-ver.so`, then it seems to be impossible to create a NEEDED entry of any other value when building a library that has it as a dependency. So if the SONAME is `libHSpkgname- ver.so`, you have to add the directory that the library lives in to the run path, as far as I can tell. I don't know how portable any of this behavior is. GHC sets the SONAME to `libHSpkgname-ver.so`, originally due to 6efacfe8bcbe66dfc3b52397ccbd34a58890520d. I don't know if it would be okay to unset it or to include the directory name in the SONAME. In any case it seems simplest to solve the problem by just putting all the shared libraries in the same directory... -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11587#comment:8 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler