#5289: Can't use ghci with a library linked against libstdc++ -------------------------------+-------------------------------------------- Reporter: bos | Owner: Type: bug | Status: new Priority: normal | Milestone: 7.6.1 Component: GHCi | Version: 7.0.3 Resolution: | Keywords: Os: Unknown/Multiple | Architecture: Unknown/Multiple Failure: GHCi crash | Difficulty: Testcase: | Blockedby: Blocking: | Related: -------------------------------+--------------------------------------------
Comment(by spl): I'm not that familiar with the machinery of dynamic linking or building OS-X-specific apps, but it appears to me that you might be able to simply change the name of the library you're looking for under OS X. If I understand it correctly, the path to `libstdc++` is found with `gcc --print-file-name` now: {{{ $ gcc --print-file-name=libstdc++.dylib /usr/lib/gcc/i686-apple-darwin9/4.0.1/libstdc++.dylib }}} This seems to explain the error for loading `double-conversion`: {{{ $ ghci -package double-conversion GHCi, version 7.4.1.20120508: http://www.haskell.org/ghc/ :? for help Loading package ghc-prim ... linking ... done. Loading package integer-gmp ... linking ... done. Loading package base ... linking ... done. Loading package bytestring-0.9.2.1 ... linking ... done. Loading package array-0.4.0.0 ... linking ... done. Loading package deepseq-1.3.0.0 ... linking ... done. Loading package text-0.11.2.1 ... linking ... done. Loading package double-conversion-0.2.0.4 ... <command line>: can't load .so/.DLL for: /usr/lib/gcc/i686-apple-darwin9/4.0.1/libstdc++.dylib (dlopen(/usr/lib/gcc/i686-apple-darwin9/4.0.1/libstdc++.dylib, 9): no suitable image found. Did find: /usr/lib/gcc/i686-apple-darwin9/4.0.1/libstdc++.dylib: can't map) }}} But if I want the `libstdc++` that seems to work, I look for `libstdc++.6.dylib`: {{{ $ gcc --print-file-name=libstdc++.6.dylib /usr/lib/libstdc++.6.dylib }}} So, does it make sense to use `libstdc++.6.dylib` instead of `libstdc++.dylib` on OS X? -- Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5289#comment:45> 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