diff options
author | Wladimir J. van der Laan <laanwj@protonmail.com> | 2020-07-01 17:23:42 +0200 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@protonmail.com> | 2020-07-01 17:24:41 +0200 |
commit | 85a68952f86dea04c797a7c060f25cc7e626a47e (patch) | |
tree | 88c8f50d551ac419366fdbbb7f491f66c2281722 /doc | |
parent | e1b20e2285909537d086799f78ac6c394ca50d45 (diff) | |
parent | 21a65756f558a2bd50e71c6dfb04143533e59f76 (diff) |
Merge #19408: doc: Windows WSL build recommendation to temporarily disable Win32 PE support
21a65756f558a2bd50e71c6dfb04143533e59f76 Add Windows WSL build recommendation to temporarily disable Win32 PE support. (Aaron Clauson)
Pull request description:
This is a solution for the issues described in #17277 and #18348
When cross compiling Bitcoin Code for Windows the `Autoconf` configure scripts attempt to execute Win32 PE files. The configure scripts expect the attempt to fail, however, WSL supports forking the execution of Win32 PE files out to the underlying Windows OS. This can result in the executions failing for unanticipated reasons, which is the case in the two referenced issues.
This PR adds an explanatory note and additional instructions to temporarily disable WLS's Win32 support.
ACKs for top commit:
laanwj:
ACK 21a65756f558a2bd50e71c6dfb04143533e59f76
Tree-SHA512: afb014be5a63fa9a827aed30acb2faab15feed34ed89c788a7f6ae6ab1b2238f99e075e6e281d0cc581914db3a4ecc3d5a3d26442f11a520e4e457a40e75e533
Diffstat (limited to 'doc')
-rw-r--r-- | doc/build-windows.md | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/doc/build-windows.md b/doc/build-windows.md index d3dc467f19..28b6aceb3c 100644 --- a/doc/build-windows.md +++ b/doc/build-windows.md @@ -91,15 +91,22 @@ Note that for WSL the Bitcoin Core source path MUST be somewhere in the default example /usr/src/bitcoin, AND not under /mnt/d/. If this is not the case the dependency autoconf scripts will fail. This means you cannot use a directory that is located directly on the host Windows file system to perform the build. +Additional WSL Note: WSL support for [launching Win32 applications](https://docs.microsoft.com/en-us/archive/blogs/wsl/windows-and-ubuntu-interoperability#launching-win32-applications-from-within-wsl) +results in `Autoconf` configure scripts being able to execute Windows Portable Executable files. This can cause +unexpected behaviour during the build, such as Win32 error dialogs for missing libraries. The recommended approach +is to temporarily disable WSL support for Win32 applications. + Build using: PATH=$(echo "$PATH" | sed -e 's/:\/mnt.*//g') # strip out problematic Windows %PATH% imported var + sudo bash -c "echo 0 > /proc/sys/fs/binfmt_misc/status" # Disable WSL support for Win32 applications. cd depends make HOST=x86_64-w64-mingw32 cd .. ./autogen.sh # not required when building from tarball CONFIG_SITE=$PWD/depends/x86_64-w64-mingw32/share/config.site ./configure --prefix=/ make + sudo bash -c "echo 1 > /proc/sys/fs/binfmt_misc/status" # Enable WSL support for Win32 applications. ## Depends system |