> > 1. hsc from ghc-4.04-i386-unknown-linux.tar.gz needs libgmp.so.2 But
> > libgmp.so.2 isn't part of this package. Later I found the sources of libgmp in
> > ghc-4.04-src.tar.gz, but I could not configure it to build a shared
> > library. Instead I had to manually build a shared library from the source :-(
> 
> Actually libgmp should be part of your Linux system.
> Unfortunately, it is not handled uniformly by all
> distributions.  Nevertheless, the easiest fix (if you are
> not installing from source) is to install the libgmp package
> of your Linux distribution (in Red Hat this implies to
> install libgmp-devel).
> 
> Cheers,
> Manuel

As you say, libgmp is unfortunately not handled uniformly by all
distributions. For example, in my SuSE 6.2 distribution it comes
only as a static library (I don't know if they include a shared
library in the new 6.3 release). And, as Matthias observed, the
libgmp source distribution has no configuration option for building
a shared library, so I was also forced to build a shared version
manually (by editing the Makefile directly). Could someone out
there who really knows what they are doing (unlike me) point us
to a patch to the libgmp sources that adds the option of building
a shared library to the configuration script?

While I'm on the subject of shared libraries,why is it that the Win32
distribution of GHC includes the RTS, Prelude, and perhaps other
libraries, as DLL's, but (as far as I can tell) none of the distributions
for Unix-like platforms include any of these as shared libraries? Is
there some fundamental obstacle to building these as shared libraries
under, say, Linux or Solaris, or is including this capability just a
low priority item that no one has had time to take care of yet? Glancing
through the 4.04p1 source distribution, it looked like no fancy tricks
were needed for the Win32 case, but I'm certainly not an expert in these
matters, so I could easily be missing something. (By the way, I would
be very grateful if someone could point me to some good references on
shared objects, both how they work and what you need to do to create them.)
My apologies if this has been brought up before. A quick scan of the mailing
list archives didn't turn up anything, but I didn't look very hard. 8-)

Mark

________________________________________________________________________________

                                  Mark E. Hall
                      Mahanakorn University of Technology
                          Vanit Building 2, 8th Floor
                           1126/1 New Petchburi Road
                            Bangkok 10400, Thailand
                                66-2-6553181--7
                                [EMAIL PROTECTED]
                          http://www.mut.ac.th/~mehall

Reply via email to