Windows build problems

Daniel Fischer at
Fri Sep 16 00:00:56 CEST 2011

On Thursday 15 September 2011, 21:41:10, Bill Tutt wrote:
> From Daniel Fischer:
> > I'm trying to set up a build/test environment on Windows.
> > 
> > Building ghc (sh validate) fails after a while due to flex and bison
> > crashing. Those two come with git and even
> > $ flex --version
> > (or bison) crashes, so they seem truly hosed.
> > 
> > Do I need flex/bison at all to build ghc?
> > It seems they're not used on linux for building ghc.
> > So, if not, how do I configure things that the build doesn't try to
> > use bison/flex?
> > If yes, would installing flex and bison from gnuwin32 work?
> I ran into this issue last night as well. See

Ugh. I'd like to avoid uninstalling msys and installing something new if 

> flex appears to be required from integer-gmp's ./configure for one of
> GMP's demo programs. (a calculator demo I think)

I can't find anything indicating that on linux, so it'd be probably be due 
to using the in-tree gmp on Windows? But the only mention of flex that 
seems possibly relevant is

# These flags make flex 8-bit

in mk/, and bison is only mentioned in two word lists in 
libraries/bytestring/tests at all (as the animal of course).
So I'm still mystified.

> I'm trying to see if a slightly newer msys installation process as
> listed in the Trac bug will take care of it.

If you get it to work, I'd appreciate detailed (Windows is so far utterly 
incomprehensible to me, so they'd better be very explicit) instructions.

> However, last night I got a stage 1 ghc seg fault while compiling some
> Haskell code further along in the build.

Perhaps compiling GHC.Debug.hs? That's where I get a stage1 segfault on 
linux when bootstrapping with 7.2.1, cf

However, I'm bootstrapping with 7.0.4 (switched on Windows due to the ar 
location problem mentioned in #5488, that gets me to the bison/flex 
problem, builds fine on linux).

> I currently have a devel1 build in progress to see what I come up with
> next.
> I also ran into: about
> bootstrapping using the Windows 7.2.1 standalone bits to bootstrap
> ghc-HEAD.
> If the devel1 build doesn't give any useful symptoms to pass along
> I'll probably retry the build using the Haskell Platform compiler.

If your stage1 segfault is the same as mine, switching to 7.0.x should get 
you around it.

> Fyi,
> Bill


More information about the Glasgow-haskell-users mailing list