Skip to content

Commit

Permalink
cmake, doc: Update build-windows-mingw.md
Browse files Browse the repository at this point in the history
  • Loading branch information
hebasto committed Jun 17, 2024
1 parent 8975005 commit 939434d
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions doc/build-windows-mingw.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ First, install the general dependencies:

sudo apt update
sudo apt upgrade
sudo apt install build-essential libtool autotools-dev automake pkg-config bsdmainutils curl git
sudo apt install build-essential cmake libtool autotools-dev automake pkg-config bsdmainutils curl git

A host toolchain (`build-essential`) is necessary because some dependency
packages need to build host utilities that are used in the build process.
Expand Down Expand Up @@ -60,7 +60,7 @@ example /usr/src/bitcoin, AND not under /mnt/d/. If this is not the case the dep
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://learn.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
results in 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.

Expand All @@ -71,9 +71,8 @@ Build using:
cd depends
make HOST=x86_64-w64-mingw32
cd ..
./autogen.sh
CONFIG_SITE=$PWD/depends/x86_64-w64-mingw32/share/config.site ./configure --prefix=/
make # use "-j N" for N parallel jobs
cmake -B build --toolchain depends/x86_64-w64-mingw32/toolchain.cmake
cmake --build build # use "-j N" for N parallel jobs
sudo bash -c "echo 1 > /proc/sys/fs/binfmt_misc/status" # Enable WSL support for Win32 applications.

## Depends system
Expand All @@ -88,8 +87,8 @@ executables to a directory on the Windows drive in the same directory structure
as they appear in the release `.zip` archive. This can be done in the following
way. This will install to `c:\workspace\bitcoin`, for example:

make install DESTDIR=/mnt/c/workspace/bitcoin
cmake --install build --prefix /mnt/c/workspace/bitcoin

You can also create an installer using:

make deploy
cmake --build build --target deploy

0 comments on commit 939434d

Please sign in to comment.