Rebuilding ghc

Judah Jacobson judah.jacobson at gmail.com
Tue Jun 10 20:00:50 EDT 2008


On Tue, Jun 10, 2008 at 1:39 PM, Dominic Steinitz
<dominic.steinitz at blueyonder.co.uk> wrote:
> I've built ghc previously and I assumed to keep it up to date I just did
>
> darcs pull
>
> followed by
>
> make
>
> but I got errors and according to the rebuilding instructions
> http://hackage.haskell.org/trac/ghc/wiki/Building/Rebuilding I shouldn't
> have done that.
>
> I therefore followed the instructions but got the following error. By
> the way darcs-pull all seemed to require a lot of manual intervention.
> Is there a way of getting the latest patches automatically and building
> overnight without intervention?
>
> Thanks, Dominic.
>
>> if ifBuildable/ifBuildable /home/dom/ghc/libraries/boot-packages editline; then \
>>           cd editline && \
>>           cmp -s /home/dom/ghc/libraries/Makefile.local Makefile.local || cp /home/dom/ghc/libraries/Makefile.local .; \
>>           mv GNUmakefile GNUmakefile.tmp; \
>>           setup/Setup makefile -f GNUmakefile; \
>>           cmp -s GNUmakefile GNUmakefile.tmp && mv GNUmakefile.tmp GNUmakefile; \
>>           make -wr && \
>>           setup/Setup register --inplace; \
>>         fi
>> mv: cannot stat `GNUmakefile': No such file or directory
>> Preprocessing library editline-0.2...
>> In file included from Editline.hsc:52:
>> include/HsEditline.h:11: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'v'
>> compiling dist/build/System/Console/Editline_hsc_make.c failed
>> command was: gcc -c -D__GLASGOW_HASKELL__=609 -I/home/dom/ghc/includes -I/home/dom/ghc/gmp/gmpbuild -D__GLASGOW_HASKELL__=609 -Iinclude dist/build/System/Console/Editline_hsc_make.c -o dist/build/System/Console/Editline_hsc_make.o
>> make[2]: Entering directory `/home/dom/ghc/libraries/editline'
>> make[2]: *** No targets specified and no makefile found.  Stop.
>> make[2]: Leaving directory `/home/dom/ghc/libraries/editline'
>> make[1]: *** [make.library.editline] Error 2
>> make[1]: Leaving directory `/home/dom/ghc/libraries'
>> make: *** [stage1] Error 2
>

>From that error, I suspect you have a conflict in the editline
package, and the compiler is barfing on the marker "vvvvvv" which is
inserted by darcs.  Strange...

If you weren't planning on hacking editline, it's probably easiest to
just rm -rf the libraries/editline directory and do another "darcs-all
get" to replace it with a consistent version.  Otherwise, send me the
darcs --changes of that repo and I can take a look at it.

Hope that helps,
-Judah


More information about the Glasgow-haskell-users mailing list