
#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 RyanGlScott): Actually, you don't need a profiled compiler after all. You can reproduce this with an ordinary GHC with one extra step. As before, install some library, like `random-1.1`: {{{ $ cabal install random-1.1 -w /opt/ghc/head/bin/ghc }}} Then figure out its package ID: {{{ $ /opt/ghc/head/bin/ghc-pkg describe random name: random version: 1.1 id: random-1.1-Gnn89iTXDuaz90MEyLmyr ... }}} This time, however, you'll need to change the contents of `.cabal` (where `cabal-install` puts its shared object files). On Linux, this can be accomplished like so: {{{ $ cd ~/.cabal/lib/x86_64-linux-ghc-8.3.20170509/ $ mv libHSrandom-1.1-Gnn89iTXDuaz90MEyLmyr-ghc8.3.20170509.so libHSrandom-1.1-Gnn89iTXDuaz90MEyLmyr-ghc8.3.20170509-dummy.so }}} Now compile `Bar.hs` as before: {{{ $ /opt/ghc/head/bin/ghc -fforce-recomp Bar.hs -j2 -package-id random-1.1-Gnn89iTXDuaz90MEyLmyr [1 of 3] Compiling Foo ( Foo.hs, Foo.o ) <no location info>: error: ghc: panic! (the 'impossible' happened) (GHC version 8.3.20170509 for x86_64-unknown-linux): Dynamic linker not initialised Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug [2 of 3] Compiling Foo2 ( Foo2.hs, Foo2.o ) <no location info>: error: <command line>: can't load .so/.DLL for: libHSrandom-1.1-Gnn89iTXDuaz90MEyLmyr.so (libHSrandom-1.1-Gnn89iTXDuaz90MEyLmyr.so: cannot open shared object file: No such file or directory) }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13607#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler