Opened 14 months ago

Last modified 13 months ago

#15948 new bug

Hadrian build fails on Windows when invoked without --configure flag

Reported by: bgamari Owned by:
Priority: highest Milestone: 8.8.1
Component: Build System (Hadrian) Version: 8.7
Keywords: Cc: alpmestan, snowleopard
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:


The Hadrian build on Windows currently fails with

'C:/msys64/home/ben/ghc/builds/0/project-0/_build/stage0/bin/ghc.exe' exited
ghc.exe: could not detect mingw toolchain

when trying to build the RTS.

I strongly suspect that the problem is that the stage1 toolchain built by Hadrian lives in _build/stage0/bin/ghc whereas the mingw tarballs were extracted to inplace/mingw. It's quite unclear to me how this ever worked.

Change History (5)

comment:1 Changed 14 months ago by bgamari

Indeed cp -R inplace/mingw _build seems to allow the build to proceed.

comment:2 Changed 14 months ago by snowleopard

I think I know what's going on: right now inplace/mingw is copied to _build only when the -c flag is passed, and you prefer to run configure manually. See this:

This is a hack, and we should get rid of it, but I couldn't come up with anything significantly better. Do you have any suggestions on how to reliably handle mingw tarballs? It might seem like this is a task for the configure script, but unfortunately it doesn't know the build root (_build may be overriden).

Here is the corresponding issue on GitHub:

comment:3 Changed 14 months ago by bgamari

Ahh, thanks for the quick reply, Andrey!

That explanation sounds quite plausible. A slight improvement might be to follow through on the TODO you pointed at and add proper dependency tracking.

comment:4 Changed 14 months ago by snowleopard

Summary: Hadrian cannot build on WindowsHadrian build fails on Windows when invoked without --configure flag

comment:5 Changed 13 months ago by alpmestan

I got bitten by this as well. We probably want to fix this sometimes this month, as I suspect most/all Windows users will be bitten by this.

Note: See TracTickets for help on using tickets.