genprimopcode segfaulting in Gentoo ebuild

Simon Marlow simonmar@microsoft.com
Fri, 23 Aug 2002 09:36:18 +0100


> I have just received a bug report for the Gentoo Linux ebuild of GHC
> 5.04 whose cause I cannot find. Recall that Gentoo builds all packages
> from sources.
>=20
> The build processes stops when genprimopcode segfaults during the last
> stage of the build (GHC 5.04 building itself).
>=20
> Anyone interested please look at
>=20
>  http://bugs.gentoo.org/show_bug.cgi?id=3D6352
>
> for the complete Bugzilla entry which has all available details,
> including an strace of the segfaulting genprimopcode.

I'm afraid nothing springs to mind - but I do recall that genprimopcode
is perhaps the first Haskell binary to be executed in a bootstrapped
tree, so it could be just that the stage 2 compiler is building
consistently broken binaries.  That should be easy to verify.

The next stage is to try to debug it.  Compile up the runtime system (in
the compiler tree that is generating broken code) with the debugging
options (see mk/config.mk for details).  Compile up something that
crashes, investigate with gdb, and we'll take it from there.

Cheers,
	Simon