id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	os	architecture	failure	difficulty	testcase	blockedby	blocking	related
3695	GHC-6.12.1-RC2-20091121 build fails when using stage-1 compiler	jberthold		"When trying to build RC2 (20091121) under Solaris 10, I encountered the following error when building the ghc-prim with the stage-1 compiler:

... previous output containing many of these:
{{{  /bin/sh: syntax error at line 1: `;' unexpected}}}

Then 
{{{
""inplace/bin/ghc-stage1""   -H32m -O    -package-name ghc-prim-0.2.0.0 
-hide-all-packages -i -ilibraries/ghc-prim/. -ilibraries/ghc-prim/dist-install/build 
-ilibraries/ghc-prim/dist-install/build/autogen -Ilibraries/ghc-prim/dist-install/build
 -Ilibraries/ghc-prim/dist-install/build/autogen -Ilibraries/ghc-prim/.  
  -optP-include -optPlibraries/ghc-prim/dist-install/build/autogen/cabal_macros.h 
-package rts-1.0 -split-objs -package-name ghc-prim -XCPP -XMagicHash 
-XForeignFunctionInterface -XUnliftedFFITypes -XUnboxedTuples -XEmptyDataDecls 
-XNoImplicitPrelude -O2 -XGenerics -fno-warn-deprecated-flags    
 -odir libraries/ghc-prim/dist-install/build 
-hidir libraries/ghc-prim/dist-install/build 
-stubdir libraries/ghc-prim/dist-install/build -hisuf hi -osuf  o -hcsuf hc 
-c libraries/ghc-prim/./GHC/Types.hs -o libraries/ghc-prim/dist-install/build/GHC/Types.o
ghc-stage1: panic! (the 'impossible' happened)
  (GHC version 6.12.0.20091121 for sparc-sun-solaris2):
	Error in array index

Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug

make[1]: *** [libraries/ghc-prim/dist-install/build/GHC/Types.o] Error 1
make: *** [all] Error 2
}}}

Additional information: 
To get this far, I built from source and installed the following libraries (in custom locations):
gcc-4.1.2, gmp-4.3.1, autoconf-2.64, automake-1.11, libiconv-1.11, m4-1.4.12, make-3.81, ncurses-5.7, readline-5.2, sed-4.2.1.
Before installing the sed-4.2.1, I hit another error, described in [/trac/ghc/ticket/3683] .
This ticket also describes the messages about the {{{';' unexpected}}}.

Before failing on GHC/Types.hs, the stage-1 compiler compiled one file, GHC/Generics.hs, and generated dependencies in various packages.
"	bug	closed	normal		Compiler	6.12.1 RC1	fixed		berthold@…	Solaris	sparc	Building GHC failed					
