mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-07-04 12:42:05 +02:00
Add Windows WSL build recommendation to temporarily disable Win32 PE support.
This commit is contained in:
@ -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.
|
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.
|
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:
|
Build using:
|
||||||
|
|
||||||
PATH=$(echo "$PATH" | sed -e 's/:\/mnt.*//g') # strip out problematic Windows %PATH% imported var
|
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
|
cd depends
|
||||||
make HOST=x86_64-w64-mingw32
|
make HOST=x86_64-w64-mingw32
|
||||||
cd ..
|
cd ..
|
||||||
./autogen.sh # not required when building from tarball
|
./autogen.sh # not required when building from tarball
|
||||||
CONFIG_SITE=$PWD/depends/x86_64-w64-mingw32/share/config.site ./configure --prefix=/
|
CONFIG_SITE=$PWD/depends/x86_64-w64-mingw32/share/config.site ./configure --prefix=/
|
||||||
make
|
make
|
||||||
|
sudo bash -c "echo 1 > /proc/sys/fs/binfmt_misc/status" # Enable WSL support for Win32 applications.
|
||||||
|
|
||||||
## Depends system
|
## Depends system
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user