Problems with libgmp

Michael Marte [email protected]
Tue, 14 Nov 2000 18:58:28 +0100 (CET)


I am maintaining the Haskell stuff at
(I took over the job from Sven Panne.)

As a first exercise, I try to compile ghc-4.08.1 from scratch.
But I always run into trouble with the libgmp stuff.
IMHO, my problems are caused by several factors:

1. We use Suse Linux 7.0 (that provides libgmp-3.0.x).
2. The ghc-4.08-1 distribution includes libgmp-2.x.x.
3. libgmp-3.0.x uses prefixed names (__gnump...). Prefixed names
are generated only if the header file is included.
4. The configure script does not recognize that libgmp is
installed (because it does not include the header file.)
5. When linking, the linker cannot resolve symbols prefixed by mpz_
(because the 2.x.x header file was used in compilation but the
linker uses the shared library provided by Suse Linux.)
5. Even if informed about the local installation of libgmp (by manually
changing config.cache), the 2.x.x header file will be used (again 
resulting in unresolved bindings when linking).

The same problems occur when bootstrapping from .hc files.

What to do? Should I hack the Makefiles? Should I replace the libgmp
distribution included in the ghc distribution by some new 3.x.x

Thank you,
Michael Marte