Expected behavior Making the Bitcoin depends on Windows Subsystem for Linux (Ubuntu 18.04) should complete without error.
Actual behavior I’m getting prompted with a conftest.exe application error (see below for screenshot) during the make of the depends. This blocks further progress of make until I click the prompt. It doesn’t seem to impact the ultimate build result, but it wastes time, blocking the remaining process while waiting for user input. I assume WSL is incorrectly trying to run this executable in Windows. The error occurs during the “checking for clock_gettime monotonic clock…” step, or shortly thereafter. I verified that no extraneous paths have been added to my $PATH variable.
To reproduce 1.) In Windows, open bash prompt of Windows Subsystem for Linux (Ubuntu 18.04). 2.) Install the required packages to build Bitcoin, set the default mingw32 g++ compiler option to posix, etc. (In other words, do all the standard preparation steps for compiling Bitcoin on Windows.) 3..) Run the following:
0PATH=$(echo "$PATH" | sed -e 's/:\/mnt.*//g')
1//this strips out problematic Windows %PATH% imported var (see doc/build-windows.md)
2
3git clone https://github.com/bitcoin/bitcoin.git
4cd bitcoin/depends
5make HOST=x86_64-w64-mingw32
4.) Now wait until it gets to “checking for clock_gettime monotonic clock…”, and then you will get the following application error prompt: