#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
---------------------------------+------------------------------------------
Changes (by simonmar):

  * os:  Linux => Unknown/Multiple
  * architecture:  x86_64 (amd64) => Unknown/Multiple
  * milestone:  => 7.2.1


Comment:

 Replying to [comment:1 bos]:
 > Actually, I see a similar shared library loading error with `ghci` on OS
 X:
 >
 > {{{
 > Loading package double-conversion-0.2.0.0 ... can't load .so/.DLL for:
 stdc++ (dlopen(libstdc++.dylib, 9): image not found)
 > }}}
 >
 > Actually, this shared library problem seems to be the same problem as
 reported in #3789.

 I think you meant #3798, right?

 That ticket is a bit confusing, I'm going to close it in favour of this
 one, and copy the comment I made on #3798 to here:

 > On my system, libstdc++.so is found in /usr/lib/gcc/i486-linux-
 gnu/4.4.1, but it is a symlink to to .so.6 in /usr/lib. If you add that
 directory to the extra-libs of the wxcore package, it loads in GHCi
 (although there's another missing symbol error later). dlopen doesn't look
 here by default, as this directory is intended to be searched at link-
 time, not load-time. If you want to dlopen libstdc++, I guess you're
 supposed to either dlopen("libstdc++.so.6") or use the full path name.

 > One possible plan here is to have GHCi call gcc -print-search-dirs, and
 pick out its library search paths. We could easily add those to the places
 we look for .sos.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5289#comment:2>
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

Reply via email to