#2619: Can't build older compiler
---------------------------------+------------------------------------------
Reporter: judah | Owner:
Type: bug | Status: reopened
Priority: normal | Milestone: 6.10.1
Component: Compiler | Version: 6.11
Severity: normal | Resolution:
Keywords: | Difficulty: Unknown
Testcase: | Os: Unknown/Multiple
Architecture: Unknown/Multiple |
---------------------------------+------------------------------------------
Changes (by chak):
* status: closed => reopened
* resolution: fixed =>
* summary: Can't build HEAD with ghc-6.10 => Can't build older compiler
* version: 6.9 => 6.11
* architecture: x86 => Unknown/Multiple
* os: MacOS X => Unknown/Multiple
Comment:
Roman and I just wasted a day on this bug. The problem appears when you
try to build a compiler with a version number lower than that of the
bootstrapping compiler. (In the above report, ghc-6.9.20080920 built with
6.10.0.20080921.) And the culprit is to nobody's surprise Cabal and/or
it's (ab)use in GHC's build system.
The exact cause is that after the stage1 ghc package has been built,
cabal-bin is invoked to compile and link `ghc/Main.hs`. The '''version'''
of the ghc package against which the compiler Main.hs is to be compiled
and linked is, however, not explicitly specified and cabal in it's
infinite wisdom decides to pick the one with the higher version number.
This happens to be the ghc package of the bootstrap compiler (if it's
version number is higher), instead of the package just built. After that
the build fails in one of a number of ways depending on how much the two
compilers differ in the paths that they have been configured with etc.
The error message reported above is one of possible failures, but Roman
and I had at least two others (picking the wrong version of GCC depending
on what is in `compiler/main/Config.hs` and dying because the versions of
the stage1 ghc -which really is just another version of the bootstrap
compiler- and ghc-pkg don't match up).
People usually don't compile older with newer compilers, but it is
sometimes useful; for example, if you try to bootstrap a Haskell
environment on an exotic architecture - that was our use case. So, the
build system should handle this properly.
When can we finally get rid of Cabal and use the new build system?
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2619#comment:6>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs