[GHC] #16051: Cross compilation broken under Hadrian
GHC
ghc-devs at haskell.org
Tue Feb 12 17:00:29 UTC 2019
#16051: Cross compilation broken under Hadrian
-------------------------------------+-------------------------------------
Reporter: bgamari | Owner: alpmestan
Type: bug | Status: new
Priority: highest | Milestone: 8.8.1
Component: Build System | Version: 8.7
(Hadrian) |
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by alpmestan):
ghctags being gone, I don't have any problem getting the build to complete
with this very simple patch:
{{{#!diff
diff --git a/hadrian/src/UserSettings.hs b/hadrian/src/UserSettings.hs
index c92dd11d44..b6fc30bd90 100644
--- a/hadrian/src/UserSettings.hs
+++ b/hadrian/src/UserSettings.hs
@@ -59,4 +59,4 @@ successColour = mkSuccessColour (Dull Green)
-- 'Stage1' compiler. Setting it to 'Stage3' will build the 'Stage3'
-- compiler. Setting it to 'Stage0' will mean nothing gets built at all.
finalStage :: Stage
-finalStage = Stage2
+finalStage = Stage1
}}}
(this is a setting Matthew introduced somewhat recently, documented in
hadrian's docs)
With this in place, a simple `hadrian/build.sh -j4` builds stage 1 to
completion. However, trying to build this trivial Haskell program then
fails:
{{{#!hs
main = putStrLn "hello"
}}}
with
{{{#!sh
$ _build/stage0/bin/aarch64-unknown-linux-gnu-ghc hello.hs -o hello
[1 of 1] Compiling Main ( hello.hs, hello.o )
hello.hs:1:1: error:
Bad interface file: /nix/store/8h3fdgpq66w8kxzxn49s706505a7ihnr-
ghc-8.4.3/lib/ghc-8.4.3/base-4.11.1.0/Prelude.hi
mismatched interface file versions (wanted "80720190211", got
"8043")
|
1 | main = putStrLn "hello"
| ^
}}}
The cross-compiler ends up looking at the boot compiler's interface files
instead of its own.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/16051#comment:6>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list