Problems building ghc-current

Hi, I'm trying to compile the latest version of GHC from CVS. I followed the instructions on GHC's web page and everything worked just fine. But when I updated the sources with "cvs update -dP" as instructed, CVS checked-out pretty much everything the CVS repository carries. (Is that supposed to happen? The CVS cheat sheet suggests that only "ghc", "libraries", and "hslibs" would be used/required.) So, when I tried to compile again -- now with _everything_ in the source tee --, the build fails here: | ------------------------------------------------------------------------ | ==fptools== make boot -wr; | in /usr/local/src/ghc-current/green-card/lib | ------------------------------------------------------------------------ | target ffi Foreign/GreenCard.gc -o Foreign/GreenCard.hs | make[2]: target: Command not found | make[2]: [Foreign/GreenCard.hs] Error 127 (ignored) Obviously, at some point the Makefile goes wrong and doesn't get the options right, but I have no idea where to start looking. Is this a known problem? Or has anyone a suggestion where to start debugging this? I'm building GHC on Linux/i386 with GHC 5.04.3 as boot-strapping compiler and GCC 3.2.2 as C backend. Any suggestions are appreciated! Peter

In local.glasgow-haskell-users, you wrote:
I'm trying to compile the latest version of GHC from CVS. I followed the instructions on GHC's web page and everything worked just fine. But when I updated the sources with "cvs update -dP" as instructed, CVS checked-out pretty much everything the CVS repository carries. (Is that supposed to happen? The CVS cheat sheet suggests that only "ghc", "libraries", and "hslibs" would be used/required.)
Where did you find those instructions? The CVS Cheat Sheat is quite clear on the matter, in fact I couldn't find "-dP" in the entire page. "-d" (don't --want to ;)-- know what the "P" does) at least checks out any subdirectories, which, after getting fpconfig, is indeed the entire tree :) After getting fpconfig, 'cvs checkout ghc hslibs libraries' (if you have 'happy' installed, otherwise you need this as well, 'haddock' might be useful, too). [I guess we should really add those two to the list]
So, when I tried to compile again -- now with _everything_ in the source tee --, the build fails here:
You probably won't need greencard anyway, so maybe it's best to wipe it from the disk (and all the other unrelated stuff). Or simply enter the ghc-director 'make boot all', then go to fptools/libraries, 'make all', and do the same in fptools/hslibs. Regards, Volker -- http://www-i2.informatik.rwth-aachen.de/stolz/ *** PGP *** S/MIME rage against the finite state machine

Volker Stolz writes:
Where did you find those instructions?
At http://haskell.cs.yale.edu/ghc/docs/latest/html/building/sec-cvs.html: | 2.4. Updating Your Source Tree | | It can be tempting to cvs update just part of a source tree to bring in | some changes that someone else has made, or before committing your own | changes. This is NOT RECOMMENDED! [...] | | So, to avoid a lot of hassle, follow this recipe for updating your tree: | | $ cd fptools | $ cvs update -Pd 2>&1 | tee log The '-P' flag (prune) suppresses empty directories in the update.
You probably won't need greencard anyway, so maybe it's best to wipe it from the disk (and all the other unrelated stuff).
I have no problem with that. I think this situation is unsatisfactory, though, I'll have to cvs-update my source repository in two, maybe three separate steps, to avoid checking everything out _again_. Peter Alastair: Thanks a lot for the detailed reply! I'll take a look at the build again; maybe I can get this problem fixed after all.

Alastair Reid writes:
The attached diff (about to be committed) seems to fix the problem.
It does indeed -- thank you very much for your help! One problem remains, though: When I build GHC from the top-level directory, the build process does get the order right. It tries to build »green-card/lib« before »green-card/src« is built -- thus failing for the lack of »green-card.bin«. When I say "make" in the »green-card« subdirectory, the build works perfectly, though, and once green-card is built, the GHC build appears to succeed as well. It's still compiling right now, so I can only be sure in a couple of uh, ... hours. :-) But it looks good. Peter

In local.glasgow-haskell-users, you wrote:
| 2.4. Updating Your Source Tree | It can be tempting to cvs update just part of a source tree to bring in | some changes that someone else has made, or before committing your own | changes. This is NOT RECOMMENDED! [...] | | So, to avoid a lot of hassle, follow this recipe for updating your tree: | $ cd fptools | $ cvs update -Pd 2>&1 | tee log
The '-P' flag (prune) suppresses empty directories in the update.
Hm, okay, probably -dP is the same as -Pd. You're right, this in fact pulls in all the stuff from the entire tree. There probably should be a warning attached to this line.
You probably won't need greencard anyway, so maybe it's best to wipe it from the disk (and all the other unrelated stuff).
I have no problem with that. I think this situation is unsatisfactory, though, I'll have to cvs-update my source repository in two, maybe three separate steps, to avoid checking everything out _again_.
A safe bet is simply invoking 'cvs update' in fptools (w/o -d) and only checking for new directories if you need to. Reasoning: - If you just need one GHC from CVS, you've got a fresh checkout and only want to track minimal changes, e.g. to the STABLE branch where new directories probably won't be created (hmm, not quite true for the hierarcichal libraries now...) - You really track HEAD, in which case you know what you're doing anyway :) This is far from optimal, but hard to do any better. But as I said, that line in the building guide really ought to be fixed. Thanks for pointing this out! Volker -- http://www-i2.informatik.rwth-aachen.de/stolz/ *** PGP *** S/MIME rage against the finite state machine

Volker Stolz writes:
[STABLE branch]
Does the »STABLE« branch contain the meta-haskell extensions already? Because this was the reason I wanted to run the CVS version in the first place. :-) Oh, and I have news: The build does not work yet, unfortunately. It fails here: | ------------------------------------------------------------------------ | ==fptools== make all - --no-print-directory -r; | in /usr/local/src/ghc-current/hdirect/examples/math | ------------------------------------------------------------------------ | ghc -H16m -O -fglasgow-exts -fno-prune-tydecls -package lang \ | -package hdirect -c Math.hs -o Math.o -ohi Math.hi | ghc-5.04.3: unknown package name: hdirect I commented out the lines | ifneq "$(NoEamples)" "YES" | SUBDIRS += examples | endif in »hdirect/Makefile« (»make NoEamples=YES« didn't help, for whatever reason) and this fixed the problem. Only to reveal: | make[1]: Entering directory `/usr/local/src/ghc-current/hood' | make[1]: *** No rule to make target `boot'. Stop. | make[1]: Leaving directory `/usr/local/src/ghc-current/hood' So I erased the »hood« directory altogether and got until here: | ------------------------------------------------------------------------ | ==fptools== make all - --no-print-directory -r; | in /usr/local/src/ghc-current/nofib/imaginary/exp3_8 | ------------------------------------------------------------------------ | HC = ../../../ghc/compiler/ghc-inplace | HC_OPTS = -H16m -O -O -Rghc-timing -H32m -hisuf p_hi -hisuf p_hi -hcsuf p_hc -osuf p_o -prof | RUNTEST_OPTS = -ghc-timing +RTS -H10m -K10m -RTS | ==nofib_p== exp3_8: time to compile Main follows... | ../../../ghc/compiler/ghc-inplace -H16m -O -O -Rghc-timing -H32m -hisuf p_hi -hisuf p_hi -hcsuf p_hc -osuf p_o -prof -c Main.hs -o Main.p_o | make[4]: time: Command not found Erasing »nofib« took care of this problem. This is really fun. :-) Peter
participants (3)
-
Alastair Reid
-
Peter Simons
-
Volker Stolz