[GHC] #8420: Spurious dynamic library dependencies

GHC ghc-devs
Tue Oct 8 01:02:19 UTC 2013


#8420: Spurious dynamic library dependencies
------------------------------------+---------------------------------
       Reporter:  AndreasVoellmy    |             Owner:
           Type:  bug               |            Status:  new
       Priority:  normal            |         Milestone:
      Component:  Compiler          |           Version:  7.6.3
       Keywords:                    |  Operating System:  MacOS X
   Architecture:  Unknown/Multiple  |   Type of failure:  None/Unknown
     Difficulty:  Unknown           |         Test Case:
     Blocked By:                    |          Blocking:
Related Tickets:                    |
------------------------------------+---------------------------------
 It should be possible to have an executable A that depends on dynamic
 library B which in turn depends on dynamic library C, without A directly
 depending on C.
 {{{ A --> B --> C }}}
 Unfortunately, GHC 7.6.3 does not seem to allow this. Instead it copies
 the dependencies of B to dependencies of A, so that we get
 {{{ A -> B,C and B --> C }}}

 This is unfortunately, because running A will cause the loader to locate C
 based on the rpaths (assuming we are using rpaths to locate dynamic
 libraries), whereas only B should know how to get to C from B.

 The problem seems to be that ghc copies all the library dependencies of B
 (presumably from the package specification of B) as library dependencies
 of the A.

 I verified the problem in GHC 7.6.3, but haven't tried in HEAD yet.

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8420>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler



More information about the ghc-tickets mailing list