Building cabal with cabal fails?

Isaac Jones ijones at
Sun Aug 20 18:10:48 EDT 2006

shelarcy <shelarcy at> writes:

> On Thu, 17 Aug 2006 21:48:13 +0900, Neil Mitchell
> <ndmitchell at> wrote:
>> darcs get --partial
>> cd Cabal
>> runhaskell Setup configure
>> And I get the error:
>> ./Distribution/Simple.hs:61:1: lexical error
>> Should this work? If not, what should I be doing.
> If Distribution directory is in the same directory,
> runhaskell find and use that. So, Setup.(l)hs import
> Distribution directory's source file, not ghc's
> Distribution/*. And ./Distribution/Simple.hs uses
> C preprocessor, so that cause lexical error.
> If you want to solve this error, you should use cpp
> option like this.
> runhaskell -cpp Setup.lhs configure
> runhaskell -cpp Setup.lhs build
> runhaskell -cpp Setup.lhs install
> Or you have to change to add below pragma per file
> that you can see lexical error.
> {-# OPTIONS -cpp #-}

This is a known problem with bootstrapping.  Maybe this is something
cabal-setup should look for.  That's why the makefile has "make setup"
for bootstrapping.



More information about the cabal-devel mailing list