bitcoin: libwinpthread-1.dll not found during depends build (bdb) on Windows Subsystem for Linux
Expected behavior I should be able to make the depends without an error.
Actual behavior
The program extracts BDB, preprocesses BDB, and configures BDB (I think), then goes into a long list of “checking” lines (e.g. checking for fopen... yes
).
The output shows checking for clock_gettime monotonic clock...
then the error message below pops up (The code execution cannot proceed because libwinpthread-1.dll was not found. Reinstalling the program may fix this problem.
)
I click okay and it outputs no
for checking for clock_gettime monotonic clock...
. The program continues running the checks and seems to finish building the depends normally. I can then do the following:
cd ..
./autogen.sh
CONFIG_SITE=$PWD/depends/x86_64-w64-mingw32/share/config.site ./configure --prefix=/
make
And it builds without error.
To reproduce I get the error every time I run it on my system.
- Clone repository to WSL
/home/billy/bitcoin
- Follow steps at https://github.com/bitcoin/bitcoin/blob/master/doc/build-windows.md “Cross-compilation for Ubuntu and Windows Subsystem for Linux” and “Building for 64-bit Windows” up to and including
make HOST=x86_64-w64-mingw32
- Let it run until the error message (screenshot above) pops up
System information
- Bitcoin Core master, built using instructions at https://github.com/bitcoin/bitcoin/blob/master/doc/build-windows.md
- Windows 10 version 10.0.18363.719
- Ubuntu 18.04 WSL (fresh install from Microsoft Store). I also tried on a different WSL that I upgraded from Ubuntu 16.04 to 18.04
- Intel i7 processor
Other information Similar issue here: https://github.com/bitcoin/bitcoin/issues/17277
Here’s a copy of the full output from making the depends: https://gist.githubusercontent.com/billygarrison/c548ea99d3b498065c3dc1438d1561c7/raw/64359504e6bf5639396c9aa2313e73a1b0dd2ce8/out.log
And here’s a subset of that with showing just the bdb output (line 283 is where it hangs until I click OK on the error popup): https://gist.github.com/billygarrison/ebaad2b2f93c8e89281e7a1d2ce9d88b
EDIT: Removed mention of make check
test failing as it is not supported in WSL.
EDIT 2: This issue only occurs if I use make HOST=x86_64-w64-mingw32
, if I use it with sudo make HOST=x86_64-w64-mingw32
then it builds fine, and the output includes checking for clock_gettime monotonic clock... yes
instead of no
.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 24 (24 by maintainers)
Commits related to this issue
- Merge #19408: doc: Windows WSL build recommendation to temporarily disable Win32 PE support 21a65756f558a2bd50e71c6dfb04143533e59f76 Add Windows WSL build recommendation to temporarily disable Win32 ... — committed to bitcoin/bitcoin by laanwj 4 years ago
- Merge #2032: doc: Windows WSL build recommendation to temporarily disable Win32 PE support 51391430d967a976c24df43a10a0d316f8c75377 Add Windows WSL build recommendation to temporarily disable Win32 P... — committed to PIVX-Project/PIVX by random-zebra 4 years ago
Thanks for looking into this @brakmic - yes, I did do that step as well as the rest in build-windows.md
I’m also using Linux DESKTOP-LLRVDLC 4.4.0-18362-Microsoft #476-Microsoft Fri Nov 01 16:53:00 PST 2019 x86_64 x86_64 x86_64 GNU/Linux, a fresh install of that as well as a fresh clone of the bitcoin repo.
I’ve run other installations through a different WSL install on this machine. I wonder if some kind of system setting or config was changed in the process that is somehow also accessed by my new WSL