Build bitcoin failed on WSL #11685

issue spartucus openend this issue on November 14, 2017
  1. spartucus commented at 4:57 pm on November 14, 2017: none

    How to reproduce

    1. I’m building bitcoin on WSL following build-windows.md step by step.

    2. Everything works fine until make HOST=x86_64-w64-mingw32

    3. It prints errors, looks like something wrong with automake: build-error

    4. I’m trying install automake, but it says automake is already installed, and version is 1.15, not 1.14, don’t know if this is the key. automake

    What version of bitcoin-core are you using?

    commit id: d8ac8932683d9dca2a79a33ae110717ccbd85fa3

    Machine specs:

    • OS: Windows 10 1709 16229.19 X64 WSL
    • CPU: Intel Core i5-6200U
    • RAM: 8G
    • Disk size: 300G
    • Disk Type (HD/SDD): SSD
  2. MarcoFalke added the label Windows on Nov 14, 2017
  3. MarcoFalke added the label Docs and Output on Nov 14, 2017
  4. MarcoFalke added the label Build system on Nov 14, 2017
  5. MarcoFalke commented at 5:58 pm on November 14, 2017: member
    Inviting @mikedennis, @Thoragh and @sipsorcery to this party 🎉
  6. sipsorcery commented at 7:59 pm on November 14, 2017: member

    I’ve seen this issue being reported for a couple of months now and I also experienced it at one point. For me the issue ended up disappearing and I assumed the bitcoin automake scripts had been adjusted but I guess not.

    It might be path related. I always do my builds from /usr/src/bitcoin rather than one of the Windows mounted drives, /mnt/*. I’ll have another crack at tracking it down. In the meantime one possible fix may that’s worked for some people is:

    make HOST=x86_64-w64-mingw32 V=1 AUTOMAKE=:

  7. mikedennis commented at 8:08 pm on November 14, 2017: none
    Double check that you aren’t building from a mnt drive as mentioned by sipsorcery. That automake error is the same one that I got when I was trying to build the depends from a mnt drive. Cloning the source to my home folder instead worked no problem.
  8. fanquake commented at 11:43 pm on November 14, 2017: member
    It definitely seems like we need some explicit path/cloning instructions in the build docs. Or at least a warning about unusual paths, paths with spaces, or where you can’t clone etc.
  9. spartucus commented at 2:01 am on November 15, 2017: none

    @sipsorcery

    In the meantime one possible fix may that’s worked for some people is:

    make HOST=x86_64-w64-mingw32 V=1 AUTOMAKE=:

    OK, I’ll try it.Thanks. @mikedennis

    Double check that you aren’t building from a mnt drive as mentioned by sipsorcery.

    Yes, I’m building from mnt driver. I’ll give it try too. Thanks.

  10. sipsorcery commented at 3:45 am on November 15, 2017: member

    I have been able to reproduce the error by attempting a build on WSL from /mnt/f/Temp. The error I’m getting is coming from the protobuf dependency autoconf step, the configure.log ends up with the following lines:

    AUTOCONF=’${SHELL} /mnt/f/Temp/bitcoin/depends/work/build/x86_64-w64-mingw32/native_protobuf/2.6.1-38b82cbb6fc/missing autoconf’ AUTOHEADER=’${SHELL} /mnt/f/Temp/bitcoin/depends/work/build/x86_64-w64-mingw32/native_protobuf/2.6.1-38b82cbb6fc/missing autoheader’ AUTOMAKE=’${SHELL} /mnt/f/Temp/bitcoin/depends/work/build/x86_64-w64-mingw32/native_protobuf/2.6.1-38b82cbb6fc/missing automake-1.14'

    The fix is to perform the build on a directory that’s not underneath /mnt.

    Because I’m interested I’ll track down where/why the autoconf script is failing but even after that’s done if it requires a fix I can’t see that happening in a hurry. Best just to build in /usr/src or similar.

  11. laanwj commented at 9:32 am on November 15, 2017: member
    Yes, you cannot build the depends from /mnt drives. This is a timestamp issue with windows’ FS emulation, making protobuf’s build system think the configuration files have changed and need to be rebuilt (using automake-1.14) which isn’t possible from the tarball.
  12. meshcollider commented at 9:46 am on November 15, 2017: contributor
    I think a note should just be added to build-windows.md to say that bitcoin.git should be cloned to the home directory or similar and then the following commands should be run from within that directory (I noticed there was no note to be inside bitcoin/ when running cd depends)
  13. spartucus commented at 3:47 pm on November 15, 2017: none
    After I change the source path from /mnt/d/src to /home/dst, make depends succeeded. And built bitcoin on WSL successfully.
  14. MarcoFalke added the label good first issue on Nov 15, 2017
  15. fanquake commented at 3:21 pm on November 17, 2017: member
    Should have been addressed by #11704.
  16. fanquake closed this on Nov 17, 2017

  17. sipsorcery commented at 12:36 pm on November 18, 2017: member

    Not that it’s relevant for this issue anymore but I did track this problem down. As @theuni correctly extrapolated in #10269 the build problem on WSL using /mnt/* is related to timestamps. Specifically the timestamps on the Makefile.in files.

    When make runs it checks that the timestamps on Makefile and Makefile.in are greater than the Makefile.am. With the dependency packages supplied by Bitcoin Core the Makefile.in files are included, Extracting onto a WSL folder under the default mount of / carries across the timestamps correctly. Extracting onto a native Windows file system under /mnt/* does not and the Makefile.am and Makefile.in end up with the same timestamp. This puts make into a tizzy so that it launches the whole Automake build process again and when it can’t find the tools it needs, the first of which is automake, it bails.

    I only bothered to verify this with the first dependency with is native_protobuf.

    • /mnt/f/Temp/bitcoin/depends$ make HOST=x86_64-w64-mingw32
    • The attempt fails as per the OP’s original log
    • touch /mnt/f/Temp/bitcoin/depends/work/build/x86_64-w64-mingw32/native_protobuf/2.6.1-38b82cbb6fc/Makefile.in
    • touch /mnt/f/Temp/bitcoin/depends/work/build/x86_64-w64-mingw32/native_protobuf/2.6.1-38b82cbb6fc/src/Makefile.in
    • make V=1 HOST=x86_64-w64-mingw32 native_protobuf
    • Success

    It would be easy enough to write a script that touches all the Makefile.in files in src/depends but then there could be other problems further down. The recommendation of building under / is still the better option.

  18. mikedennis commented at 4:38 pm on November 18, 2017: none
    @sipsorcery I’m able to build and run bitcoin core on a windows mnt drive. I only run into this automake issue when building depends for cross compilation. So whatever the issue is it must be only related to the toolchain for the depends build (or maybe the cross compilation dependencies).
  19. d34d10cc commented at 7:29 pm on December 11, 2017: none
    Just a small note; I was having the same issue as this post; I resolved it by converting all the files from the folder into unix format line endings via dos2unix. Don’t know if this has been mentioned elsewhere; sorry if it has.
  20. DrahtBot locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-09-29 04:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me