#5289: Can't use ghci with a library linked against libstdc++ on Linux
-------------------------------+--------------------------------------------
Reporter: bos | Owner:
Type: bug | Status: new
Priority: normal | Component: GHCi
Version: 7.0.3 | Keywords:
Testcase: | Blockedby:
Os: Linux | Blocking:
Architecture: x86_64 (amd64) | Failure: GHCi crash
-------------------------------+--------------------------------------------
My `double-conversion` library links to a C++ library. If I build it and
try to use it from `ghci`, I get a failure:
{{{
Prelude Data.Double.Conversion.Text Data.Text> :m
+Data.Double.Conversion.Text Data.Text
Prelude Data.Double.Conversion.Text Data.Text>
Leaving GHCi.
~ $ ghci
GHCi, version 7.0.2: http://www.haskell.org/ghc/ :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... done.
Prelude> :m +Data.Double.Conversion.Text Data.Text
Prelude Data.Double.Conversion.Text Data.Text> toShortest 3
Loading package double-conversion-0.2.0.0 ... can't load .so/.DLL for:
stdc++ (libstdc++.so: cannot open shared object file: No such file or
directory)
}}}
I can sort of work around this, but then I get a different crash:
{{{
~ $ ln -s /usr/lib64/libstdc++.so.6 libstdc++.so
~ $ LD_LIBRARY_PATH=$(pwd) ghci
GHCi, version 7.0.2: http://www.haskell.org/ghc/ :? for help
Prelude> :m +Data.Double.Conversion.Text Data.Text
Prelude Data.Double.Conversion.Text Data.Text> toShortest 3
Loading package double-conversion-0.2.0.0 ... linking ... done.
"Floating point exception (core dumped)
}}}
Unfortunately, `gdb` doesn't give me a useful stack trace from this :-(
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5289>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs