> [I don't know if this will be much help, but...]
> I've had a lot of trouble trying to install GHC 4.04 under
> Linux too, both from the binary distribution and the source one.  
> This gmp problem was fairly easy to fix, I just hunted
> around the (source) directory tree and found that gmp is actually
> included in the GHC distribution and that libgmp.a had been built,
> but was just not in the right path for the linker to find it.
> Copying that .a file into the directory where ghc was being linked
> fixed the problem.  So this looks like a problem with the Makefiles.

I didn't include libgmp.a with the Linux distributions, on the grounds that
(a) most Linux installations either come with a libgmp, or one that can be
installed separately and (b) the system-supplied libgmp is a shared library,
which is obviously better than providing a static one with ghc.

So the upshot is that if your system doesn't have the gmp library installed,
you need to either install it, or build one from the GHC sources.

> But next I found that when you try to link the standard hello world
> Main.hs, the linker complains about a missing
> 'data_start' that is called from the GHC libraries.  The only
> "data_start" we can find is an unsigned long in an Alpha/OSF a.out 
> header file, but it is not obvious how/why it is in the ghc library
> for an i386 linux distribution.
> We conjecture that the distribution was either cross-compiled 
> on an Alpha,
> or something else happened which mixed some Alpha stuff into the
> Linux binary distribution?

The data_start symbol is supposed to be automatically inserted by the linker
to point to the start of the data section.  At least, that's the way it
works on our Linux boxes here.

You may have out of date compilers/linkers/libraries, I'm not sure which.

> Actually, I'm a bit unclear about what is needed to build GHC
> from source.  The source distribution does not seem to contain
> many .hc files, so I assume you have to have a running version
> of GHC in order to compile GHC!  Will GHC 3 do?  That binary version
> does install easily.

GHC 3.02 is enough to compile 4.04, but a bootstrapped version will be
faster.

Cheers,
        Simon

Reply via email to