I'm trying to build ghc 5.04.2 from the source distribution (on Linux, RH 7.2), and get the following error
 
------------------------

..==fptools== make all -wr;
in /usr/local/src/ghc-5.04.2/ghc/rts
------------------------------------------------------------------------
.../utils/ghc-pkg/ghc-pkg-inplace --update-package <rts.conf.inplace
Reading package info from stdin... done.
Expanding embedded variables...done.
warning: can't find GHCi lib `HSrts.o'
Saving old package config file... done.
Writing new package config file... done.
.../utils/ghc-pkg/ghc-pkg-inplace -f ../driver/package.conf --update-package
<rts.conf.installed
Reading package info from stdin... done.
Expanding embedded variables...done.
warning: can't find GHCi lib `HSrts.o'
Saving old package config file... done.
Writing new package config file... done.
../../ghc/compiler/ghc-inplace -optc-O -optc-Wall -optc-W
-optc-Wstrict-prototypes -optc-Wmissing-prototypes
-optc-Wmissing-declarations -optc-Winline -optc-Waggregate-return
-optc-Wbad-function-cast -optc-Wcast-align -optc-I../includes -optc-I.
-optc-Iparallel -optc-DCOMPILING_RTS -optc-fomit-frame-pointer -ldl -O2
-static -package-name rts -O -Rghc-timing -c Adjustor.c -o Adjustor.o
ghc: 598636 bytes, 2 GCs, 32532/32532 avg/max bytes residency (1 samples), 5M
in use, 0.02 INIT (0.01 elapsed), 0.02 MUT (0.04 elapsed), 0.06 GC (0.16 elapsed) :ghc>>
make[2]: *** [Adjustor.o] Error 1
make[1]: *** [all] Error 1
make[1]: Leaving directory `/usr/local/src/ghc-5.04.2/ghc'
make: *** [all] Error 1

----------------------------------------

If I use the analogous gcc command, everything works.  How can I find out what's going wrong ?

Thanks,

Robin