Ticket #5289 (new bug)
Can't use ghci with a library linked against libstdc++
| Reported by: | bos | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | 7.6.2 |
| Component: | GHCi | Version: | 7.0.3 |
| Keywords: | Cc: | pho@…, v.dijk.bas@…, vandijk.roel@…, ivan.stojic@…, howard_b_golden@…, echo@…, hartmut0407@…, rian@…, wren@…, leather@… | |
| Operating System: | Unknown/Multiple | Architecture: | Unknown/Multiple |
| Type of failure: | GHCi crash | Difficulty: | |
| Test Case: | Blocked By: | ||
| Blocking: | Related Tickets: |
Description
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 :-(
Change History
Note: See
TracTickets for help on using
tickets.
