#5289: Can't use ghci with a library linked against libstdc++ ---------------------------------+------------------------------------------ Reporter: bos | Owner: Type: bug | Status: new Priority: normal | Milestone: 7.2.1 Component: GHCi | Version: 7.0.3 Keywords: | Testcase: Blockedby: | Difficulty: Os: Unknown/Multiple | Blocking: Architecture: Unknown/Multiple | Failure: GHCi crash ---------------------------------+------------------------------------------
Comment(by simonmar): Just to clarify: GHCi searches the library paths from the package to find shared libs, and if it doesn't find the library there, then it tries calling `dlopen` without an explicit path, so that `dlopen` will search the standard system locations (the cache is a red herring, it just caches the contents of the system paths). `libstdc++` is unusual in that the `.so` link is not in one of the standard system paths, it is somewhere like `/usr/lib/gcc/x86_64-linux-gnu/4.4.3`, which is known only to gcc and not to `ld.so`, hence it cannot be found by `dlopen`. The easiest fix is to add a backup plan to GHCi's search strategy, namely to invoke `gcc --print-file-name=libfoo.so`. -- Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5289#comment:23> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler _______________________________________________ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs