Here is the entire process on Ubuntu 16.04 LTS.
Usually, on all of my previous attempts, the first make has failed. This time I did enable update during install which I have not done previously. Why this should make any difference when we run sudo apt update
and sudo apt upgrade
is a mystery and I do not think it changed anything.
Note that usually make HOST=x86_64-w64-mingw32
fails early.
I followed all steps in /doc/build-windows.md
, but contancenate the apt install commands.
I do not believe that sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu zesty universe"
does what is expected on its own and this may be the source of an issue since the whole purpose of enabling this repo is to get the zesty version of Mingw-w64
due to a bug. The following sudo apt update
command responds with errors about the repo not having a release file and, separately sudo apt upgrade
is not always successful. I have observed elsewhere that repo mirrors are not always in perfect sync and suspect the same here.
Then, sudo update-alternatives --config x86_64-w64-mingw32-g++
usually fails with a ’no alternatives’ response but not this time, so I selected POSIX as instructed. I did previously run sudo apt update
several times after sudo apt upgrade
failed before running it again. I suspect this failure is why the first make command fails and probably means previous steps need to be revisited.
There seems to possibly be some intermittent repo issues.
Also note, this time I checked out the v0.16.0rc4 tag into a new branch rather than just building on top of master. I do not know what else this changed. Apparently there have been some more recent dependancy change that were breaking make. See Issue #12515
The first obvious issue during the process is that the previous update-alternatives ...
command usually fails, and preceding that, the issue with sudo apt update
.
>sudo apt install build-essential libtool autotools-dev automake pkg-config bsdmainutils curl git g++-mingw-w64-x86-64 software-properties-common
>sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu zesty universe"
>sudo apt update #this posts errors in response
>sudo apt upgrade #this failed
>sudo apt update #this posts errors in response
>sudo apt update #this posts errors in response
>sudo apt upgrade #succeeded this time
>sudo update-alternatives --config x86_64-w64-mingw32-g++ #this usually fails with no alternate
>cd /usr/src
>sudo git clone https://github.com/bitcoin/bitcoin.git
>sudo chmod -R a+rw bitcoin
>git checkout v0.16.0rc4 -b v16rc4
>PATH=$(echo "$PATH" | sed -e 's/:\ mnt.*//g')
>cd depends
>make HOST=x86_64-w64-mingw32 #this usually fails early
>cd ..
>./autogen.sh
>CONFIG_SITE=$PWD/depends/x86_64-w64-mingw32/share/config.site ./configure --prefix=/
>make
The compiled executable using this procedure operated correctly on Windows 10 64-bit with limited testing. (without crashing as indicated in the mingw bug footnote in build-windows.md
) Minor nit that the default proxy port on the compiled version v0.16.0rc4 has %2
for the value in the gui.
This process needs to be debugged for reliable operation and the documents updated.
I will post an update with further results but expect, if eventually successful, the compiled Windows executables will fail due to the bug and the repo not taking (nope, all three main executables worked on 64-bit Windows 10 without crashing..):
a bug in the 64 bit Mingw-w64 cross compiler packaged for WSL/Ubuntu Xenial 16.04 that causes two of the bitcoin executables to crash shortly after start up.
I was going to post the entire console output for debugging but the scrollback isn’t long enough and I lost everything early after running the first make command.