Separating build tree from the source tree
marlowsd at gmail.com
Tue Dec 18 15:16:14 CET 2012
On 18/12/12 10:09, Jan Stolarek wrote:
> It turns out that running 'perl boot' in symlinked directory (ghc-build) is not enough. I had to
> run 'perl boot' in the original ghc-working dir and now configure succeedes in ghc-build.
You shouldn't do that, because now you have build files in your source
The problem you ran into is that the configure script tries to use git
to detect the date of the latest patch, to use as the version number of
GHC (e.g. 7.7.20121218). If you're in a build tree made by lndir, then
you don't have a .git directory, so the configure script gives up and
uses 7.7 as the version. This will work, but it's not good because if
you later install some packages for this GHC build using cabal, they
will conflict with packages from other GHC builds in your ~/.cabal
directory. (you can use cabal-dev to avoid this, which is what I do
I've added a note to the wiki about this:
The workaround is to link your .git directory from your build tree, like so:
$ cd ghc-build
$ ln -s $source/.git .
where $source is your source tree.
I don't know why configure failed on your Debian box, though.
More information about the Glasgow-haskell-users