doc: Windows WSL build recommendation to temporarily disable Win32 PE support #19408

pull sipsorcery wants to merge 1 commits into bitcoin:master from sipsorcery:wsldoc changing 1 files +7 −0
  1. sipsorcery commented at 12:35 pm on June 29, 2020: member

    This is a solution for the issues described in #17277 and #18348

    When cross compiling Bitcoin Code for Windows the Autoconf configure scripts attempt to execute Win32 PE files. The configure scripts expect the attempt to fail, however, WSL supports forking the execution of Win32 PE files out to the underlying Windows OS. This can result in the executions failing for unanticipated reasons, which is the case in the two referenced issues.

    This PR adds an explanatory note and additional instructions to temporarily disable WLS’s Win32 support.

  2. Add Windows WSL build recommendation to temporarily disable Win32 PE support. 21a65756f5
  3. fanquake added the label Docs on Jun 29, 2020
  4. laanwj commented at 1:11 pm on June 29, 2020: member
    I think this is okay for a temporary workaround, but in time, I think a fix to the build system to not ry to run target executables when cross-compiling would be way preferable. (every manual step added has a potential for human error)
  5. billygarrison commented at 6:47 pm on June 29, 2020: contributor

    I can confirm that this fixed issue #18348 for me.

    Tested using Ubuntu 18.04 and 20.04 on WSL.

  6. sipsorcery commented at 9:36 pm on June 29, 2020: member

    I think this is okay for a temporary workaround, but in time, I think a fix to the build system to not [t]ry to run target executables when cross-compiling would be way preferable.

    I agree but that would most likely mean ditching Autoconf (or at least the configure scripts) for something more modern.

    I only looked at the configure script operation for the bdb dependency but I’d be surprised if the other dependencies weren’t the same. There were numerous configure checks that compiled a small block of code and then checked the result of the execution attempt.

  7. laanwj commented at 3:14 pm on July 1, 2020: member

    There were numerous configure checks that compiled a small block of code and then checked the result of the execution attempt.

    Which is okay! It’s allowed to use the (cross-)compiler for compiling, linking, doing anything with the result. Just not running it. I think only berkeleydb does this, because it uses an ancient autoconf with a weird check. In bdb 4.8 times, cross-compiling was still seen as a rare exceptoin. I would be very surprised if any new software does this.

    Edit: Bleh, seems you’re right. Even current autotools still does this, this is from bitcoind itself not berkeleydb:

    0configure:4130: checking whether we are cross compiling
    1configure:4138: arm-unknown-linux-gnueabihf-g++ -o conftest -pipe -O2  -I/data/src/bitcoin-arm/depends/arm-unknown-linux-gnueabihf/share/../include/ -O2 -g -L/data/src/bitcoin-arm/depends/arm-unknown-linux-gnueabihf/share/../lib -static-libstdc++ conftest.cpp  >&5
    2configure:4142: $? = 0
    3configure:4149: ./conftest
    4./configure: line 4151: ./conftest: cannot execute binary file: Exec format error
    
  8. laanwj commented at 3:24 pm on July 1, 2020: member
    ACK 21a65756f558a2bd50e71c6dfb04143533e59f76
  9. laanwj merged this on Jul 1, 2020
  10. laanwj closed this on Jul 1, 2020

  11. random-zebra referenced this in commit 18a91240f6 on Dec 7, 2020
  12. DrahtBot locked this on Feb 15, 2022

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-12-19 06:12 UTC

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