gtk+hs and libgmp

Simon Marlow simonmar@microsoft.com
Mon, 29 Oct 2001 10:11:54 -0000


> On Sat, 2001-10-27 at 17:27, Manuel M. T. Chakravarty wrote:
> > G=E9rard Milmeister <gemi@bluewin.ch> wrote,
> >=20
> > > On Thu, 2001-10-25 at 13:53, Simon Marlow wrote:
> > > > It seems very strange that the libgmp in your GHC=20
> installation doesn't work.  How did you install GHC?  Do you=20
> have problems linking other programs, or just gtk+hs programs?
> > > >=20
> > > As far as I know, it happens only with gtk+hs. Small=20
> programs I have
> > > written are linked alright.
> >=20
> > Do these small programs actually use any arbitrary precision
> > arthimetic - ie, use the type Integer?
> >=20
> > Manuel
> Something like this?
>=20
> module Main where
>=20
> main =3D print (1000000000000000000000000000000::Integer)
>=20
> Yes, it works.

I know that gtk+hs adds a -L/usr/lib option to the command line, which =
comes originally from gtk-config.

I'm still confused by what you said about GHC not linking with the =
libgmp.a in /opt/ghc, and yet it still manages to link programs using =
arbitrary precision integers somehow.  Normally GHC won't look in =
/usr/local/lib for libraries, so it won't even find your GMP 3 library =
at all.

Hmm.  All very mysterious.  I think you'll need to send us output from =
ghc -v for a link that failed and one that succeeded.

Cheers,
	Simon