Skip to content

Commit 21a6575

Browse files
committed
Add Windows WSL build recommendation to temporarily disable Win32 PE support.
1 parent 19612ca commit 21a6575

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

doc/build-windows.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,15 +91,22 @@ Note that for WSL the Bitcoin Core source path MUST be somewhere in the default
9191
example /usr/src/bitcoin, AND not under /mnt/d/. If this is not the case the dependency autoconf scripts will fail.
9292
This means you cannot use a directory that is located directly on the host Windows file system to perform the build.
9393

94+
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)
95+
results in `Autoconf` configure scripts being able to execute Windows Portable Executable files. This can cause
96+
unexpected behaviour during the build, such as Win32 error dialogs for missing libraries. The recommended approach
97+
is to temporarily disable WSL support for Win32 applications.
98+
9499
Build using:
95100

96101
PATH=$(echo "$PATH" | sed -e 's/:\/mnt.*//g') # strip out problematic Windows %PATH% imported var
102+
sudo bash -c "echo 0 > /proc/sys/fs/binfmt_misc/status" # Disable WSL support for Win32 applications.
97103
cd depends
98104
make HOST=x86_64-w64-mingw32
99105
cd ..
100106
./autogen.sh # not required when building from tarball
101107
CONFIG_SITE=$PWD/depends/x86_64-w64-mingw32/share/config.site ./configure --prefix=/
102108
make
109+
sudo bash -c "echo 1 > /proc/sys/fs/binfmt_misc/status" # Enable WSL support for Win32 applications.
103110

104111
## Depends system
105112

0 commit comments

Comments
 (0)