[GHC] #8376: Static Executable + GHC API (+ Dynamic Linking?) gives Segfault

GHC ghc-devs
Thu Oct 3 08:38:26 UTC 2013


#8376: Static Executable + GHC API (+ Dynamic Linking?) gives Segfault
----------------------------------+----------------------------------
        Reporter:  darchon        |            Owner:
            Type:  bug            |           Status:  new
        Priority:  highest        |        Milestone:  7.8.1
       Component:  Compiler       |          Version:  7.7
      Resolution:                 |         Keywords:
Operating System:  MacOS X        |     Architecture:  x86_64 (amd64)
 Type of failure:  Runtime crash  |       Difficulty:  Unknown
       Test Case:                 |       Blocked By:
        Blocking:                 |  Related Tickets:
----------------------------------+----------------------------------

Comment (by simonmar):

 The problem is not in Haddock, it's the GHC API.  GHC's linker is using
 dynamic linking even when the program using the GHC API is linked
 statically, because it is using the value of `DYNAMIC_GHC_PROGRAMS`, which
 is set when GHC is built.

 We might not be able to support using the GHC API from a statically linked
 binary on all platforms, because it depends on having a working RTS
 linker, and that's what we wanted to move away from.  But I think we can
 support it at least on ELF platforms where the RTS linker works for most
 things.

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



More information about the ghc-tickets mailing list