Closed AndreasPK closed 5 years ago
Hmm. Odd. That appveyor build went fine for last PR that got merged: https://github.com/snowleopard/hadrian/pull/691
Maybe that was before some GHC patch broke everything (again) ?
For the record, the first error message comes from my work on https://github.com/snowleopard/hadrian/issues/564 (which resulted in ghc commit https://github.com/ghc/ghc/commit/5d76846405240c051b00cddcda9d8d02c880968e). It'd be nice to get the output of the same command with --trace
.
For the second one, it looks like _build/stage0/utils/deriveConstants/setup-config
ends up need
ing C:/Users/Andi/AppData/Local/Programs/stack/x86_64-windows/msys2-20150512/opt/ghc/bin/ghc.exe
, which... doesn't exist? Any idea of what might be going on there @snowleopard? Again, adding --trace
to the command will give us a lot more output, maybe that will give us a lead.
Trace output
$ hadrian/build.sh --flavour=quickest
Up to date
Up to date
| Run Happy: utils/genprimopcode/Parser.y => _build/stage0/utils/genprimopcode/build/Parser.hs
happy.exe: C:\test\pyn\.stack-work\install\69301fa4\share\x86_64-windows-ghc-8.0.2\happy-1.19.5/HappyTemplate-arrays-coerce: openFile: does not exist (No such file or directory)
shakeArgsWith 0.000s 0%
Function shake 0.275s 13% ====
Database read 0.005s 0%
With database 0.001s 0%
Running rules 1.715s 85% =========================
Total 1.996s 100%
Error when running Shake build system:
* _build/stage0/bin/genprimopcode.exe
* _build/stage0/utils/genprimopcode/build/Syntax.o
* _build/stage0/utils/genprimopcode/build/Syntax.o _build/stage0/utils/genprimopcode/build/Syntax.hi
* OracleQ (KeyValues ("_build/stage0/utils/genprimopcode/.dependencies","_build/stage0/utils/genprimopcode/build/Syntax.o"))
* _build/stage0/utils/genprimopcode/.dependencies
* _build/stage0/utils/genprimopcode/.dependencies.mk
* _build/stage0/utils/genprimopcode/build/Parser.hs
user error (Development.Shake.cmd, system command failed
Command: C:/Users/Andi/AppData/Roaming/local/bin/happy.exe -agc --strict utils/genprimopcode/Parser.y -o _build/stage0/utils/genprimopcode/build/Parser.hs
Exit code: 1
Stderr:
happy.exe: C:\test\pyn\.stack-work\install\69301fa4\share\x86_64-windows-ghc-8.0.2\happy-1.19.5/HappyTemplate-arrays-coerce: openFile: does not exist (No such file or directory)
)
That's an odd one. No more details? Did you run hadrian/build.sh --flavour=quickest --trace
?
@alpmestan Do you mean --verbose
?
--verbose and --trace do the same thing no? Judging from hadrian's --help
output.
@AndreasPK In the first case (build.sh
) you seem to miss -c
that does the configuration step and copies Windows tarballs. In general, please use build.bat
on Windows.
I'll try to reproduce the failure with build.bat
when get to my laptop.
@alpmestan Ah, indeed, I didn't know about --trace
.
I've run configure manually above
Some more dumps from build.sh/build.bat (are both supported on windows?)
$ hadrian/build.sh -c --flavour=quickest --trace --verbose
Up to date
Up to date
| Building Stage1 libraries: binary, Cabal, ghc, ghc-boot, ghc-boot-th, ghc-heap, ghci, hpc, mtl, parsec, template-haskell, text, transformers, array, base, bytestring, containers, deepseq, directory, filepath, ghc-compact, ghc-prim, haskeline, integer-gmp, pretty, process, rts, stm, time, xhtml, Win32
| Building Stage1 programs : ghc, ghc-pkg, hsc2hs, unlit, hpc, runghc, touchy
# _build/stage2/bin/haddock.exe
| ContextData oracle: resolving data for 'Cabal' (Stage1, v)...
# _build/stage1/libraries/Cabal/Cabal/setup-config
| Configure package 'Cabal'
# _build/stage2/bin/ghctags.exe
# _build/stage1/lib/package.conf.d/Win32-2.6.1.0.conf
# _build/stage1/lib/platformConstants
# _build/generated/platformConstants
# _build/stage1/bin/runghc.exe
| ContextData oracle: resolving data for 'Win32' (Stage1, v)...
# _build/stage1/libraries/Win32/setup-config
| Configure package 'Win32'
# _build/stage1/bin/hpc.exe
# _build/stage1/lib/package.conf.d/xhtml-3000.2.2.1.conf
# _build/stage1/lib/package.conf.d/time-1.8.0.2.conf
# _build/stage1/lib/package.conf.d/stm-2.5.0.0.conf
# _build/stage1/lib/package.conf.d/rts-1.0.conf
# _build/stage1/lib/package.conf.d/process-1.6.3.0.conf
# _build/stage1/lib/package.conf.d/pretty-1.1.3.6.conf
# _build/stage1/lib/package.conf.d/integer-gmp-1.0.2.0.conf
# _build/stage1/bin/hsc2hs.exe
# _build/stage1/lib/package.conf.d/haskeline-0.7.4.3.conf
# _build/stage1/lib/package.conf.d/ghc-prim-0.5.3.conf
# _build/stage1/bin/ghc-pkg.exe
# _build/stage1/lib/package.conf.d/ghc-compact-0.1.0.0.conf
# _build/stage1/bin/ghc.exe
# _build/stage1/lib/package.conf.d/filepath-1.4.2.1.conf
# _build/stage1/lib/package.conf.d/directory-1.3.3.0.conf
# _build/stage1/lib/package.conf.d/deepseq-1.4.4.0.conf
# _build/stage1/lib/package.conf.d/containers-0.6.0.1.conf
# _build/stage1/lib/package.conf.d/bytestring-0.10.8.2.conf
# _build/stage1/lib/package.conf.d/base-4.12.0.0.conf
# _build/stage1/lib/package.conf.d/array-0.5.2.0.conf
# _build/stage1/lib/package.conf.d/transformers-0.5.5.0.conf
# _build/stage1/lib/package.conf.d/text-1.2.3.1.conf
# _build/stage1/lib/package.conf.d/template-haskell-2.14.0.0.conf
# _build/stage1/lib/package.conf.d/parsec-3.1.13.0.conf
# _build/stage1/lib/package.conf.d/mtl-2.2.2.conf
# _build/stage1/lib/package.conf.d/hpc-0.6.0.3.conf
# _build/stage1/lib/package.conf.d/ghci-8.7.conf
# _build/stage1/lib/package.conf.d/ghc-heap-8.7.conf
# _build/stage1/lib/package.conf.d/ghc-boot-th-8.7.conf
# _build/stage1/lib/package.conf.d/ghc-boot-8.7.conf
# _build/stage1/lib/package.conf.d/ghc-8.7.conf
# _build/stage1/lib/package.conf.d/Cabal-2.4.0.1.conf
# _build/stage1/lib/package.conf.d/binary-0.8.6.0.conf
# _build/stage0/lib/package.conf.d/transformers-0.5.5.0.conf
# _build/stage0/lib/platformConstants
# _build/stage0/lib/package.conf.d/text-1.2.3.1.conf
# _build/stage0/lib/package.conf.d/template-haskell-2.14.0.0.conf
# _build/stage0/lib/package.conf.d/parsec-3.1.13.0.conf
# _build/stage0/lib/package.conf.d/mtl-2.2.2.conf
# _build/stage0/lib/package.conf.d/hpc-0.6.0.3.conf
# _build/stage0/bin/ghc-pkg.exe
| ContextData oracle: resolving data for 'Cabal' (Stage0, v)...
# _build/stage0/libraries/Cabal/Cabal/setup-config
| Configure package 'Cabal'
# _build/stage0/lib/package.conf.d/ghci-8.7.conf
# _build/stage0/lib/package.conf.d/ghc-heap-8.7.conf
# _build/stage0/lib/package.conf.d/ghc-boot-th-8.7.conf
# _build/stage0/lib/package.conf.d/ghc-boot-8.7.conf
# _build/stage0/bin/ghc.exe
# _build/stage0/bin/genprimopcode.exe
# _build/stage0/utils/genprimopcode/build/Syntax.o
# _build/stage0/utils/genprimopcode/build/Syntax.o _build/stage0/utils/genprimopcode/build/Syntax.hi
# _build/stage0/utils/genprimopcode/.dependencies
# _build/stage0/utils/genprimopcode/.dependencies.mk
# _build/stage0/utils/genprimopcode/build/Parser.hs
| Run Happy: utils/genprimopcode/Parser.y => _build/stage0/utils/genprimopcode/build/Parser.hs
C:/Users/Andi/AppData/Roaming/local/bin/happy.exe -agc --strict utils/genprimopcode/Parser.y -o _build/stage0/utils/genprimopcode/build/Parser.hs
happy.exe: C:\test\pyn\.stack-work\install\69301fa4\share\x86_64-windows-ghc-8.0.2\happy-1.19.5/HappyTemplate-arrays-coerce: openFile: does not exist (No such file or directory)
shakeArgsWith 0.000s 0%
Function shake 0.251s 16% ====
Database read 0.002s 0%
With database 0.000s 0%
Running rules 1.294s 83% =========================
Total 1.548s 100%
Error when running Shake build system:
* _build/stage0/bin/genprimopcode.exe
* _build/stage0/utils/genprimopcode/build/Syntax.o
* _build/stage0/utils/genprimopcode/build/Syntax.o _build/stage0/utils/genprimopcode/build/Syntax.hi
* OracleQ (KeyValues ("_build/stage0/utils/genprimopcode/.dependencies","_build/stage0/utils/genprimopcode/build/Syntax.o"))
* _build/stage0/utils/genprimopcode/.dependencies
* _build/stage0/utils/genprimopcode/.dependencies.mk
* _build/stage0/utils/genprimopcode/build/Parser.hs
user error (Development.Shake.cmd, system command failed
Command: C:/Users/Andi/AppData/Roaming/local/bin/happy.exe -agc --strict utils/genprimopcode/Parser.y -o _build/stage0/utils/genprimopcode/build/Parser.hs
Exit code: 1
Stderr:
happy.exe: C:\test\pyn\.stack-work\install\69301fa4\share\x86_64-windows-ghc-8.0.2\happy-1.19.5/HappyTemplate-arrays-coerce: openFile: does not exist (No such file or directory)
)
hadrian/build.bat -c --flavour=quickest --trace --verbose -j5
WARNING: Ignoring out of range dependency (allow-newer enabled): QuickCheck-2.11.3. hadrian requires: >=2.6 && <2.11
Error when reading Shake database _build/hadrian\.shake.database
Witness type has disappeared, StepKey {7f27280ab3bbfbde}
CallStack (from HasCallStack):
error, called at src\Development\Shake\Internal\Core\Storage.hs:191:40 in shake-0.16.4-CXjNkJq2iLlIVaDYJLumnH:Development.Shake.Internal.Core.Storage
All files will be rebuilt
# hadrian/cfg/system.config
# hadrian/cfg/system.config settings mk/config.h compiler/ghc.cabal rts/rts.cabal
| Checking for Windows tarballs...
# mk/config.h.in
# rts/rts.cabal.in
# compiler/ghc.cabal.in
# hadrian/cfg/system.config.in
# settings.in
# configure mk/config.h.in
# configure.ac
| Running boot...
Booting .
Booting libraries/base/
Booting libraries/directory/
Booting libraries/integer-gmp/
Booting libraries/process/
Booting libraries/terminfo/
Booting libraries/time/
Booting libraries/unix/
Can't locate Autom4te/ChannelDefs.pm in @INC (you may need to install the Autom4te::ChannelDefs module) (@INC contains: /usr/share/autoconf /usr/lib/perl5/site_perl /usr/share/perl5/site_perl /usr/lib/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib/perl5/core_perl /usr/share/perl5/core_perl .) at /c/ghc/msys64/usr/bin/autoreconf line 39.
BEGIN failed--compilation aborted at /c/ghc/msys64/usr/bin/autoreconf line 39.
Can't locate Autom4te/ChannelDefs.pm in @INC (you may need to install the Autom4te::ChannelDefs module) (@INC contains: /usr/share/autoconf /usr/lib/perl5/site_perl /usr/share/perl5/site_perl /usr/lib/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib/perl5/core_perl /usr/share/perl5/core_perl .) at /c/ghc/msys64/usr/bin/autoreconf line 39.
BEGIN failed--compilation aborted at /c/ghc/msys64/usr/bin/autoreconf line 39.
Can't locate Autom4te/ChannelDefs.pm in @INC (you may need to install the Autom4te::ChannelDefs module) (@INC contains: /usr/share/autoconf /usr/lib/perl5/site_perl /usr/share/perl5/site_perl /usr/lib/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib/perl5/core_perl /usr/share/perl5/core_perl .) at /c/ghc/msys64/usr/bin/autoreconf line 39.
BEGIN failed--compilation aborted at /c/ghc/msys64/usr/bin/autoreconf line 39.
Can't locate Autom4te/ChannelDefs.pm in @INC (you may need to install the Autom4te::ChannelDefs module) (@INC contains: /usr/share/autoconf /usr/lib/perl5/site_perl /usr/share/perl5/site_perl /usr/lib/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib/perl5/core_perl /usr/share/perl5/core_perl .) at /c/ghc/msys64/usr/bin/autoreconf line 39.
BEGIN failed--compilation aborted at /c/ghc/msys64/usr/bin/autoreconf line 39.
Can't locate Autom4te/ChannelDefs.pm in @INC (you may need to install the Autom4te::ChannelDefs module) (@INC contains: /usr/share/autoconf /usr/lib/perl5/site_perl /usr/share/perl5/site_perl /usr/lib/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib/perl5/core_perl /usr/share/perl5/core_perl .) at /c/ghc/msys64/usr/bin/autoreconf line 39.
BEGIN failed--compilation aborted at /c/ghc/msys64/usr/bin/autoreconf line 39.
Can't locate Autom4te/ChannelDefs.pm in @INC (you may need to install the Autom4te::ChannelDefs module) (@INC contains: /usr/share/autoconf /usr/lib/perl5/site_perl /usr/share/perl5/site_perl /usr/lib/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib/perl5/core_perl /usr/share/perl5/core_perl .) at /c/ghc/msys64/usr/bin/autoreconf line 39.
BEGIN failed--compilation aborted at /c/ghc/msys64/usr/bin/autoreconf line 39.
Can't locate Autom4te/ChannelDefs.pm in @INC (you may need to install the Autom4te::ChannelDefs module) (@INC contains: /usr/share/autoconf /usr/lib/perl5/site_perl /usr/share/perl5/site_perl /usr/lib/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib/perl5/core_perl /usr/share/perl5/core_perl .) at /c/ghc/msys64/usr/bin/autoreconf line 39.
BEGIN failed--compilation aborted at /c/ghc/msys64/usr/bin/autoreconf line 39.
Can't locate Autom4te/ChannelDefs.pm in @INC (you may need to install the Autom4te::ChannelDefs module) (@INC contains: /usr/share/autoconf /usr/lib/perl5/site_perl /usr/share/perl5/site_perl /usr/lib/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib/perl5/core_perl /usr/share/perl5/core_perl .) at /c/ghc/msys64/usr/bin/autoreconf line 39.
BEGIN failed--compilation aborted at /c/ghc/msys64/usr/bin/autoreconf line 39.
autoreconf in . failed with exit code 2
autoreconf in libraries/base/ failed with exit code 2
autoreconf in libraries/directory/ failed with exit code 2
autoreconf in libraries/integer-gmp/ failed with exit code 2
autoreconf in libraries/process/ failed with exit code 2
autoreconf in libraries/terminfo/ failed with exit code 2
autoreconf in libraries/time/ failed with exit code 2
autoreconf in libraries/unix/ failed with exit code 2
shakeArgsWith 0.001s 0%
Function shake 0.257s 10% ===
Database read 0.001s 0%
With database 0.000s 0%
Running rules 2.105s 89% =========================
Total 2.363s 100%
Error when running Shake build system:
* OracleQ (KeyValue ("hadrian/cfg/system.config","host-os"))
* hadrian/cfg/system.config
* hadrian/cfg/system.config settings mk/config.h compiler/ghc.cabal rts/rts.cabal
* mk/config.h.in
* configure mk/config.h.in
user error (Development.Shake.cmd, system command failed
Command: python3 boot --hadrian
Exit code: 1
Stderr:
Can't locate Autom4te/ChannelDefs.pm in @INC (you may need to install the Autom4te::ChannelDefs module) (@INC contains: /usr/share/autoconf /usr/lib/perl5/site_perl /usr/share/perl5/site_perl /usr/lib/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib/perl5/core_perl /usr/share/perl5/core_perl .) at /c/ghc/msys64/usr/bin/autoreconf line 39.
BEGIN failed--compilation aborted at /c/ghc/msys64/usr/bin/autoreconf line 39.
Can't locate Autom4te/ChannelDefs.pm in @INC (you may need to install the Autom4te::ChannelDefs module) (@INC contains: /usr/share/autoconf /usr/lib/perl5/site_perl /usr/share/perl5/site_perl /usr/lib/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib/perl5/core_perl /usr/share/perl5/core_perl .) at /c/ghc/msys64/usr/bin/autoreconf line 39.
BEGIN failed--compilation aborted at /c/ghc/msys64/usr/bin/autoreconf line 39.
Can't locate Autom4te/ChannelDefs.pm in @INC (you may need to install the Autom4te::ChannelDefs module) (@INC contains: /usr/share/autoconf /usr/lib/perl5/site_perl /usr/share/perl5/site_perl /usr/lib/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib/perl5/core_perl /usr/share/perl5/core_perl .) at /c/ghc/msys64/usr/bin/autoreconf line 39.
BEGIN failed--compilation aborted at /c/ghc/msys64/usr/bin/autoreconf line 39.
Can't locate Autom4te/ChannelDefs.pm in @INC (you may need to install the Autom4te::ChannelDefs module) (@INC contains: /usr/share/autoconf /usr/lib/perl5/site_perl /usr/share/perl5/site_perl /usr/lib/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib/perl5/core_perl /usr/share/perl5/core_perl .) at /c/ghc/msys64/usr/bin/autoreconf line 39.
BEGIN failed--compilation aborted at /c/ghc/msys64/usr/bin/autoreconf line 39.
Can't locate Autom4te/ChannelDefs.pm in @INC (you may need to install the Autom4te::ChannelDefs module) (@INC contains: /usr/share/autoconf /usr/lib/perl5/site_perl /usr/share/perl5/site_perl /usr/lib/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib/perl5/core_perl /usr/share/perl5/core_perl .) at /c/ghc/msys64/usr/bin/autoreconf line 39.
BEGIN failed--compilation aborted at /c/ghc/msys64/usr/bin/autoreconf line 39.
Can't locate Autom4te/ChannelDefs.pm in @INC (you may need to install the Autom4te::ChannelDefs module) (@INC contains: /usr/share/autoconf /usr/lib/perl5/site_perl /usr/share/perl5/site_perl /usr/lib/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib/perl5/core_perl /usr/share/perl5/core_perl .) at /c/ghc/msys64/usr/bin/autoreconf line 39.
BEGIN failed--compilation aborted at /c/ghc/msys64/usr/bin/autoreconf line 39.
Can't locate Autom4te/ChannelDefs.pm in @INC (you may need to install the Autom4te::ChannelDefs module) (@INC contains: /usr/share/autoconf /usr/lib/perl5/site_perl /usr/share/perl5/site_perl /usr/lib/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib/perl5/core_perl /usr/share/perl5/core_perl .) at /c/ghc/msys64/usr/bin/autoreconf line 39.
BEGIN failed--compilation aborted at /c/ghc/msys64/usr/bin/autoreconf line 39.
Can't locate Autom4te/ChannelDefs.pm in @INC (you may need to install the Autom4te::ChannelDefs module) (@INC contains: /usr/share/autoconf /usr/lib/perl5/site_perl /usr/share/perl5/site_perl /usr/lib/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib/perl5/core_perl /usr/share/perl5/core_perl .) at /c/ghc/msys64/usr/bin/autoreconf line 39.
BEGIN failed--compilation aborted at /c/ghc/msys64/usr/bin/autoreconf line 39.
autoreconf in . failed with exit code 2
autoreconf in libraries/base/ failed with exit code 2
autoreconf in libraries/directory/ failed with exit code 2
autoreconf in libraries/integer-gmp/ failed with exit code 2
autoreconf in libraries/process/ failed with exit code 2
autoreconf in libraries/terminfo/ failed with exit code 2
autoreconf in libraries/time/ failed with exit code 2
autoreconf in libraries/unix/ failed with exit code 2
)
I have no idea where the C:\test\pyn.stack-work\install... path comes from tbh.
Deleting the " C:\test\pyn.." path made the build.sh script run through. Still not sure why that got picked up to begin with though. It's definitely not in PATH.
Some more dumps from
build.sh/build.bat
(are both supported on windows?)
@AndreasPK No. On Windows we only support build.bat
(which currently redirects to build.stack.bat
). There is also build.cabal.bat
, although I believe it is not in the CI, so less reliable.
(Sorry, I can't be more helpful. This week is very busy.)
I reproduced the Happy-related failure on my machine:
| Run Happy: utils/genprimopcode/Parser.y => _build/stage0/utils/genprimopcode/build/Parser.hs
happy.exe: C:\msys\home\nam83\ghc\hadrian\.stack-work\install\db7ce97c\share\x86_64-windows-ghc-8.4.3\happy-1.19.9/HappyTemplate-arrays-coerce: openFile: does not exist (No such file or directory)
shakeArgsWith 0.001s 0%
Function shake 0.336s 0%
Database read 0.001s 0%
With database 0.000s 0%
Running rules 232.532s 99% =========================
Total 232.870s 100%
Error when running Shake build system:
* _build/stage0/bin/genprimopcode.exe
* _build/stage0/utils/genprimopcode/build/Main.o
* _build/stage0/utils/genprimopcode/build/Main.o _build/stage0/utils/genprimopcode/build/Main.hi
* OracleQ (KeyValues ("_build/stage0/utils/genprimopcode/.dependencies","_build/stage0/utils/genprimopcode/build/Main.o"))
* _build/stage0/utils/genprimopcode/.dependencies
* _build/stage0/utils/genprimopcode/.dependencies.mk
* _build/stage0/utils/genprimopcode/build/Parser.hs
user error (Development.Shake.cmd, system command failed
Command: C:/Users/nam83/AppData/Roaming/local/bin/happy.exe -agc --strict utils/genprimopcode/Parser.y -o _build/stage0/utils/genprimopcode/build/Parser.hs
Exit code: 1
Stderr:
happy.exe: C:\msys\home\nam83\ghc\hadrian\.stack-work\install\db7ce97c\share\x86_64-windows-ghc-8.4.3\happy-1.19.9/HappyTemplate-arrays-coerce: openFile: does not exist (No such file or directory)
)
Just like in @AndreasPK's case, the path C:\msys\home\nam83\ghc\hadrian\.stack-work\install\db7ce97c\share\x86_64-windows-ghc-8.4.3\happy-1.19.9/HappyTemplate-arrays-coerce
makes no sense.
The problem seems to be not with Hadrian, but rather with the Happy installation. If I reinstall Happy, the build continues correctly.
Here is I think what happened in @AndreasPK's case: he installed Happy before trying Hadrian, and during the installation Happy put its HappyTemplate-arrays-coerce
into the C:\test\pyn...
directory, which later got removed breaking the Happy installation.
In my case, Happy was installed in the Hadrian's .stack-work\install\db7ce97c
directory, which later was removed too, triggering the same failure in my case.
I don't really know whether we can do anything about this in Hadrian. It seems to me that the configure
script should test that Happy actually works.
@AndreasPK Do you need any further help with using Hadrian on Windows?
For the moment I went back to make :/
Currently build.bat still doesn't work (see log above) only build.sh does after "fixing" the happy issue. So there is no officially supported way to run the build. I can work around that by using build.sh but given that it's not supported I'm not keen on going that way.
I wonder why build.sh is not supported if we require an msys installation anyway. Having differing default workflows for windows/linux does seem like it will only lead to issues down the road.
There is also #696 which for me is on it's own enough of a pain point to keep using make for now.
@AndreasPK I couldn't reproduce your boot
failure unfortunately, so I'm not sure what to do.
I wonder why build.sh is not supported if we require an msys installation anyway. Having differing default workflows for windows/linux does seem like it will only lead to issues down the road.
We do not require an MSYS installation (see the AppVeyor build script, for example). Hadrian can be used on Windows without installing MSYS manually -- this is handled by Stack.
Have you tried build.cabal.bat
? Like build.sh
it uses Cabal instead of Stack (and therefore does require an existing MSYS installation).
We do not require an MSYS installation: Hadrian can be used on Windows without installing MSYS manually -- this is handled by Stack.
I see. I must have misinterpreted something then and it's good to know! I did try it from powershell and from within an msys environment though.
Have you tried build.cabal.bat
I have not. I've started a build now but I can already say it's affected by #696 as I forgot to pass -j initially. Seems to work otherwise. I did hit some "Bad interface file" errors but that was likely from earlier build artefacts.
edit: After running clean the cabal.bat version works.
@AndreasPK Thanks for giving the Cabal script a try!
I agree that #696 is annoying. As a workaround I sometimes terminate Hadrian in the Task manager, which is awkward, but seems to work.
The build.bat
failure you reported above (when the boot
script failed) seems to be not from a clean build state. Could you please try to reproduce it after a clean GHC checkout?
I agree that #696 is annoying. As a workaround I sometimes terminate Hadrian in the Task manager, which is awkward, but seems to work.
Yes it's what I did. But at that point I have to ask myself why not just stay on make for now.
The build.bat failure you reported above (when the boot script failed) seems to be not from a clean build state. Could you please try to reproduce it after a clean GHC checkout?
git clean -fxd
wasn't enough at least to make build.bat work. There shouldn't be a difference but I will give a clean checkout a try.
So I got the same build.bat error with a clean check out.
A question about the shell requirements:
We do not require an MSYS installation: Hadrian can be used on Windows without installing MSYS manually -- this is handled by Stack.
From the quickstart page:
In particular for Windows users, all the commands below must be executed in the MinGW shell
Is this just plain wrong or are users supposed to do something like stack exec mintty and run hadrian from there? (Although not sure if this is the right place to discuss this).
So I got the same build.bat error with a clean check out.
Do you get the same error if you run the command in question python3 boot --hadrian
manually?
Is this just plain wrong
Yes, I think the QuickStart page is wrong in this respect. Let me CC @alpmestan who wrote it -- is there any reason for requiring the MinGW shell when developing GHC on Windows? Even with Make I think we can now build GHC in other Windows shells.
Although not sure if this is the right place to discuss this
Don't worry, it's perfectly fine to discuss any Hadrian-related questions here.
I simply borrowed this bit from the guide for the make build system. Please feel free to edit the page and make all the necessary corrections. Since I'm not a Windows user, any Windows-specific details will be best taken care of by either/both of you. :-)
@alpmestan Thanks! :) Yes, I'll do some edits for Windows-specific bits.
I believe this has been fixed.
Both build.sh and build.bat are broken for seemingly different reasons.