hadrian asks for installing a wsl linux distro in windows
Summary
hadrian build fails in windows 10 with wsl but no linux distro installed:
$ hadrian/build.bat -j
Up to date
| Configure package 'rts'
| Configure package 'unlit'
| In tree GMP will be built
# cabal-configure (for _build/stage0/utils/unlit/setup-config)
| Run GhcPkg Dependencies Stage0: containers
| Run GhcPkg Dependencies Stage0: time
| Run Cc FindCDependencies Stage0: utils/touchy/touchy.c => _build/stage0/utils/touchy/build/c/touchy.o.d
| Run GhcPkg Dependencies Stage0: Win32
| Run GhcPkg Dependencies Stage0: bytestring
| Run GhcPkg Dependencies Stage0: directory
| Run Configure "_build/stage1/gmp/gmpbuild": _build/stage1/gmp/gmpbuild/Makefile.in => _build/stage1/gmp/gmpbuild/Makefile
| Run Ghc FindHsDependencies Stage0: utils/hsc2hs/ATTParser.hs (and 11 more) => _build/stage0/utils/hsc2hs/.dependencies.mk
Error when running Shake build system:
at action, called at src\Rules.hs:71:19 in main:Rules
at need, called at src\Rules.hs:93:5 in main:Rules
* Depends on: _build/stage1/lib/package.conf.d/integer-gmp-1.0.3.0.conf
at apply1, called at src\Development\Shake\Internal\Rules\Oracle.hs:159:32 in shake-0.18.5-1d5c1b2bb877d8e32c72e14ace900fa3094a1d1c:Development.Shake.Internal.Rules.Oracle
* Depends on: OracleQ (ContextDataKey (Context {stage = Stage1, package = Package {pkgType = Library, pkgName = "integer-gmp", pkgPath = "libraries/integer-gmp"}, way = v}))
at need, called at src\Hadrian\Oracles\Cabal\Rules.hs:53:9 in main:Hadrian.Oracles.Cabal.Rules
* Depends on: _build/stage1/libraries/integer-gmp/setup-config
at need, called at src\Rules\Register.hs:43:11 in main:Rules.Register
* Depends on: _build/stage1/libraries/integer-gmp/build/include/ghc-gmp.h
at need, called at src\Rules\Gmp.hs:71:13 in main:Rules.Gmp
* Depends on: _build/stage1/gmp/gmp.h
at &%>, called at src\Rules\Gmp.hs:97:9 in main:Rules.Gmp
* Depends on: _build/stage1/gmp/libgmp.a _build/stage1/gmp/gmp.h
at need, called at src\Hadrian\Builder.hs:70:5 in main:Hadrian.Builder
* Depends on: _build/stage1/gmp/gmpbuild/Makefile
at cmd', called at src\Builder.hs:253:21 in main:Builder
at cmd, called at src\Builder.hs:376:8 in main:Builder
* Raised the exception:
Development.Shake.cmd, system command failed
Command line: sh configure --enable-shared=no --with-pic=yes --host=x86_64-unknown-mingw32 --build=x86_64-unknown-mingw32
Current directory: D:\dev\ws\haskell\ghc\_build\stage1\gmp\gmpbuild
Exit code: 127
Stderr and Stdout:
El subsistema de Windows para Linux no tiene distribuciones instaladas.
Para instalar las distribuciones, se puede visitar Microsoft Store:
https://aka.ms/wslstore
- The error translated would be: "Windows subsystem for linux has no installed distributions. To install distrinutions...etcetc"
- running the failed command directly in the msys console works:
atrey@FNTSY MINGW64 /d/dev/ws/haskell/ghc/_build/stage1/gmp/gmpbuild
$ sh configure --enable-shared=no --with-pic=yes --host=x86_64-unknown-mingw32 --build=x86_64-unknown-mingw32
configure: loading site script /mingw64/etc/config.site
checking build system type... x86_64-unknown-mingw32
checking host system type... x86_64-unknown-mingw32
......
config.status: executing libtool commands
configure: summary of build options:
Version: GNU MP 6.1.2
Host type: x86_64-unknown-mingw32
ABI: 64
Install prefix: /mingw64
Compiler: gcc
Static libraries: yes
Shared libraries: no
Steps to reproduce
- execute
hadrian/build.bat -j
in a msys2 console - or hadrian\build.bat -j` in a powershell one
Expected behavior
build succesfully ghc
Environment
- GHC version used: 8.10.1
Optional:
- Operating System: Windows 10 1903
- System Architecture: x86_64