[GHC] #10442: Loading of shared libraries is problematic in ghc 7.10.1
GHC
ghc-devs at haskell.org
Tue Jun 9 02:30:13 UTC 2015
#10442: Loading of shared libraries is problematic in ghc 7.10.1
-------------------------------------+-------------------------------------
Reporter: artella.coding | Owner:
Type: bug | Status: closed
Priority: high | Milestone: 7.10.2
Component: Compiler | Version: 7.10.1
Resolution: fixed | Keywords:
Operating System: Linux | Architecture: x86_64
Type of failure: Runtime crash | (amd64)
Blocked By: | Test Case:
Related Tickets: | Blocking:
| Differential Revisions:
-------------------------------------+-------------------------------------
Comment (by rwbarton):
Ah I see how I was confused about this ticket earlier. I was imagining
that `Main` was loaded from an object file and then I didn't understand
why the error was with finding `add` rather than `testAdd`.
Now I agree the behavior described in this ticket makes sense and that
setting an rpath when building the shared library is a logical solution.
Running `cabal repl` with `--ghc-option=-fobject-code` does fail with
{{{
Preprocessing executable 'illustrate' for illustrate-0.1.0.0...
GHCi, version 7.10.1: http://www.haskell.org/ghc/ :? for help
Ok, modules loaded: Main.
Prelude Main> main
ghc: panic! (the 'impossible' happened)
(GHC version 7.10.1 for x86_64-unknown-linux):
Loading temp shared object failed: /tmp/ghc4059_0/libghc4059_2.so:
undefined symbol: testAdd
}}}
which is bad (it would link correctly with ghc, so it should just work
under ghci), but that's #10458.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10442#comment:11>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list