Compiling ghc @ Chalmers
Simon Marlow
simonmar@microsoft.com
Mon, 24 Sep 2001 13:08:43 +0100
Hi Josef,
Thanks for the feedback. Two of the problems you mention have been
resolved, and there's a possible fix for the third one.
> THE LINKER
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
>=20
> Problem:
> --------
>=20
> The name of the linker is hard wired in to a number of files.=20
> The name is
> (ofcourse) `ld'. The build system assumes that this linker is the GNU
> linker. On our system, however, the GNU linker is called=20
> `gld'. So, before
> running `make' I have to go through some files and change=20
> `ld' to `gld'.
> The files I have to change are: mk/target.mk and ghc/lib/std/Makefile
>
> Solution:
> ---------
>=20
> Having a variable, say LD, which contains the name of the linker would
> solve the problem. At least if it is possible to override the=20
> definition
> by giving a new definition in mk/build.mk .
I've committed the changes to do exactly this.
> SYS/RESOURCE.H and TIMEVAL
> =
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D
This one appears to have been fixed some time ago. Basically we don't
define _POSIX_C_SOURCE in Stg.h any more, because of problems like
yours.
> BUILDING FOR GHCI
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
>=20
> Problem:
> --------
>=20
> This is a bit of a sad one, which I haven't found any solution to.
> I've never been able to build ghc so that ghci works.
> The last time I tried I got the following output when invoking ghci:
>=20
> [Banner..]
> Loading package std ... linking ...
> /users/cs/josefs/ghchome/lib/ghc-5.03/HSstd_cbits.o: unknown symbol
> `__ashldi3'
> ghc-5.03: panic! (the `impossible' happened, GHC version 5.03):
> can't load package `std'
We don't understand why you're getting this error and we're not, but
there's a possible fix you could try. In ghc/rts/Linker.c there's a
long list of symbols which are automatically defined by the dynamic
linker (look for RTS_SYMBOLS). You could try adding an entry for
__ashldi3 in that list (it might not be the only thing you have to add).
Let us know if that fixes the problem, and we'll commit the change.
Cheers,
Simon