Re: Ghci dynamic linking (Was: C++ libraries and GHCI)

2009-10-08 Thread C Rodrigues
I've encountered the problem with weak symbols also, and filed a bug report against ghc (#). Weak symbols are used by gcc (with elf) to accommodate C++'s compilation model. In C++, it's permitted to define class methods and template code in header files. Because header files can be includ

Re: [Haskell-cafe] Ghci dynamic linking (Was: C++ libraries and GHCI)

2009-10-02 Thread Paolo Losi
Thanks for the reply, Max. If it's not something overly complex, I'll try to hack ghc to see if I can produce a working patch... probably that symbol type can be safely ignored by ghci linker. Thanks again for your help Paolo On Wed, Sep 30, 2009 at 2:29 PM, Max Bolingbroke wrote: > (Moving t

Re: [Haskell-cafe] Ghci dynamic linking (Was: C++ libraries and GHCI)

2009-09-30 Thread Max Bolingbroke
(Moving to ghc-users) I'd never seen V in nm output before: """ The symbol is a weak object. When a weak defined symbol is linked with a normal defined symbol, the normal defined symbol is used with no error. When a weak undefined symbol is linked and the symbol is not defined, the value of the

Re: dynamic linking with stdc++ (was: Re: ghci dynamic linking)

2007-05-09 Thread skaller
On Wed, 2007-05-09 at 23:44 +0100, Frederik Eaton wrote: > I think the problem is that there is a /usr/lib/libstdc++.so.5 and a > /usr/lib/libstdc++.so.6 but no /usr/lib/libstdc++.so; when I created > the latter, linking to the libstdc++.so.6 link, I was able to use ghci > with my package. I wish

dynamic linking with stdc++ (was: Re: ghci dynamic linking)

2007-05-09 Thread Frederik Eaton
On Fri, Apr 27, 2007 at 11:01:49AM +0100, Simon Marlow wrote: > Frederik Eaton wrote: > >Hello, > >I am wondering how to link a package with some dynamic libraries in a > >way that works with ghci. If I run the command > >LD_PRELOAD=/lib/libgcc_s.so.1:/usr/lib/libstdc++.so.6 ghci -package mypackage

Re: ghci dynamic linking

2007-04-27 Thread Simon Marlow
Frederik Eaton wrote: Hello, I am wondering how to link a package with some dynamic libraries in a way that works with ghci. If I run the command LD_PRELOAD=/lib/libgcc_s.so.1:/usr/lib/libstdc++.so.6 ghci -package mypackage then it is successful; I am able to use package mypackage in ghci. But

ghci dynamic linking

2007-04-26 Thread Frederik Eaton
Hello, I am wondering how to link a package with some dynamic libraries in a way that works with ghci. If I run the command LD_PRELOAD=/lib/libgcc_s.so.1:/usr/lib/libstdc++.so.6 ghci -package mypackage then it is successful; I am able to use package mypackage in ghci. But if I omit the LD_PRELOA