RE: Problems with libgmp

2000-11-16 Thread Simon Marlow

   So, I can't quite work out what went wrong in your case.  
 If the build
   didn't detect GMP 2, then it should have just used the 
 one in the tree.
  
  Obviously, when linking, it did not use the one in the tree :-(
  Conclusion: The Linux linker does not behave like other linkers or
  there is a bug in some Makefile.
 
 Of late I have had problems with libgmp2 and woody-debian. I 
 solved the
 problem the first time around by adding a sym link 
 /usr/lib/libgmp2.so -
 /usr/lib/libgmp.so.2.0.2
 
 Yesterday I solved the problem by installing libgmp2-dev 
 because ld was
 looking for libgmp.a for some reason when trying to compile hdirect.
 
 Hacks at best. Haven't really looked for whys and wherefores.

The binary distributions of 4.08.2 will come with a statically linked
libgmp.a.

It's up to the package maintainers (RedHat RPM, Debian etc.) to decide
the best approach for those systems, i.e. whether it's better to depend
on the system-supplied shared libgmp or supply one in the GHC package.
On FreeBSD for example I just use the system-supplied one since it's
part of the base system.

Cheers,
Simon

___
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users



RE: Problems with libgmp

2000-11-15 Thread Simon Marlow

 I am maintaining the Haskell stuff at informatik.uni-muenchen.de.
 (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
 distribution?

I'll try to clarify the situation, since it's a bit confusing.

  - GHC tries to detect GMP 2 on the host system during the
configuration process.  If it detects it, the build will
go on to use the installed version.

  - If GMP 2 was *not* found, then we fall back to the copy of
GMP in the source tree, which is build statically.

  - the RPMs have a dependency on the gmp2 packages.

  - GMP 3 is only source compatible with GMP 2, as you discovered.
Furthermore, using the GMP 2 headers with the GMP 3 library
aint gonna work. (if your system is set up like this, then
it's broken, just like ours :-)

  - GHC versions post-4.08.X use GMP 3.

So, I can't quite work out what went wrong in your case.  If the build
didn't detect GMP 2, then it should have just used the one in the tree.
BTW, you can't use GMP 3 with ghc-4.08.1 (the native code generator at
least will break).

Hope this helps :)

Cheers,
Simon

___
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users



RE: Problems with libgmp

2000-11-15 Thread Michael Marte

Hello Simon,

 So, I can't quite work out what went wrong in your case.  If the build
 didn't detect GMP 2, then it should have just used the one in the tree.

Obviously, when linking, it did not use the one in the tree :-(
Conclusion: The Linux linker does not behave like other linkers or
there is a bug in some Makefile.

 BTW, you can't use GMP 3 with ghc-4.08.1 (the native code generator at
 least will break).

Ok, I'll to try to get a snapshot from the CVS repository.

Thanks,
Michael



___
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users