id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	os	architecture	failure	difficulty	testcase	blockedby	blocking	related
5579	alex and happy found during ./configure not used	kolmodin	igloo	"This is with HEAD as of 2011-10-24. 0d6529f669104b6f22049d456a9600d949a09018

Looks like the alex and happy executables found during ./configure are not used when compiling libraries in stage 1.

{{{
kolmodin@kolmodin:~/code/ghc$ time PATH=/home/kolmodin/.cabal/bin:$PATH ./configure --prefix=/home/kolmodin/usr --with-ghc=/usr/bin/ghc
...
[snip]
...
----------------------------------------------------------------------
Configure completed successfully.

   Building GHC version  : 7.3.20111024

   Build platform        : x86_64-unknown-linux
   Host platform         : x86_64-unknown-linux
   Target platform       : x86_64-unknown-linux

   Bootstrapping using   : /usr/bin/ghc
      which is version   : 6.12.1

   Using GCC             : /usr/bin/gcc
      which is version   : 4.4.3

   ld       : /usr/bin/ld
   Happy    : /home/kolmodin/.cabal/bin/happy (1.18.6)
   Alex     : /home/kolmodin/.cabal/bin/alex (3.0.1)
   Python   : /usr/bin/python
   Perl     : /usr/bin/perl
   dblatex  : 
   xsltproc : /usr/bin/xsltproc

   HsColour was not found; documentation will not contain source links

   Building DocBook HTML documentation : NO
   Building DocBook PS documentation   : NO
   Building DocBook PDF documentation  : NO
----------------------------------------------------------------------
}}}

When building;
{{{
kolmodin@kolmodin:~/code/ghc$ make
===--- building phase 0
make -r --no-print-directory -f ghc.mk phase=0 phase_0_builds
make[1]: Nothing to be done for `phase_0_builds'.
===--- building phase 1
make -r --no-print-directory -f ghc.mk phase=1 phase_1_builds
""inplace/bin/ghc-cabal"" configure --with-ghc=""/home/kolmodin/code/ghc/inplace/bin/ghc-stage1"" --with-ghc-pkg=""/home/kolmodin/code/ghc/inplace/bin/ghc-pkg"" --flag in-ghc-tree --enable-library-profiling --enable-shared --enable-library-for-ghci --configure-option=CFLAGS="" -fno-stack-protector  "" --configure-option=LDFLAGS=""   "" --configure-option=CPPFLAGS=""   "" --with-gcc=""/usr/bin/gcc"" --configure-option=--with-cc=""/usr/bin/gcc"" --with-ar=""/usr/bin/ar"" --with-ranlib=""true"" -- dist utils/haddock
Configuring haddock-2.9.4...
ghc-cabal: The program alex version >=2.3 is required but the version found at
/usr/bin/alex is version 2.2
make[1]: *** [utils/haddock/dist/package-data.mk] Error 1
make: *** [all] Error 2
}}}

Note that it tried to use {{{/usr/bin/alex}}} while ./configure had found {{{/home/kolmodin/.cabal/bin/alex}}}."	bug	closed	normal	7.4.1	Build System	7.3	fixed	make alex happy		Linux	Unknown/Multiple	Building GHC failed	Unknown				
