-
Notifications
You must be signed in to change notification settings - Fork 38.7k
Updated Windows build doc for WSL/Xenial workaround #11438
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
doc/build-windows.md
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use footnotes ([^1]) rather than * because * is used for formatting. (Same in other places).
doc/build-windows.md
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
stesp -> steps
doc/build-windows.md
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Colon after [^1] :)
doc/build-windows.md
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sudo
doc/build-windows.md
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The trailing whitespace failure is the end of this line I think. Sorry for so many little reviews :) Remember to squash all your commits at the end
831ec47 to
5e31c53
Compare
|
Concept ACK. thank you, this will save me so much time! Trying this. |
|
There's a misspelled word: |
|
@molxyz have you got the latest version? That typo was fixed. |
|
@sipsorcery Ah yes.. sorry I forgot to refresh the page, got it now. This is great, thank you. |
|
Still another problem on my WSL, probably unrelated though. I think I give up with WSL, keeping my docker :/ |
|
@NicolasDorier I did see that error once or twice and I believe it was around the same time as I was getting the error about the std::mutex header missing. I haven't seen it for a while though and I'd estimate I've re-installed and built bitcoin on WSL at least half a dozen times in the last week. My suggestion would be to either completely uninstall WSL using lxrun /uninstall /full and then reinstall or at the very least clean the dependencies, including boost, from your bitcoin source tree with git clean -x -f -d. |
doc/build-windows.md
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should mention early that 16.04 produces incorrect code, so that people don't get started with it and come to the conclusion later that it's broken.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no bad code, provided the mingw32 x-compiler on wsl/xenial is updated as per the instructions in the doc.
maflcko
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Concept ACK. Some feedback and a nit.
doc/build-windows.md
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should probably mention that building on WSL currently is by following the building on Xenial notes. (not the other way round)
doc/build-windows.md
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this is true, given that there are two different sections. One for trusty, one for zesty.
doc/build-windows.md
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you can write "17.04 or later", since 17.10 seems to work as well with the same steps.
doc/build-windows.md
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might want to remove WSL here, since it will no longer be true when the user runs a different ubuntu version than xenial in their WSL.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't it be better to leave it there and update the doc when WSL gets updated? I suspect the majority of devs reading this doc will be looking for WSL instructions.
doc/build-windows.md
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
µnit: This installation step is the same for all three version. Might as well mention it only once, mention that no further steps are needed on trusty and that other versions require some workarounds: ...
doc/build-windows.md
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe ot: For some reason GitHub doesn't insert links to the footnotes for me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like that footnote is not supported on github. According to a comment on this SO answer that format is used on GitLab. I'll use the alternative suggestion of anchor links.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great. I have tested on my WSL Ubuntu Xenial 16.04 several times and it works, but I have a question regarding this part:
sudo update-alternatives --config x86_64-w64-mingw32-g++
There are 2 choices for the alternative x86_64-w64-mingw32-g++ (providing /usr/bin/x86_64-w64-mingw32-g++).
Selection Path Priority Status
0 /usr/bin/x86_64-w64-mingw32-g++-win32 60 auto mode
1 /usr/bin/x86_64-w64-mingw32-g++-posix 30 manual mode
2 /usr/bin/x86_64-w64-mingw32-g++-win32 60 manual mode
The only choice is "1" to get bitcoin compiled successfully, the other choices cause errors in "make". Is there a reason to leave 3 choices? Sorry, I'm still new to this and the choices made me confused at first until I tried them all.
Thank you for doing this, I'm thrilled to be able to compile bitcoin on WSL again! :D
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that "0" is the default and the options are 1 (posix) and 2 (win32).
doc/build-windows.md
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
µnit: Can remove the "g++-mingw-w64-x86-64 mingw-w64-x86-64-dev"
doc/build-windows.md
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
µnit: Can remove this line.
|
Please squash your commits according to https://github.com/bitcoin/bitcoin/blob/master/CONTRIBUTING.md#squashing-commits |
15ed58f to
775783a
Compare
|
Needs rebase for #11437. |
|
#11437 is largely mutually exclusive to this update. It steers devs away from using WSL or Ubuntu 16 due to the non-standard build steps required. This pull request provides those non-standard build steps. |
|
I made a fresh ubuntu WSL 16.04, was unable to install boost, I tried all sort of incantation without success... Not sure if related with this PR, but the instructions did not seem enough. |
|
@NicolasDorier what type of VM, Ubuntu 16 version and platform (x86 or x64)? I have run the install steps using the latest source form the bitcoin git repo on VMWare Workstation with Ubuntu 16.04.3 Server x64 without any problems and resulting in working Windows executables. I'm happy to check other permutations if you let me know what your configuration is. |
|
This is x64. Problems are on boost... I can't seems to be able to fetch boost for some reason. |
|
Needs rebase on current master to solve merge conflicts. |
|
@MarcoFalke merge conflict is from #11437 which is largely mutually exclusive to this update. It's a question of whether to steers devs away from building on WSL/ Ubuntu 16 using non-standard build steps required or only recommend Ubuntu 14 & 17 as per #11437. |
|
@sipsorcery Agree. Though, we can not merge your pull if there are merge conflicts (even if only minor). I don't have WSL, so I can't help with testing and recommendations. How you solve the merge conflict is pretty much up to you. It doesn't matter if you use |
afadea2 to
e0fc4a7
Compare
|
@MarcoFalke no worries, I've removed the conflict by pushing my change to the build-windows.md file on top of trunk. |
|
The python tests don't need boost? |
|
They don't but I need to compile bitcoind as a linux binary, which need boost. |
|
@NicolasDorier Using the depends build will do all that. |
|
On a related note the Windows 10 Fall Creators Update gets released tomorrow (17 Oct 2017) and contains a major update to WSL. The main update is that WSL will now be deployed as a Windows Store App and users will need to choose from different Linux distros; currently Ubuntu (Xenial), openSUSE and SUSE Linux Enterprise Server. Update: I've verified that the Windows bitcoin build on the Fall Creators Update & Ubuntu Windows Store App works successfully. The Ubuntu version hasn't changed from 16.04.3. |
|
my understanding was that will just install the deps for making a windows binary. I was unaware it was also adding the libboost dependencies for linux build. Trying that now. |
|
|
|
Trying. Maybe this is something to add as exception of Xenial in the doc, since installing package with apt-get is not available? |
|
Ok now So I think I will provide an easy to build image on docker hub based on trusty and document it. Would, requires Hyper-V for windows (windows 10 Enterprise edition) though. |
|
@NicolasDorier the automake error seems to be generated in the protobuf dependency build. The same error was mentioned in #10269. I'm guessing it's triggered when the apt packages line up in a certain way. The suggested workaround, which also worked for me in the past, is:
Edit: Also #11282. |
Ha might be because too long path... I don't know. :( I think this PR is definitively a way to the right direction, I hope other people can try it, my environment appear to be seriously fucked up. |
|
tested ACK |
|
@rebroad Thanks for testing |
7383d77 Updated instructions for Windows 10 Fall Creators Update. (Aaron Clauson) e0fc4a7 Updated Windows build doc for WSL/Xenial workarounds. (Aaron Clauson) Pull request description: An update to the Windows build document that provides workarounds for the broken 64 bit mingw32 cross compiler on WSL/Xenial. This update is an alternative to pull request #11437. While that pull request takes a valid approach by stating building on WSL should be avoided I think it is more useful to give Windows developers a workaround option. The instructions have been tested on: - Ubuntu 14.04 and 64 bit mingw32 tool chain - Ubuntu 16.04 and 64 bit mingw32 tool chain - Ubuntu 17.04 and 64 bit mingw32 tool chain - Windows Subsystem for Linux (Windows 10 OS Build 15063.608) and 32 bit mingw32 tool chain - Windows Subsystem for Linux (Windows 10 OS Build 15063.608) and 64 bit mingw32 tool chain Related items: - Serious incompatibility problems w/ newer mingw-64 on Ubuntu #8653 - `-fstack-protector-all` triggers crashes in mingw-w64 5.3.1 #8732 - Windows build appears broken on WSL (buntu okay) #10269 - Compilation error for windows target #11437 Tree-SHA512: 7c937e37ed7120ae5dcf61aba50e5228a7ed6f729647c724b8f48e7cbbd81366c1a83a818618766a8fe0418425e05ba2eba2b14f2616621c58606585444f45fc
|
@NicolasDorier I had the same issue, what ended up working was the following: also I have found that downloading the repo natively from inside WSL was less likely to break things in the build than downloading it in Windows and then working on it from WSL |
|
Post-merge tested ACK on clean install of 64-bit Win10 Home 1709 build 16299.64 |
|
@JosephKY ha yes. There are some git config magic to do so git on Windows does not convert LF to CRLF on checkout. And that it convert CRLF to LF on check-in. I did that long time ago, now it works fine. It was only |
originally found in bitcoin/bitcoin#11438 and adopted for Merit Core
An update to the Windows build document that provides workarounds for the broken 64 bit mingw32 cross compiler on WSL/Xenial.
This update is an alternative to pull request #11437. While that pull request takes a valid approach by stating building on WSL should be avoided I think it is more useful to give Windows developers a workaround option.
The instructions have been tested on:
Related items:
-fstack-protector-alltriggers crashes in mingw-w64 5.3.1-fstack-protector-alltriggers crashes in mingw-w64 5.3.1 #8732