Hi,
  There are three main things I'm asking about:

a) a core dump, building 2.04-pl2 with an 0.29 binary distribution
b) a minor Makefile gripe, also building 2.04-pl2 with an 0.29 binary dist.
   (but I worked around this one, so it's not a huge concern)
c) some comments on building 2.04-pl2 using a 2.02 binary distribution
   (again, I'm basically giving up building 2.04-pl2 using 2.02, so this
   one isn't a big worry)
(All of these are on a digital alpha platform, OSF1 V4.0)

  Also, could anyone post here a "build.mk" file for building 2.04-pl2
using an 0.29 binary distribution, that definitely worked on alphas ?
(or, actually solaris or sun4 would be nice also.)  It would be
reassuring to know that I'm not getting some "build.mk" option
wrong...

  Thanks in advance.

-----------
a) a core dump, building 2.04-pl2 with a 0.29 binary distribution

  This is my build.mk file:

# don't optimize or debug (since I'm trying to save space),
# and use lotsa heap and stack
GhcHcOpts= -H40m -K8m

  After some two hours, I get errors.  A partial script, with the "-v"
option, trying to do "gmake" after the previous compile failed, is at

http://www.cs.umd.edu/~burdick/haskell/br2.script

  (Compiling with GhcHcOpts= -O -DDEBUG -H40m -K8m -v, I ran out of heap
space.  Does anyone know how much heap space is enough?)

  Those errors are:
...
me -itypecheck -ideSugar -icoreSyn -ispecialise -isimplCore -istranal
-istgSyn -isimplStg -icodeGen -iabsCSyn -imain -ireader -iprofiling -iparser
-inativeGen -fomit-derived-read -fomit-reexported-instances
-DOMIT_DEFORESTER -H40m -K8m    -c typecheck/TcInstUtil.lhs -o
typecheck/TcInstUtil.o -osuf o
<<ghc: 47495680 bytes, 2 GCs, 0/0 avg/max bytes residency (0 samples), 0.19
INIT (0.05 elapsed), 5.56 MUT (8.75 elapsed), 0.31 GC (0.73 elapsed) :ghc>>
ghc-0.29 -cpp -fhaskell-1.3 -fglasgow-exts -DCOMPILING_GHC -Rghc-timing -I.
-IcodeGen -InativeGen -Iparser -iutils -ibasicTypes -itypes -ihsSyn
-iprelude -irename -itypecheck -ideSugar -icoreSyn -ispecialise -isimplCore
-istranal -istgSyn -isimplStg -icodeGen -iabsCSyn -imain -ireader
-iprofiling -iparser -inativeGen -fomit-derived-read
-fomit-reexported-instances -DOMIT_DEFORESTER -H40m -K8m    -c
typecheck/TcDeriv.lhs -o typecheck/TcDeriv.o -osuf o

NOTE: Simplifier still going after 4 iterations; bailing out.
<<ghc: 116940216 bytes, 8 GCs, 0/0 avg/max bytes residency (0 samples), 0.19
INIT (0.03 elapsed), 12.72 MUT (24.78 elapsed), 2.04 GC (9.70 elapsed)
:ghc>>
ghc-0.29 -cpp -fhaskell-1.3 -fglasgow-exts -DCOMPILING_GHC -Rghc-timing -I.
-IcodeGen -InativeGen -Iparser -iutils -ibasicTypes -itypes -ihsSyn
-iprelude -irename -itypecheck -ideSugar -icoreSyn -ispecialise -isimplCore
-istranal -istgSyn -isimplStg -icodeGen -iabsCSyn -imain -ireader
-iprofiling -iparser -inativeGen -fomit-derived-read
-fomit-reexported-instances -DOMIT_DEFORESTER -H40m -K8m  -H10m  -c
typecheck/TcExpr.lhs -o typecheck/TcExpr.o -osuf o
ghc-0.29: ignoring heap-size-setting option (-H10m)...not the largest seen
<<ghc: 327403296 bytes, 29 GCs, 0/8660104 avg/max bytes residency (3
samples), 0.19 INIT (0.05 elapsed), 32.85 MUT (84.80 elapsed), 11.64 GC
(111.00 elapsed) :ghc>>
as1: Internal: /usr/tmp/ghc17186.s, line 30:
../../../../../../src/usr/ccs/bin/as/as1util.p, line 460: 
idn < sym_tab.alloc_len
Fatal error in: /usr/lib/cmplrs/cc/as1 Segmentation fault - core dumped
gmake[2]: *** [typecheck/TcExpr.o] Error 1
------------------------------------------------------------------------
==fptools== gmake all;
 in /var/tmp/burdick/ghc-2.04-src/fptools/ghc/lib
