I've attempted to build an installation of GHC which uses
unregisterised libraries, but have not had much success. I am new to
GHC's build system and would be grateful for some advice.
I'm trying to build the 6.4.2 source distribution on an x86 linux
machine, using GHC 6.4.2 (the "Generic Linux with glibc2.3" version on
the download page.) The target is the same machine.
I've created a mk/build.mk file containing just the line:
GhcUnregisterised = YES
which, according to the comment in mk/config.mk, ought to build the
unregisterised libraries that I'm after (and use them by default.)
I run configure as follows:
./configure --prefix="$HOME"/ghc_u
and then simply "make".
After some time, the build fails with the following:
../../ghc/compiler/ghc-inplace -H16m -O -fglasgow-exts -cpp -Iinclude
-"#include" HsBase.h -funbox-strict-fields -ignore-package base -O
Rghc-timing -fgenerics -fgenerics -split-objs -c GHC/Base.lhs -o
GHC/Base.o -ohi GHC/Base.hi
/tmp/ghc4237.s: Assembler messages:
/tmp/ghc4237.s:17: Error: symbol `__stg_split_marker' is already
defined
/tmp/ghc4237.s:29: Error: symbol `__stg_split_marker' is already
defined
/tmp/ghc4237.s:41: Error: symbol `__stg_split_marker' is already
defined
/tmp/ghc4237.s:53: Error: symbol `__stg_split_marker' is already
defined
.... This goes on for a while ...
<<ghc: 124912780 bytes, 12 GCs, 808164/1513632 avg/max bytes residency
(2 samples), 19M in use, 0.00 INIT (0.00 elapsed), 0.59 MUT (2.39
elapsed), 0.10 GC (0.09 elapsed) :ghc>>
make[2]: *** [GHC/Base.o] Error 1
make[1]: *** [all] Error 1
make[1]: Leaving directory
`/mnt/raid/home/jeremyrw/src/src/ghc-6.4.2/libraries'
make: *** [build] Error 1
I've also tried with the following build.mk
(I was guessing the -fvia-C might avoid the above assembler problem.):
GhcUnregisterised = YES
GhcLibHcOpts = -O -fvia-C
but it fails in the same way.
I'm not sure what to do at this point.
Am I missing something in the build.mk?