[GHC] #13607: Panic when shared object file is missing: Dynamic linker not initialised

GHC ghc-devs at haskell.org
Thu Jul 26 12:58:17 UTC 2018


#13607: Panic when shared object file is missing: Dynamic linker not initialised
-------------------------------------+-------------------------------------
        Reporter:  RyanGlScott       |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  8.1
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
 Type of failure:  Compile-time      |  Unknown/Multiple
  crash or panic                     |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by angerman):

 With a `quick` build of `ghc-8.4.3` I get:
 {{{
 <no location info>: error:
     <command line>: can't load .so/.DLL for:
 /Users/angerman/.cabal/lib/x86_64-osx-ghc-8.4.3/libHSrandom-1.1
 -9LLJAJa4iQFLJiLXBOBXBV-ghc8.4.3.dylib
 (dlopen(/Users/angerman/.cabal/lib/x86_64-osx-ghc-8.4.3/libHSrandom-1.1
 -9LLJAJa4iQFLJiLXBOBXBV-ghc8.4.3.dylib, 5): Symbol not found:
 _base_GHCziList_splitAtzuzdszdwsplitAtzq_info
   Referenced from: /Users/angerman/.cabal/lib/x86_64-osx-
 ghc-8.4.3/libHSrandom-1.1-9LLJAJa4iQFLJiLXBOBXBV-ghc8.4.3.dylib
   Expected in: /Users/angerman/Projects/zw3rk/ghc/libraries/base/dist-
 install/build/libHSbase-4.11.1.0-ghc8.4.3.dylib
  in /Users/angerman/.cabal/lib/x86_64-osx-ghc-8.4.3/libHSrandom-1.1
 -9LLJAJa4iQFLJiLXBOBXBV-ghc8.4.3.dylib)
 [2 of 3] Compiling Foo2             ( Foo2.hs, Foo2.o )

 <no location info>: error:
     ghc-stage2: panic! (the 'impossible' happened)
   (GHC version 8.4.3 for x86_64-apple-darwin):
         Dynamic linker not initialised
 CallStack (from HasCallStack):
   panic, called at compiler/ghci/Linker.hs:106:53 in ghc:Linker

 Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug
 }}}
 with `-j2`

 A tiny bit of `Debut.Trace.trace` on the functions gives us:
 {{{
 [1 of 3] Compiling Foo              ( Foo.hs, Foo.o )
 linkExpr
 initDynLinker
 modifyPLS_
 False                           ;; <- getOrSetLibHSghcInitLinkerDone
 reallyInitDynLinker
 linkExpr
 initDynLinker
 modifyPLS_
 linkPackages'
 link
 link_one.2
 link
 link_one.2
 link
 link_one.1
 link_one.2
 link
 link_one.1
 linkPackage
 link_one.2
 link
 link_one.1
 linkPackage
 linkPackage
 link_one.2
 link
 link_one.1
 link_one.2
 link
 link_one.1
 link_one.2
 link
 link_one.1
 linkPackage
 linkPackage
 linkPackage
 linkPackage
 True                          ;; <- getOrSetLibHSghcInitLinkerDone
 modifyPLS
 linkDependencies
 getLinkDeps
 linkPackages'
 linkPackages'
 link
 }}}
 prior to the crash.

 The `link_one.N` are the various branches of the `link_one` function.

 For completeness, here's the `-prof-auto-all -prof-cafs` output:
 {{{
 <no location info>: error:
     ghc-stage2: panic! (the 'impossible' happened)
   (GHC version 8.4.3 for x86_64-apple-darwin):
         Dynamic linker not initialised
 CallStack (from -prof):
   Panic.panic (compiler/utils/Panic.hs:(184,1)-(188,68))
   Util.sharedGlobalM (compiler/utils/Util.hs:(1015,1)-(1016,47))
   Linker.v_PersistentLinkerState
 (compiler/ghci/Linker.hs:(101,62)-(104,20))
   Linker.CAF:lvl261_rHOo (<no location info>)
 }}}

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


More information about the ghc-tickets mailing list