The new Windows Subsystem for Linux (WSL) allows a user to run a bash shell directly on Windows in an Ubuntu based environment. This can be used to cross-compile Bitcoin directly on Windows without the need for a separate Linux VM or Server. The instructions included in this commit explain how to configure the environment and build Bitcoin Core using this new feature.
Documentation: Building on Windows with WSL #8935
pull pooleja wants to merge 1 commits into bitcoin:master from pooleja:windows_build_docs changing 1 files +35 −4-
pooleja commented at 4:15 AM on October 17, 2016: none
-
7c1716f65d
Documentation for Building on Windows with WSL
The new Windows Subsystem for Linux (WSL) allows a user to run a bash shell directly on Windows in an Ubuntu based environment. This can be used to cross-compile Bitcoin directly on Windows without the need for a separate Linux VM or Server. The instructions included in this commit explain how to configure the environment and build Bitcoin Core using this new feature.
-
achow101 commented at 4:39 AM on October 17, 2016: member
Have you actually been able to build it this way? I have not. I think part of it is because the WSL is based upon Ubuntu 16.04 which has a version of mingw that breaks the cross compilation.
- jonasschnelli added the label Windows on Oct 17, 2016
- jonasschnelli added the label Build system on Oct 17, 2016
-
laanwj commented at 11:29 AM on October 17, 2016: member
Concept ACK, though I too think this should wait on https://github.com/bitcoin/bitcoin/projects/1 to be completed. I strongly recommend against using 16.04 for cross-building windows for now.
- laanwj assigned theuni on Oct 17, 2016
-
pooleja commented at 12:46 PM on October 17, 2016: none
@achow101 I was able to build it and run it on my Windows 10 dev box.
>ver Microsoft Windows [Version 10.0.14393]Also, where do you see that it is based on 16.04?
When I poke around I see 14.x..
$ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 14.04.5 LTS Release: 14.04 Codename: trusty -
achow101 commented at 1:20 PM on October 17, 2016: member
Oh that's interesting. I though I read somewhere that said that it used 16.04. Maybe it was something about a planned upgrade to 16.04.
I will see if I can cross compile on windows again, last time I tried it didn't work.
-
laanwj commented at 1:53 PM on October 17, 2016: member
14.04 is exactly the same version used to build releases at the moment. utACK in that case.
-
achow101 commented at 6:23 PM on October 17, 2016: member
Got it to finally build on my system. Depends was being stupid and didn't like multithreading.
utACK
-
Michagogo commented at 10:32 PM on October 17, 2016: contributor
I don't know much about WSL - what about the option of simply building "Linux" binaries "natively" in WSL, and running Bitcoin Core itself within WSL? And, has anyone by any chance tried running LXC in WSL? It'd be cool if we could get to the point of running Gitian on Windows sans VM...
-
achow101 commented at 10:41 PM on October 17, 2016: member
You should be able to run bitcoind from within the WSL. However it doesn't support GUIs yet so bitcoin-qt will not work.
I just tried running a gitian build from the WSL but it did not work for me. KVM did not work and LXC failed as it normally does.
-
pooleja commented at 10:44 PM on October 17, 2016: none
Also, Microsoft advises against running server based software from within WSL as its purpose is for client cmd line apps.
-
Michagogo commented at 10:44 PM on October 17, 2016: contributor
"As it normally does"?
And yeah, I kinda expected that -- I mean, you can't exactly expect a Linux Kernel-based hypervisor to work in this kind of environment... and I guess LXC probably requires more of the API to be implemented than is currently available.
-
achow101 commented at 10:52 PM on October 17, 2016: member
"As it normally does"?
I can never get gitian LXC to work. I've tried different versions of Ubuntu and Debian but none have worked for me.
- MarcoFalke added the label Docs and Output on Oct 18, 2016
- laanwj merged this on Oct 18, 2016
- laanwj closed this on Oct 18, 2016
- laanwj referenced this in commit 0306978394 on Oct 18, 2016
- codablock referenced this in commit 0d62638332 on Sep 19, 2017
- codablock referenced this in commit 5fc2e197df on Jan 12, 2018
- andvgal referenced this in commit f6b0422be9 on Jan 6, 2019
- MarcoFalke locked this on Sep 8, 2021