------------------------------------------------------------------------
rm -f ghc/PrelBase.o ; if [ ! -d ghc/PrelBase ]; then mkdir ghc/PrelBase ;
else exit 0; fi; find ghc/PrelBase -name '*.o' -print | xargs rm -f
__rm_food;
../../ghc/driver/ghc -recomp -cpp -fglasgow-exts -fvia-C -Rghc-timing
-split-objs -odir ghc/PrelBase    -c ghc/PrelBase.lhs -o ghc/PrelBase.o
-osuf o
ghc: unrecognised option: -recomp
ghc: input file doesn't exist: ghc/PrelBase
ghc: You can't use -o or -ohi options if you have multiple input files.
        Perhaps the -odir option will do what you want.

Usage: For basic information, try the `-help' option.
gmake[2]: *** [ghc/PrelBase.o] Error 3
gmake[1]: *** [all] Error 2
------------------------------------------------------------------------
==fptools== gmake all;
 in /var/tmp/burdick/ghc-2.04-src/fptools/hslibs
------------------------------------------------------------------------
------------------------------------------------------------------------
===fptools== Recursively making `all' in posix ghc hbc contrib ...
PWD = /var/tmp/burdick/ghc-2.04-src/fptools/hslibs
------------------------------------------------------------------------
------------------------------------------------------------------------


----------
b) a minor Makefile problem (probably a build.mk option I left out...)

  First, a question: I unpacked a binary distribution (for alpha) of
ghc-0.29, set the variables in the scripts, etc.  Then I unpacked the
2.04 sources in a separate directory.  The problem, when building 2.04,
seemed to be that the Makefile structure, when working in, say, the
"compiler/" directory, is determined to use "../../ghc/driver/ghc" (in
the build tree) as the Haskell compiler, and this freshly-built script
tries to call the copy of "hsc" that hasn't actually been built yet (as
opposed to using the "ghc" from the binary distribution that I
unpacked.)  I tried to work around this by replacing
"../../ghc/driver/ghc" with a symlink to the right place, but "gmake"
would keep rebuilding the script...  I worked around this by suspending
"gmake" after it had built the script, replacing the script with the
symlink, and "fg"ing "gmake".  This worked for a while (see part a)),
but it doesn't sound like the approved method...  (I tried setting
HC=...)

Does anyone know what Makefile variable to set to get it to actually
use the copy of "ghc" from the 0.29 binary distribution, instead of the
copy that's being built?  Or, failing that, any advice what I'm
doing wrong?

  Another minor gripe: when ghc runs out of heap space, gmake prints an
error message, but then keeps going, and writes a lot of stuff which
superficially makes it look like the problem is in the "AdamsBashforth"
test.  I don't know whether this is just what gmake always does when called
recursively, or what.  Not a problem, once you realize what's happening...


----------
c) trying to compile 2.04-pl2 with a 2.02 binary distribution
  I'm asking about 0.29, because...
  I was trying to compile 2.04-pl-2 using a 2.02 binary distribution when
I got something like this.  (apparently, what Peter Liljenberg reported on
7/6).

Here's what "gmake" did (after a few hours):
...
 
hsSyn/HsExpr.lhs:9: A group of type signatures have mismatched contexts
                        HsExpr.pprExpr :: 
                            (Name.NamedThing id{-a4dV-},
Outputable.Outputable id{-a4dV-}, Outputable.Outputable pat{-a4dW-},
PrelBase.Eq tyvar{-a4dX-}, Outputable.Outputable tyvar{-a4dX-}, PrelBase.Eq
uvar{-a4dY-}, Outputable.Outputable uvar{-a4dY-}) => ...
                        HsExpr.pprParendExpr :: 
                            (Name.NamedThing id{-a4dZ-},
Outputable.Outputable id{-a4dZ-}, Outputable.Outputable pat{-a4e0-},
PrelBase.Eq tyvar{-a4e1-}, Outputable.Outputable tyvar{-a4e1-}, PrelBase.Eq
uvar{-a4e2-}, Outputable.Outputable uvar{-a4e2-}) => ...



Compilation had errors
gmake[2]: *** [hsSyn/HsExpr.o] Error 1
------------------------------------------------------------------------
...

  So I tried to fix it; it looked like the "multiple type signatures
for mutually recursive functions" bug from 2.02.  I commented out a type
signature around line 206 of ghc/compiler/hsSyn/HsExpr.lhs:

{-    *** hack to try to compile using 2.02
pprExpr :: (NamedThing id, Outputable id, Outputable pat,
            Eq tyvar, Outputable tyvar, Eq uvar, Outputable uvar)
        => PprStyle -> HsExpr tyvar uvar id pat -> Doc
-}

  It seemed to get through that (anyways, HsExpr.o was created.)  Then
I got these errors:

...
Haskellised C pre-processor:
        echo '#line 1 "reader/RdrHsSyn.lhs"' > /tmp/ghc16749.cpp &&
