Trying to compile bitcoin v0.16.3 on WSL (Ubuntu Bionic installed on Windows 10). Here are the steps I've done before hitting a compiling error:
sudo apt update sudo apt upgrade sudo apt install build-essential libtool autotools-dev automake pkg-config bsdmainutils curl git sudo apt install g++-mingw-w64-x86-64 sudo update-alternatives --config x86_64-w64-mingw32-g++
At this point the guide says, "Note that for WSL the Bitcoin Core source path MUST be somewhere in the default mount file system, for 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 located directly on the host Windows file system to perform the build."
So instead of installing bitcoin in /home/username/bitcoin like I normally would, this time I put bitcoin in /usr/src/bitcoin which I'm guessing should not make any difference. So here are my next steps:
cd /usr/src sudo git clone https://github.com/bitcoin/bitcoin.git PATH=$(echo "$PATH" | sed -e 's/:/mnt.*//g') cd depends sudo make HOST=x86_64-w64-mingw32
NOW... the compiling stops here with this error message:
cp "bin.v2/libs/thread/build/gcc-mingw-7.3/release/binary-format-pe/link-static/runtime-link-static/target-os-windows/threadapi-win32/threading-multi/libboost_thread_win32-mt-s.a" "stage/lib/libboost_thread_win32-mt-s.a"
...updated 126 targets...
Staging boost...
Performing configuration checks
- 32-bit : no (cached)
- 64-bit : yes (cached)
- arm : no (cached)
- mips1 : no (cached)
- power : no (cached)
- sparc : no (cached)
- x86 : yes (cached)
- symlinks supported : yes (cached)
Component configuration:
- atomic : not building
- chrono : building
- container : not building
- context : not building
- coroutine : not building
- coroutine2 : not building
- date_time : not building
- exception : not building
- fiber : not building
- filesystem : building
- graph : not building
- graph_parallel : not building
- iostreams : not building
- locale : not building
- log : not building
- math : not building
- metaparse : not building
- mpi : not building
- program_options : not building
- python : not building
- random : not building
- regex : not building
- serialization : not building
- signals : not building
- system : building
- test : building
- thread : building
- timer : not building
- type_erasure : not building
- wave : not building
/bin/sh: 2: cp: Invalid argument
...failed updating 1 target...
funcs.mk:242: recipe for target '/usr/src/bitcoin/depends/work/staging/x86_64-w64-mingw32/boost/1_64_0-005ef50df7b/.stamp_staged' failed
make: *** [/usr/src/bitcoin/depends/work/staging/x86_64-w64-mingw32/boost/1_64_0-005ef50df7b/.stamp_staged] Error 1```
EDIT: I forgot to mention this WSL Ubuntu is a new fresh install. I kept having errors trying to compile 0.16.3 so I uninstalled and reinstalled this WSL Ubuntu from MS store.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.1 LTS
Release: 18.04
Codename: bionic