Head broken again

Roman Leshchinskiy rl at cse.unsw.edu.au
Tue Jul 3 02:28:28 EDT 2007


Hi all,

today, I tried to sync the ghc-ndp branch with head. Again, I'll 
describe the problems I've encountered in the hope that it will be helpful.

First, I tried

   darcs pull http://darcs.haskell.org/ghc
   ./darcs-all pull
   make distclean
   <build as usual>

This failed with

   Registering filepath-1.0...
   Reading package info from "dist/inplace-pkg-config" ... done.
   ghc-pkg: dependency directory-1.0 doesn't exist (use --force to override)

Ok, make distclean hasn't been working properly for quite some time so I 
thought I'd get a fresh tree. After fixing (sort of) a problem with the 
ghc-ndp repository, I tried compiling it:

../../compiler/stage1/ghc-inplace -package-name base-2.1 
-hide-all-packages -split-objs -i -idist/build/autogen -idist/build -i. 
-Idist/build -Iinclude -I../../includes -I../../rts -#include "HsBase.h" 
-odir dist/build -hidir dist/build -package rts-1.0 -O -fglasgow-exts 
-package-name base -cpp -idist/build  -H16m -O -O -Rghc-timing 
-fgenerics -c GHC/Base.lhs -o dist/build/GHC/Base.o  -ohi 
dist/build/GHC/Base.hi
/tmp/ghc3117_0/ghc3117_0.split__178.s:unknown:missing indirect symbols 
for section (__TEXT,__symbol_stub)

This is because I forgot to copy my build.mk which turns off SPLIT_OBJS 
from my old tree. I didn't know that SPLIT_OBJS doesn't work on OS X, 
though. Anyway, after fixing this and syncing with head, I get:

../../compiler/stage1/ghc-inplace -package-name base-2.1 
-hide-all-packages -split-objs -i -idist/build/autogen -idist/build -i. 
-Idist/build -Iinclude -I../../includes -I../../rts -#include "HsBase.h" 
-odir dist/build -hidir dist/build -package rts-1.0 -O -fglasgow-exts 
-package-name base -cpp -idist/build  -H16m -O -O -Rghc-timing 
-fgenerics -c GHC/Base.lhs -o dist/build/GHC/Base.o  -ohi 
dist/build/GHC/Base.hi

/tmp/ghc4105_0/ghc4105_0.split__1.s:6:0: Unknown pseudo-op: .type

/tmp/ghc4105_0/ghc4105_0.split__1.s:6:0:
     Rest of line ignored. 1st junk character valued 95 (_).

/tmp/ghc4105_0/ghc4105_0.split__1.s:17:0: Unknown pseudo-op: .type

/tmp/ghc4105_0/ghc4105_0.split__1.s:17:0:
     Rest of line ignored. 1st junk character valued 95 (_).

I assume the OS X assembler doesn't understand .type directives. On the 
mailing list, I find this patch which hasn't been applied to head yet:

Sat Jun 30 10:22:43 CEST 2007  Clemens Fruhwirth <clemens at endorphin.org>
   * Restrict .type directives to Linux targets only

Alas, darcs apply doesn't work:

darcs: Cannot apply this patch bundle, this is a "--partial repository
We don't have the following patch:
Tue May  1 04:56:10 EST 2007  Alec Berryman <alec at thened.net>
   * Build arrows library if available

   arrows is the only library in libraries/extra-packages not built when 
present

In fact, this missing patch was precisely the problem we (Manuel, 
rather) tried to fix in the ghc-ndp repo earlier. Alas, it seems that 
ghc-ndp simply inherited this from head as I get the same error if I try 
to darcs apply Clemens' patch to it, too. Alec's patch does appear in 
darcs changes, though.

Anyway, after manually changing PprMach.hs such that it doesn't spit out 
.type directives any more, I finally get a working build.

A summary:

1. Something seems to be not quite right with the head repository. 
Pulling from head and then pushing to ghc-ndp (which has been recreated 
only last week) used to fail complaining about the one missing patch 
before Manuel checkpointed it. I get the exact same failure when I darcs 
apply Clemens' patch to head.

2. SPLIT_OBJS doesn't seem to work on OS X. Could it perhaps only be 
turned on on architectures which support it (IIRC, there were other 
architectures which had problems with it).

2. Head doesn't build on Mac OS for me without Clemens' last patch. 
Perhaps the dynamic linking stuff could be done in a branch as it is 
bound to be quite destabilising?

3. make distclean still doesn't work properly. This is a pain, although 
a bearable one.

4. Trying to maintain a branch is still frustrating. I've just spend 4 
hours (and had to rebuild ghc 6 or 7 times) trying to sync ghc-ndp with 
head. Even worse, in the last couple of months, we would have problems 
with building head itself more often than not. I think we lost *weeks* 
trying to work around this. IMO, this is a problem with the current 
development process. From my gcc hacking days I remember that the gcc 
maintainers would only accept patches if they passed the testsuite on at 
least two architectures. This worked wonders for the stability of 
gcc-head. I'd like to propose a similar policy for ghc, at least for 
patches which change OS-specific stuff (it's probably sufficient to test 
changes to the typechecker, simplifier etc. on just one architecture). 
Alternatively, could at least vastly destabilising changes (which the 
dynamic linking stuff is bound to be) be done in a branch? Concurrent 
development doesn't really work otherwise.

Sorry for sounding so frustrated but I really seem to spend more time on 
trying to get ghc to compile than doing actual NDP work.

Roman



More information about the Cvs-ghc mailing list