/var/tmp/burdick/fptools/lib/alpha-dec-osf1/ghc-2.02/hscpp -v
'-DCOMPILING_GHC' '-DOMIT_DEFORESTER' '-DDEBUG' '-DCOMPILING_GHC'
'-DOMIT_DEFORESTER' '-DDEBUG' -D__HASKELL1__=4 -D__GLASGOW_HASKELL__=202 -I.
-I. -IcodeGen -InativeGen -Iparser
-I/var/tmp/burdick/fptools/lib/alpha-dec-osf1/ghc-2.02/includes
-I/var/tmp/burdick/fptools/lib/alpha-dec-osf1/ghc-2.02/includes
/tmp/ghc16749.lpp >> /tmp/ghc16749.cpp

real   0.0
user   0.0
sys    0.0
hscpp:CPP invoked: /usr/imports/lib/gcc-lib/alpha-dec-osf4.0/2.7.2/cpp
-traditional -DCOMPILING_GHC -DOMIT_DEFORESTER -DDEBUG -DCOMPILING_GHC
-DOMIT_DEFORESTER -DDEBUG -D__HASKELL1__=4 -D__GLASGOW_HASKELL__=202 -I. -I.
-IcodeGen -InativeGen -Iparser
-I/var/tmp/burdick/fptools/lib/alpha-dec-osf1/ghc-2.02/includes
-I/var/tmp/burdick/fptools/lib/alpha-dec-osf1/ghc-2.02/includes
/tmp/ghc16749.lpp

Haskell compiler:
        /var/tmp/burdick/fptools/lib/alpha-dec-osf1/ghc-2.02/hsc ,-N ,-W
,/tmp/ghc16749.cpp  -fglasgow-exts -hisuf-prelude=.hi -hisuf=.hi
-fdo-eta-reduction -fsimplify \(  -fkeep-spec-pragma-ids
-fsimpl-uf-use-threshold0 -fessential-unfoldings-only
-fmax-simplifier-iterations1 -fpedantic-bottoms \) -fsimplify \(
-ffloat-lets-exposing-whnf -ffloat-primops-ok -fcase-of-case -fdo-case-elim
-fcase-merge -fdo-lambda-eta-expansion -freuse-con -fpedantic-bottoms
-fsimpl-uf-use-threshold3 -fmax-simplifier-iterations4 \) -ffull-laziness
-ffloat-inwards -fsimplify \(  -ffloat-lets-exposing-whnf -ffloat-primops-ok
-fcase-of-case -fdo-case-elim -fcase-merge -fdo-eta-reduction
-fdo-lambda-eta-expansion -freuse-con  -fpedantic-bottoms
-fsimpl-uf-use-threshold3 -fmax-simplifier-iterations4 \) -fstrictness
-fsimplify \(  -ffloat-lets-exposing-whnf -ffloat-primops-ok -fcase-of-case
-fdo-case-elim -fcase-merge -fdo-lambda-eta-expansion -freuse-con
-flet-to-case -fpedantic-bottoms  -fsimpl-uf-use-threshold3
-fmax-simplifier-iterations4 \) -ffloat-inwards -fsimplify \(
-ffloat-lets-exposing-whnf -ffloat-primops-ok -fcase-of-case -fdo-case-elim
-fcase-merge -fdo-lambda-eta-expansion -freuse-con -flet-to-case
-fignore-inline-pragma  -fpedantic-bottoms  -fsimpl-uf-use-threshold3
-fmax-simplifier-iterations4 \) -fupdate-analysis -flambda-lift
-flet-no-escape
-himap=nativeGen:parser:profiling:reader:main:absCSyn:codeGen:simplStg:stgSyn:stranal:simplCore:specialise:coreSyn:deSugar:typecheck:rename:prelude:hsSyn:types:basicTypes:utils:.:/var/tmp/burdick/fptools/lib/alpha-dec-osf1/ghc-2.02/imports
   -v -hifile=/tmp/ghc16749.hi -S=/tmp/ghc16749.s +RTS -H45000000 -K10000000
-s/tmp/ghc16749.stat
Glasgow Haskell Compiler, version 2.02, for Haskell 1.3

 
reader/RdrHsSyn.lhs:218: value not in scope: getOccName
 
reader/RdrHsSyn.lhs:219: value not in scope: getName


Compilation had errors

real   42.5
user   32.5


So, in summary: Has anyone built 2.04-pl2 using 2.02?  If that doesn't
work, IMHO it'd be simpler to just build from version 0.29, rather than
re-patch 2.04-pl2 so that 2.02 can compile it (although presumably
2.04-pl2 at least wouldn't have trouble with the bug involving too many
type signatures for mutually recursive functions.)  Right now, I'm just
trying to compile the compiler using 0.29...

Also, call me lazy [sorry about that :)], but a binary distribution
would be nice, when you have time.  Any help would be appreciated,
thanks,

  Josh
-- 
Josh Burdick ([EMAIL PROTECTED])
http://www.cs.umd.edu/~burdick

Reply via email to