I am trying once more to build ghc-2.04 for linux,i486
using ghc-0.29, linux,i486.
And fail after I do:
------------------------------------------------------------------
download, un-zip, un-tar ghc-2.04-src-pl2.tar.gz
------------------------------------------------------------------
Make a link copy tree ..../myfptools-linux (== $(TOP))
with `lndir'.
------------------------------------------------------------------
create $(TOP)/mk/build.mk containing
GhcProjectPatchLevel =2
GhcUseGccForOptAsm=NO
# to test fast whether it builds anything
BuildingParallel=NO
BuildingConcurrent=NO
BuildingProfiling=NO
BuildingGranSim=NO
BuildingProfilingConcurrent=NO
GhcLibWays=
NoFibSubDirs = GHC_ONLY
------------------------------------------------------------------
cd $(TOP); ./configure; make boot
------------------------------------------------------------------
make all
runs for about 4 hours, makes hsc, etc, and reports
...
==fptools== make all;
in /home/mechvel/haskell/glasgow/2.04/myfptools-linux/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
Warning: GENERATE_SPECS pre-processing pragma ignored:
{-# GENERATE_SPECS subtract a{Int#, ....
Warning: ...
...
ghc/PrelBase.lhs:10:9: parse error on input:
Segmentation fault caught, address = 75640072
make[2]: *** [ghc/PrelBase.o] Error 1
make[1]: *** [all] Error 2
------------------------------------------------------------------
Looks like it applies the newly-built hsc to PrelBase.lhs.
So we test manully:
cd <where-new-ghc-is>;
create Main.hs containing main = print "hello\n"
Then
./ghc -c -v Main.hs
yields:
The Glorious Glasgow Haskell Compilation System, version 2.04, patchlevel 2
Effective command line: -c -v
Ineffective C pre-processor:
echo '#line 1 "Main.hs"' > /tmp/ghc10750.cpp && cat Main.hs >>
/tmp/ghc10750.cpp
0.01user 0.00system 0:00.02elapsed 50%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (0major+0minor)pagefaults 0swaps
ghc:compile:Interface file Main.hi doesn't exist
Haskell compiler:
/home/mechvel/haskell/glasgow/2.04/myfptools-linux/ghc/driver/
../compiler/hsc ,-W ,/tmp/ghc10750.cpp -fignore-interface-pragmas
-fomit-interface-pragmas -fsimplify \( -ffloat-lets-exposing-whnf
-ffloat-primops-ok -fcase-of-case -freuse-con -fpedantic-bottoms
-fsimpl-uf-use-threshold3 -fmax-simplifier-iterations4 \)
-himap=.%.hi:/home/mechvel/haskell/glasgow/2.04/myfptools-linux/ghc/driver/
../lib/required%.hi:/home/mechvel/haskell/glasgow/2.04/
myfptools-linux/ghc/driver/../lib/ghc%.hi:/home/mechvel/haskell/
glasgow/2.04/myfptools-linux/ghc/driver/../lib/glaExts%.hi:
/home/mechvel/haskell/glasgow/2.04/myfptools-linux/ghc/driver/../lib
/concurrent%.hi
-v -hifile=/tmp/ghc10750.hi -C=/tmp/ghc10750.hc +RTS -H6000000
-K1000000
=====================================================================
Glasgow Haskell Compiler, version 2.03, for Haskell 1.4
Main.hs:1:9: parse error on input: Segmentation fault caught,
address = 75640061
0.03user 0.01system 0:00.04elapsed 100%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (0major+0minor)pagefaults 0swaps
Touch Main.o, to propagate dependencies:
touch Main.o
0.01user 0.01system 0:00.02elapsed 100%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (0major+0minor)pagefaults 0swaps
rm -f /tmp/ghc10750*
------------------------------------------------------------------
I have the log files from make boot, make all.
The most suspisious message was from `make all'
(before "parse error..segmenattion fault"):
...
gcc -Iparser -I. -I../includes -O -c parser/tree.c -o parser/tree.o
gcc -Iparser -I. -I../includes -O -c parser/ttype.c -o parser/ttype.o
lex -t -s -8 parser/hslexer.flex > parser/hslexer.c ||
( rm -f parser/hslexer.c && exit 1 )
bison -y -d -v parser/hsparser.y
conflicts: 14 shift/reduce
Also there were several messages like
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
-Onot -H16m
-c rename/ParseType.hs -o rename/ParseType.o -osuf o
"rename/ParseType.hs", line 712:
Pattern match(es) completely overlapped: happyFail 0# _ _ _ _ _ _ = ...
"rename/ParseType.hs", line 79:
Pattern match(es) completely overlapped: action_1 0# = ...
"rename/ParseType.hs", line 99:
Pattern match(es) completely overlapped: action_4 0# = ...
...
******************************************************************
Other questions:
-------------------------------------------------------------------
config.mk.in contains GhcProjectPatchLevel =0
I placed 2 in .....build.mk - is this right?
It also contains mkdependHS_1_2 = mkdependHS-1.2
But where is defined mkdependHS-1.2 ?
Many lines contain @..@ values. Say,
FPTOOLS_TOP_ABS = @hardtop@ - where @hardtop@ initiates ?
HOSTPLATFORM = @HostPlatform@
TARGETPLATFORM = @TargetPlatform@
With this, for what target platform it will build?
For I had never set this manually - should I?
Also:
# Installation directories ...
prefix = @prefix@
exec_prefix = @exec_prefix@
...
Where these things will really install?
# ToDo: check if these can be purged now. -- sof
#
@HostPlatform_CPP@_HOST = 1
@HostPlatform_CPP@_TARGET = 1
...
What does this mean?
******************************************************************
Please, advise.
Sergey Mechveliani
[EMAIL PROTECTED]