ci: Fix error D8037 in cl.exe (attempt 2) #1337

pull hebasto wants to merge 3 commits into bitcoin-core:master from hebasto:230602-wine changing 2 files +7 −9
  1. hebasto commented at 5:26 pm on June 2, 2023: member

    Since the https://github.com/mstorsjo/msvc-wine/commit/2146cbfaf037e21de56c7157ec40bb6372860f51, the msvc-wine effectively initializes the WINE prefix when running the install.sh script. See install.sh#L143:

    0    WINEDEBUG=-all wine64 wineboot &>/dev/null
    

    Our following wine64 wineboot --init just messes up with the prefix.

    This PR fixes this issue.

    Also #1327 has been reverted as apparently it does not work. And #1320 has been combined into this one.

  2. Revert "ci: Move wine prefix to /tmp to avoid error D8037 in cl.exe"
    This reverts commit 27504d5c941df89bc828067248270179c9dcb04b.
    7dae115861
  3. hebasto cross-referenced this on Jun 2, 2023 from issue ci: Move wine prefix to /tmp to avoid error D8037 in cl.exe by real-or-random
  4. hebasto cross-referenced this on Jun 2, 2023 from issue ci: Remove quirk that runs dummy command after wineserver by real-or-random
  5. real-or-random commented at 9:58 pm on June 2, 2023: contributor

    Given this error message (see https://cirrus-ci.com/task/4836636333178880?logs=test#L7)

    0wineserver: chdir to /tmp/wineprefix: No such file or directory
    

    I assume, the problem is rather that /tmp is not persistent in Docker on Cirrus CI. So the Docker build creates a new wineprefix in /tmp/wineprefix, but it’s not persistent, so when CI runs on docker, the directory is gone already.

    When I run WINEPREFIX=/tmp/wineprefix wineserver -p locally without having created this directory, it fails with the same error message. So maybe a proper solution is to move WINEPREFIX to some other directory than the default ~/wine, but not on /tmp. (Or recreate the wineprefix in every CI run, but that’s slower.)

    To work around the current issue and to prevent similar issues in the future, this PR introduces the CI_MSVC_WINE_COMMIT Docker argument that binds to the known working commit in the mstorsjo/msvc-wine repo.

    I think we should avoid pinning unless it’s really really necessary. We want to get MSVC updates.

  6. hebasto commented at 9:59 pm on June 2, 2023: member

    @real-or-random

    I’ll post a real fix in a second :)

  7. hebasto force-pushed on Jun 2, 2023
  8. hebasto renamed this:
    ci: Rework `msvc-wine` stuff
    ci: Fix error D8037 in `cl.exe` (attempt 2)
    on Jun 2, 2023
  9. real-or-random commented at 10:07 pm on June 2, 2023: contributor
    Can you try moving WINEPREFIX to /var/lib/wine for example?
  10. hebasto commented at 10:07 pm on June 2, 2023: member

    Reworked.

    I think we should avoid pinning unless it’s really really necessary. We want to get MSVC updates.

    Done.

  11. real-or-random commented at 10:08 pm on June 2, 2023: contributor

    Reworked.

    Ok, let’s see if this does the job. :)

  12. in ci/linux-debian.Dockerfile:38 in 1efb926097 outdated
    39+# msvc-wine effectively initializes the wine prefix when running
    40+# the install.sh script. Wait until the wineserver process has
    41 # exited before closing the session, to avoid corrupting the wine prefix.
    42-RUN wine64 wineboot --init && \
    43+RUN msvc-wine/install.sh /opt/msvc && \
    44     while (ps -A | grep wineserver) > /dev/null; do sleep 1; done
    


    real-or-random commented at 10:13 pm on June 2, 2023:

    Nit: maybe this should be merged with the RUN command above.

    (but let’s first see if it works at all :) nice catch!)

    edit: This is my suggestion

    0    mkdir /opt/msvc && \
    1    python3 msvc-wine/vsdownload.py --accept-license --dest /opt/msvc Microsoft.VisualStudio.Workload.VCTools && \
    2# Since commit 2146cbfaf037e21de56c7157ec40bb6372860f51, the
    3# msvc-wine effectively initializes the wine prefix when running
    4# the install.sh script.
    5    msvc-wine/install.sh /opt/msvc && \
    6# Wait until the wineserver process has exited before closing the session,
    7# to avoid corrupting the wine prefix.
    8    while (ps -A | grep wineserver) > /dev/null; do sleep 1; done
    

    hebasto commented at 8:10 am on June 3, 2023:

    edit: This is my suggestion

    Thanks! Updated.

  13. real-or-random commented at 8:03 am on June 3, 2023: contributor
    Concept ACK
  14. ci: Fix error D8037 in `cl.exe` c7db4942b3
  15. ci: Remove quirk that runs dummy command after wineserver
    The underlying issue is now worked around in upstream, see
    https://github.com/mstorsjo/msvc-wine/issues/47 for details.
    db29bf220c
  16. hebasto force-pushed on Jun 3, 2023
  17. hebasto commented at 8:09 am on June 3, 2023: member
  18. real-or-random approved
  19. real-or-random commented at 11:44 am on June 3, 2023: contributor
    ACK db29bf220c73bc71b9d48c262ba2e88c1e741f92
  20. real-or-random merged this on Jun 3, 2023
  21. real-or-random closed this on Jun 3, 2023

  22. hebasto deleted the branch on Jun 3, 2023
  23. vmta referenced this in commit e1120c94a1 on Jun 4, 2023
  24. sipa referenced this in commit 901336eee7 on Jun 21, 2023
  25. vmta referenced this in commit 8f03457eed on Jul 1, 2023
  26. hebasto referenced this in commit 270d2b37b8 on Jul 21, 2023

github-metadata-mirror

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

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