merge bitcoin#19408: Windows WSL build recommendation to temporarily disable Win32 PE support

This commit is contained in:
Kittywhiskers Van Gogh 2020-06-29 13:25:59 +01:00
parent 44d9a2e8d2
commit 0c1f8cc09a

View File

@ -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