Ticket #4012 (new bug)
Compilation results are not deterministic
|Reported by:||kili||Owned by:|
|Keywords:||Cc:||mail@…, the.dead.shall.rise@…, id@…|
|Type of failure:||Other||Difficulty:||Difficult (2-5 days)|
|Test Case:||Blocked By:|
Description (last modified by simonmar) (diff)
There are some issues with non-determinism in the output of GHC, which means that compilations are not repeatable. This affects some users (e.g. Debian packagers) who need to be able to get repeatable hashes for the packages of a GHC build.
The cases we know about that lead to non-deterministic results are:
- The spec_ids (specialised Ids) attached to an Id have a non-deterministic ordering
- CSE can give different results depending on the order in which the bindings are considered, and since the ordering is non-deterministic, the result of CSE is also non-deterministic. e.g. in x = z; y = z; z = 3, where y and x are exported, we can end up with either x = y; y = 3 or y = x; x = 3.
- There seems to be something unpredictable about the order of arguments to SpecConstr-generated specialisations, see http://www.haskell.org/pipermail/glasgow-haskell-users/2011-April/020287.html
- The wrappers generated by the CApiFFI extension have non-deterministic names. (see comment:15 below).
Old ticket description follows
Short story: if you use ghc-18.104.22.16800318 (or similar, probably ghc-6.12.1 release will produce the same results) to bootstrap ghc-6.12, and then use that ghc-6.12 to bootstrap another ghc-6.12, those two instances of ghc-6.12 will have different ABI hashes and interfaces in the ghc package. If you use ghc-6.10 for the bootstrapping, you'll even get differences in the ghc, base and Cabal packages.
Long story: see logfiles and descriptions at http://darcs.volkswurst.de/boot-tests/ (note that the logfiles are quite large, I really don't want to attach 150 MB of logs to this ticket).