When booting from .hc files I get the following error when linking the initial
HSbase.o in 6.2.1 (lines truncated) A patch for it is below. What do people
think?

  gcc -x c Text/Regex/Posix.hc -o Text/Regex/Posix.o -c -O  -DNO_REGS 
-DUSE_MINIINTERPRETER  -D__GLASG
  gcc -x c Text/Show.hc -o Text/Show.o -c -O  -DNO_REGS -DUSE_MINIINTERPRETER  
-D__GLASGOW_HASKELL__=6
  gcc -x c Text/Show/Functions.hc -o Text/Show/Functions.o -c -O  -DNO_REGS 
-DUSE_MINIINTERPRETER  -D_
  gcc -O -DNO_REGS -DUSE_MINIINTERPRETER 
-I/usr/obj/ports/ghc-6.2.1/ghc-6.2.1/ghc/includes -I/usr/obj/
  gcc -O -DNO_REGS -DUSE_MINIINTERPRETER 
-I/usr/obj/ports/ghc-6.2.1/ghc-6.2.1/ghc/includes -I/usr/obj/
  gcc -O -DNO_REGS -DUSE_MINIINTERPRETER 
-I/usr/obj/ports/ghc-6.2.1/ghc-6.2.1/ghc/includes -I/usr/obj/
  gcc -O -DNO_REGS -DUSE_MINIINTERPRETER 
-I/usr/obj/ports/ghc-6.2.1/ghc-6.2.1/ghc/includes -I/usr/obj/
  gcc -O -DNO_REGS -DUSE_MINIINTERPRETER 
-I/usr/obj/ports/ghc-6.2.1/ghc-6.2.1/ghc/includes -I/usr/obj/
  rm -f libHSbase.a
  /usr/bin/ar q    libHSbase.a Control/Concurrent_stub.o Control/Arrow.o 
Control/Concurrent.o Control/
  : libHSbase.a
  /usr/bin/ld -r -x -o HSbase.o Control/Concurrent_stub.o Control/Arrow.o 
Control/Concurrent.o Control
  Control/Concurrent_stub.o: In function `forkOS_entry':
  Control/Concurrent_stub.o(.text+0x0): multiple definition of `forkOS_entry'
  Control/Concurrent_stub.o(.text+0x0): first defined here
  gmake[1]: *** [HSbase.o] Error 1
  gmake: *** [all] Error 1
  gmake: Leaving directory `/usr/obj/ports/ghc-6.2.1/ghc-6.2.1/libraries'
  *** Error code 2

  Stop in /usr/ports/lang/ghc (line 80 of Makefile).
  *** Error code 1

  Stop in /usr/ports/lang/ghc (line 1674 of /usr/ports/infrastructure/mk/bsd.port.mk).


patch:
------------------------------------------------------------------------

Fix to prevent stub file building when bootstrapping.
This is a bug in the build infrastructure.

--- libraries/base/Makefile.orig        Thu Dec 18 22:28:46 2003
+++ libraries/base/Makefile     Thu Dec 18 22:28:48 2003
@@ -72,12 +72,13 @@
 CLEAN_FILES += GHC/PrimopWrappers.hs
 
 # -----------------------------------------------------------------------------
-
+ifneq "$(BootingFromHc)" "YES"
 STUBOBJS += \
    Control/Concurrent_stub.$(way_)o
    
 CLEAN_FILES += $(STUBOBJS) \
    Control/Concurrent_stub.[ch]
+endif
 
 #-----------------------------------------------------------------------------
 #      Building the library for GHCi
_______________________________________________
Cvs-ghc mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to