
#10458: GHCi fails to load shared object (the 'impossible' happened) ---------------------------------+----------------------------------------- Reporter: rleslie | Owner: Type: bug | Status: new Priority: normal | Milestone: 7.10.2 Component: GHCi | Version: 7.10.1 Resolution: | Keywords: Operating System: Linux | Architecture: x86_64 (amd64) Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Revisions: ---------------------------------+----------------------------------------- Comment (by rwbarton): OK, actually this particular error has nothing to do with loading Haskell modules as object code: cabal is presumably including some cbits `.o` file as an argument to ghci (as it should) and ghci is trying to load it eagerly at startup, and this fails at load time because the pcre library is not visible to the temporary shared library (due to the `RTLD_LOCAL` change). But, the same issue could arise in other settings, for example if a Haskell module that does a foreign import from a shared library is loaded with `-fobject-code`. (Regarding `-fPIC`, I just meant to say that it is expected that you have to use `-fPIC` as you described from the start, at least as far as GHC is concerned.) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10458#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler