dynamic linking with stdc++ (was: Re: ghci dynamic linking)
Frederik Eaton
frederik at a5.repetae.net
Wed May 9 18:44:31 EDT 2007
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
> >then it is successful; I am able to use package mypackage in ghci. But
> >if I omit the LD_PRELOAD=... part then ghci complains about missing
> >symbols. How do I configure my package so that the LD_PRELOAD=... part
> >of the command is not necessary?
>
> I believe you should be able to use extra-libraries in the .cabal file to get these libraries loaded.
>
> Cheers,
> Simon
>
Hello,
I have been doing that,
$ ghc-pkg describe vectro
...
extra-libraries: gsl cblas atlas lapack stdc++
...
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 I knew why /usr/lib/libstdc++.so is missing,
but it is missing on 4 out of 4 of the computers I just now checked so
I think it is normal for it to be missing, and the problem probably
lies with ghci?
(by the way, in contrast to stdc++, the links
/usr/lib/lib{gsl,cblas,atlas,lapack}.so all exist)
Thanks,
Frederik
--
http://ofb.net/~frederik/
More information about the Glasgow-haskell-users
mailing list