... | ... | @@ -59,7 +59,7 @@ To start a MinGW shell, run `stack exec --no-ghc-package-path mintty` from Comma |
|
|
|
|
|
### Method C: Hadrian Build Via Stack
|
|
|
|
|
|
"GHC supports **two build systems**: Hadrian (recommended) and Make." And this method is dedicated to `Hadrian` build. Below script navigates you directly to Step 5, which means after running the script, it is ready to run hadrian build, `hadrian/build-stack.bat --flavour=quickest -j`. If you'd like to learn more about `hadrian`, here is [hadrian's wiki page](https://gitlab.haskell.org/ghc/ghc/-/wikis/building/hadrian). If you encountered any problem, join the discussion of #21695.
|
|
|
GHC's build system is Hadrian. The script below navigates you directly to Step 5, which means after running the script, it is ready to run hadrian build, `hadrian/build-stack.bat --flavour=quickest -j`. If you'd like to learn more about `hadrian`, here is [hadrian's wiki page](https://gitlab.haskell.org/ghc/ghc/-/wikis/building/hadrian). If you encountered any problem, join the discussion of #21695.
|
|
|
|
|
|
```
|
|
|
cd c:\project
|
... | ... | @@ -185,7 +185,7 @@ then try re-running the `pacman` command with the `--force` option (see [MSYS2 b |
|
|
### Sphinx missing the requests package as dependency
|
|
|
|
|
|
|
|
|
If you encounter an error while running make with Haddock enabled:
|
|
|
If you encounter an error while running Hadrian with Haddock enabled:
|
|
|
|
|
|
```wiki
|
|
|
pkg_resources.DistributionNotFound: The 'requests' distribution was not found and is required by Sphinx
|
... | ... | @@ -230,7 +230,7 @@ cabal install -j --prefix=/usr/local alex happy |
|
|
### Build problems
|
|
|
|
|
|
|
|
|
MSYS2 is known to be glitchy in some situations. If you see errors related to `fork()`, try closing and reopening the shell; see also [msys2 issue \#74](http://sourceforge.net/p/msys2/tickets/74/). Also there have been issues with the build process segfaulting. The reason is not known (we're looking into it). If that happens, simply rerunning `make` will continue the build process.
|
|
|
MSYS2 is known to be glitchy in some situations. If you see errors related to `fork()`, try closing and reopening the shell; see also [msys2 issue \#74](http://sourceforge.net/p/msys2/tickets/74/). Also there have been issues with the build process segfaulting. The reason is not known (we're looking into it). If that happens, simply rerunning `hadrian` will continue the build process.
|
|
|
|
|
|
|
|
|
Alternatively, to run a pristine build and tests (takes a while):
|
... | ... | @@ -239,14 +239,9 @@ Alternatively, to run a pristine build and tests (takes a while): |
|
|
./validate
|
|
|
```
|
|
|
|
|
|
**NOTE**: You may see an error like `make 7628 child_info_fork::abort: ... make: fork: Resource temporarily unavailable` when running `make`. To fix this, go to the root of your MSYS dir and run `autorebase.bat`; see [http://sourceforge.net/projects/mingw/files/MSYS/Extension/rebase/rebase-4.0.1_1-1/](http://sourceforge.net/projects/mingw/files/MSYS/Extension/rebase/rebase-4.0.1_1-1/) and again [ http://sourceforge.net/p/msys2/tickets/74/](http://sourceforge.net/p/msys2/tickets/74/). Alternatively, run `shutdown //r`.
|
|
|
**NOTE**: You may see an error like `make 7628 child_info_fork::abort: ... make: fork: Resource temporarily unavailable`. To fix this, go to the root of your MSYS dir and run `autorebase.bat`; see [http://sourceforge.net/projects/mingw/files/MSYS/Extension/rebase/rebase-4.0.1_1-1/](http://sourceforge.net/projects/mingw/files/MSYS/Extension/rebase/rebase-4.0.1_1-1/) and again [ http://sourceforge.net/p/msys2/tickets/74/](http://sourceforge.net/p/msys2/tickets/74/). Alternatively, run `shutdown //r`.
|
|
|
|
|
|
**NOTE**: If the build seems super slow (takes more than 1 hour to complete), check your virus scanner and whitelist C:/msys64.
|
|
|
|
|
|
### Segmentation fault when using parallel make
|
|
|
|
|
|
|
|
|
Running parallel make (e.g., `make -j5`) is faster, but appears to cause segfaults during the build sometimes. The reasons are not clear yet.
|
|
|
**NOTE**: If the build seems super slow (takes more than 1 hour to complete), check your virus scanner and whitelist C:/msys64. You might also want to turn off Windows defender real-time protection, as it can significantly slow down compilation of GHC.
|
|
|
|
|
|
## Other documentation
|
|
|
|
... | ... | |