[Haskell-cafe] GHC > 6.8.2 on IA64-Linux platform (Itanium)
karel.gardas at centrum.cz
Tue Jan 4 09:12:55 CET 2011
nice to hear from you! In fact I've been dealing with this issue a
little bit and just "fixed" Adjustor issue myself and then just hour
before your email came I discovered your excellent gentoo patches! Kudos
to zygoloid for his excellent MBlock.h patch! Also you have saved my own
time by noting that your patches are already upstream. I've been already
thinking about submitting new issue and attaching them there. So I'll
just modify platforms wiki and add some notes how to go over IA/Linux
ghc 6.8.2 <-> 7.0.1 gab by using gentoo's patches.
On 01/ 3/11 09:20 PM, Sergei Trofimovich wrote:
> On Sun, 02 Jan 2011 18:09:05 +0100
> Karel Gardas<karel.gardas at centrum.cz> wrote:
>> I'd like to compile more recent than 6.8.2 GHC on itanium-linux system I
>> do have access to, but I'm kind of unlucky with this. I'm trying
>> unregisterised build (of 6.12.3 and 6.10.4) and it always fails with:
>> "inplace/bin/ghc-stage2" -H32m -O -package-name dph-base-0.4.0
>> -hide-all-packages -i -ilibraries/dph/dph-base/.
>> -Ilibraries/dph/dph-base/include -optP-include
>> -package array-0.3.0.1 -package base-126.96.36.199 -package ghc-prim-0.2.0.0
>> -package random-188.8.131.52 -Odph -funbox-strict-fields -haddock -fcpr-off
>> -XTypeFamilies -XGADTs -XRankNTypes -XBangPatterns -XMagicHash
>> -XUnboxedTuples -XTypeOperators -O2 -XGenerics
>> -fno-warn-deprecated-flags -Wwarn -odir
>> libraries/dph/dph-base/dist-install/build -hidir
>> libraries/dph/dph-base/dist-install/build -stubdir
>> libraries/dph/dph-base/dist-install/build -hisuf hi -osuf o -hcsuf hc
>> -c libraries/dph/dph-base/./Data/Array/Parallel/Base/Hyperstrict.hs -o
>> ghc-stage2: internal error: evacuate: strange closure type 15
>> (GHC version 6.12.3 for ia64_unknown_linux)
>> Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug
>> make: ***
>> make: *** [all] Error 2
>> I've also seen, the last available GHC in Debian for IA64 platform is
>> 6.8.2 -- which I'm using for bootstrap btw so debian will not help me
>> here with some clever patch which would change recent ghc to be buildable...
>> So, I'd like to ask here: is there anybody who was lucky enough to find
>> appropriate set of options or any other magic way how to compile more
>> recent GHC sources to the _stable_ compiler binary on IA64/Linux? If so,
>> please let me know.
> Hello Karel!
> You have hit a nasty Garbage Collector bug in ghc. I (re)discovered it some months
> ago too. There is yet some patches to make stuff work on ia64.
> I think it will be simpler for you to get gentoo's ia64 binaries (unregisterised)
> and bootstrap ghc-HEAD yourself.
> We, gentoo, apply patches for ghc-6.12.3 to make magic happen (all gone upstream
> and ghc-7.0/ghc-7.0.1)
> In case you will decide to bootstrap stable ghc-6.12.3 the following patches should suffice.
> == required patches ==
> * GC patch (the critical one, fixes bug you have posted)
> * you need to pass -G0 to gcc when you build ghc. Gentoo does
> it in a special manner: we add the following to mk/build.mk:
> SRC_HC_OPTS += -optc-G0
> Your approach might be different. It solves known(?) limitation of small object's
> section size.
> == nice to have patches ==
> * remove crufty linker flags in order to able to link ghc on recent binutils
> * f.i.w calls on ia64 (fixes terminfo and thus interactive darcs, otherwise it will SIGSEGV)
> * If you plan to build haddock using unregistered ghc you'll need one more patch
> to export needed API (backported from -HEAD).
> Good luck!
More information about the Glasgow-haskell-users