From 0c1f8cc09a3bcd00f4f8d640c6eb9aa29a8a5fdb Mon Sep 17 00:00:00 2001 From: Kittywhiskers Van Gogh <63189531+kittywhiskers@users.noreply.github.com> Date: Mon, 29 Jun 2020 13:25:59 +0100 Subject: [PATCH] merge bitcoin#19408: Windows WSL build recommendation to temporarily disable Win32 PE support --- doc/build-windows.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/doc/build-windows.md b/doc/build-windows.md index 3125eb0de4..2263880e5e 100644 --- a/doc/build-windows.md +++ b/doc/build-windows.md @@ -84,14 +84,21 @@ To build executables for Windows 32-bit, install the following dependencies: sudo apt-get install g++-mingw-w64-i686 mingw-w64-i686-dev +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. + Then build using: + sudo bash -c "echo 0 > /proc/sys/fs/binfmt_misc/status" # Disable WSL support for Win32 applications. cd depends make HOST=i686-w64-mingw32 cd .. ./autogen.sh # not required when building from tarball CONFIG_SITE=$PWD/depends/i686-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