ghc 6.10.1 on freebsd 7 amd64 - ghci problems

Markus Barenhoff alios at
Fri Dec 12 09:43:45 EST 2008

On Wed 10.12 13:55, Simon Marlow wrote:


> >>>I checked out and translated the head version of ghc today from darcs.
> >>>It compiled fine. When I now try to start the ghci I get the following:
> >>>
> >>>---- snip ----
> >>>GHCi, version 6.11.20081126:  :? for help
> >>>ghc: internal error: loadObj: failed to mmap() memory below 2Gb; asked 
> >>>for 626688 bytes at 0x40000000, got 0x801635000.  Try specifying an 
> >>>address with +RTS -xm<addr> -RTS
> >>>   (GHC version 6.11.20081126 for x86_64_unknown_freebsd)
> >>>	    Please report this as a GHC bug:  
> >>>
> >>>		Abort (core dumped)	
> >>>---- snip ----
> >>>
> >>>If it helps somehow, you can find the core dump here:
> >>>
> >>That's odd, because 6.8.3 is using 0x40000000 on FreeBSD and is working 
> >>fine (or is it?).
> >
> >yes, it worked, but I haven't installed anymore - so I'am not sure, where 
> >it
> >does maps its stuff into memory.
> The memory map shows that there's nothing mapped in at the place we're 
> asking for memory, but still FreeBSD decides to give us memory somewhere 
> else.  I checked back in 6.8.3 and it looks like we were using MAP_FIXED - 
> now MAP_FIXED is dangerous, because it will overwrite existing mappings 
> (like the binary itself!), which is why we're not doing that now.
> I've committed a patch that uses MAP_FIXED on FreeBSD if other attempts to 
> get memory below 2Gb fail.  I'd be grateful if you could test it out, the 
> patch is this one, pushed to HEAD today:
> Wed Dec 10 11:57:51 GMT 2008  Simon Marlow <marlowsd at>
>   * On FreeBSD, try MAP_FIXED if ordinary mmap() fails to give us suitable 
> memory
>   This appears to be necessary on FreeBSD.  It might be necessary on
>   other OSs too, but I'm being cautious because using MAP_FIXED can lead
>   to crashes by overwriting existing mappings, and we have no (easy) way
>   to prevent that.

I've updated my source tree today. 

But now I've problem while compiling the ghc

Here is the the build output:


/usr/home/alios/src/haskell/ghc/ghc/ghc/stage1-inplace/ghc -DGHCI_TABLES_NEXT_TO_CODE -DSTAGE=2 -package-name ghc-6.11.20081211 -hide-all-packages -no-user-package-conf -i -idist-stage2/build -inativeGen -ibasicTypes -icmm -icodeGen -icoreSyn -icprAnalysis -ideSugar -ighci -ihsSyn -iiface -imain -iparser -iprelude -iprofiling -irename -isimplCore -isimplStg -ispecialise -istgSyn -istranal -itypecheck -itypes -iutils -ivectorise -idist-stage2/build/autogen -Idist-stage2/build/autogen -Idist-stage2/build -I../libffi/build/include -Istage2plus -I../libraries/base/cbits -I../libraries/base/include -I. -Iparser -Iutils -optP-DGHCI -optP-include -optPdist-stage2/build/autogen/cabal_macros.h -odir dist-stage2/build -hidir dist-stage2/build -stubdir dist-stage2/build -package Cabal-1.5.5 -package array- -package base- -package bytestring- -package containers- -package directory- -package filepath- -package haskell98- -package hpc- -package old-time- -package process- -package template-haskell- -package unix- -O -Wall -fno-warn-name-shadowing -fno-warn-orphans -XCPP -XMagicHash -XUnboxedTuples -XPatternGuards -XForeignFunctionInterface -XEmptyDataDecls -XTypeSynonymInstances -XMultiParamTypeClasses -XFlexibleInstances -XRank2Types -XScopedTypeVariables -XDeriveDataTypeable -prof -hisuf p_hi -hcsuf p_hc -osuf p_o -idist-stage2/build  -H32m -O -Rghc-timing -O2  -c nativeGen/MachRegs.lhs -o dist-stage2/build/MachRegs.p_o  -ohi dist-stage2/build/MachRegs.p_hi
ghc: panic! (the 'impossible' happened)
  (GHC version 6.11.20081211 for x86_64-unknown-freebsd):
    (__scc {trivColorable ghc-6.11.20081211:MachRegs !}
     ghc-6.11.20081211:MachRegs.isSqueesed{v r2FI} [gid] 0 0)
      eta_s2Ni{v} [lid]

Please report this as a GHC bug:

<<ghc: 303363536 bytes, 26 GCs, 4992000/12390400 avg/max bytes residency (4 samples), 40M in use, 0.00 INIT (0.00 elapsed), 0.57 MUT (0.84 elapsed), 0.25 GC (0.29 elapsed) :ghc>>
gmake[4]: *** [dist-stage2/build/MachRegs.p_o] Error 1
gmake[3]: *** [all] Error 1
gmake[3]: Leaving directory `/usr/home/alios/src/haskell/ghc/ghc/compiler'
gmake[2]: *** [build.stage.2] Error 2
gmake[2]: Leaving directory `/usr/home/alios/src/haskell/ghc/ghc/compiler'
gmake[1]: *** [stage2] Error 2
gmake[1]: Leaving directory `/usr/home/alios/src/haskell/ghc/ghc'
gmake: *** [bootstrap2] Error 2


Markus Barenhoff - Langemarckstr. 18 - D-48147 Münster - Germany - Europe - Earth
Tel. +49-251-3956651 - Mob. +49-173-7215776 - e-mail: alios at
jabber: alios at - icq: 27998346

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 479 bytes
Desc: not available
Url :

More information about the Glasgow-haskell-users mailing list