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

GHC ghc-devs
Wed Oct 2 21:08:16 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 darchon):

 On Linux (GHC-b84fbabb0cad88a5b1ae62a53e04075383bc11f4), using a
 statically-linked `haddock`, I get:
 {{{
 ~/devel/lens/src (master *)$ haddock -v3
 Control/Lens/Internal/ByteString.hs
 Creating interfaces...
 Haddock coverage:
 Checking module Control.Lens.Internal.Level...
 Creating interface...
  100% (  6 /  6) in 'Control.Lens.Internal.Level'
 <MORE LOG MESSAGES>
  100% (  6 /  6) in 'Control.Lens.Internal.Getter'
 Checking module Control.Lens.Internal.Fold...
 <command line>: can't load .so/.DLL for: /home/baaijcpr/multi-
 ghc/7.7.20131002/lib/ghc-7.7.20131002/ghc-prim-0.3.1.0/libHSghc-
 prim-0.3.1.0-ghc7.7.20131002.so (/home/baaijcpr/multi-
 ghc/7.7.20131002/lib/ghc-7.7.20131002/ghc-prim-0.3.1.0/libHSghc-
 prim-0.3.1.0-ghc7.7.20131002.so: undefined symbol: stg_forkOnzh)
 }}}

 Also on Linux, the dynamically-linked `haddock` runs _without_ failure.

 I also want to note that `Control.Lens.Internal.Fold` is one of the
 source-files in the `lens` package that contains a `{-# ANN ... #-}`
 annotation. Removing the annotation makes the statically-linked haddock go
 through until another file with a `{-# ANN ... #-}` annotation is found,
 and subsequently stops with the same failure.

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



More information about the ghc-tickets mailing list