Docs: Run windows build in a clean path#10889
Docs: Run windows build in a clean path#10889brianmcmichael wants to merge 1 commit intobitcoin:masterfrom
Conversation
|
Thanks! |
|
Just looking from the description seems an alternative take on #10884. |
|
Hmm, can't get this to work... Am I doing something wrong? |
|
Did you install the dependencies first? |
|
Yep, I've done that: https://pastebin.com/JLgPnPMw |
|
@MattyAb I noticed you are compiling on /mnt/d/Documents/bitcoin/depends/. |
|
You are running an old version of the tools. Run the following commands: After that, type You want to see the following: |
|
Actually, my bad, it looks like you're using 1.15, which isn't a default in WSL's You could try typing |
|
@brianmcmichael On latest Windows 10 (Creators Update) WSL by default installs Xenial. If Trusty is really needed then it's better to use something like https://github.com/RoliSoft/WSL-Distribution-Switcher in order to switch to the desired linux distribution. |
|
@onomatopellan Thanks, apparently my CU update left the WSL alone and I'm still on trusty. I'll try to get it updated and see if I can build on xenial. |
|
@brianmcmichael I wrestled with it to try get it to install automake 1.14, it just wasn't playing. I tried the |
|
Also did:
but got:
|
|
@MattyAb I'm updating to Xenial now. I think I have an idea of what's going wrong, but I want to confirm first. Give me a few hours. |
|
@brianmcmichael Awesome, thank you. |
|
Alright, so the existing windows build instructions only really work on It also looks like This will take some untangling to figure out for |
|
Yep, tried that:
|
|
You shouldn't use |
|
It doesn't work with |
|
Definitely don't add sudo before make! It is only required for |
|
At this point the guide should probably be updated to mention that these commands only work on |
|
windows cross-build on xenial has one critical issue still open, #8732 (might be they fixed the compiler for the stack-protector issue since, but I have no reports on that) |
|
For anyone's interest, I tried it on the pure Linux folder instead of my mount, and it worked. Don't know if this was the problem or not, but it's worth a try. |
|
|
||
| cd depends | ||
| make HOST=x86_64-w64-mingw32 | ||
| make HOST=x86_64-w64-mingw32 PATH=$(getconf PATH) |
There was a problem hiding this comment.
Does it also interfere with the other make commands used to build/install bitcoin core itself?
There was a problem hiding this comment.
The make command worked successfully on WSL 14.04 using this command. It could potentially break things if people are relying on dependencies outside of /bin:/usr/bin path, but I didn't experience any issues building with only the required dependencies.
There was a problem hiding this comment.
Yes, but I mean there's another make later in the document. Does that need this addition as well?
There was a problem hiding this comment.
Probably. I wasn't able to test the 32-bit version, so I didn't make the addition here, but I suspect that the command will be plagued by a similar issue.
|
Closing in favor of #11244, which adds PATH override for both 32 and 64 bit. |
Fixes the error described in #10856
In Windows Subsystem for Linux the entire windows path is now part of the $PATH variable and it interferes with the
makecommand.Adding
PATH=$(getconf PATH)to themakecommand runs the process in a clean environment (ex.PATH=/bin:/usr/bin) and allows the build to proceed.I haven't tested whether the Windows 32-bit build is affected by this so I haven't updated that command.