Skip to content

Commit

Permalink
Merge bitcoin-core/secp256k1#1337: ci: Fix error D8037 in cl.exe (a…
Browse files Browse the repository at this point in the history
…ttempt 2)

db29bf2 ci: Remove quirk that runs dummy command after wineserver (Tim Ruffing)
c7db494 ci: Fix error D8037 in `cl.exe` (Hennadii Stepanov)
7dae115 Revert "ci: Move wine prefix to /tmp to avoid error D8037 in cl.exe" (Hennadii Stepanov)

Pull request description:

  Since the mstorsjo/msvc-wine@2146cbf, the `msvc-wine` effectively initializes the WINE prefix when running the `install.sh` script. See [`install.sh`#L143](https://github.com/mstorsjo/msvc-wine/blob/2146cbfaf037e21de56c7157ec40bb6372860f51/install.sh#L143):
  ```sh
      WINEDEBUG=-all wine64 wineboot &>/dev/null
  ```

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

  This PR fixes this issue.

  Also bitcoin-core/secp256k1#1327 has been reverted as apparently it does not work. And bitcoin-core/secp256k1#1320 has been combined into this one.

ACKs for top commit:
  real-or-random:
    ACK db29bf2

Tree-SHA512: 59e61bde0060f67501f93da8b4e193f2bfcda85d849c16bb017e38af7aa9e3b569fe2fd4aa5cdb658c3b2345cc42fad98323e329b519389b2e881ecfd403d147
  • Loading branch information
real-or-random committed Jun 3, 2023
2 parents bf29f8d + db29bf2 commit 60556c9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
3 changes: 1 addition & 2 deletions ci/cirrus.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ case "$WRAPPER_CMD" in
*wine*)
# Make sure to shutdown wineserver whenever we exit.
trap "wineserver -k || true" EXIT INT HUP
# This is apparently only reliable when we run a dummy command such as "hh.exe" afterwards.
wineserver -p && wine hh.exe
wineserver -p
;;
esac

Expand Down
13 changes: 6 additions & 7 deletions ci/linux-debian.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,10 @@ RUN apt-get update && apt-get install --no-install-recommends -y \
git clone https://github.com/mstorsjo/msvc-wine && \
mkdir /opt/msvc && \
python3 msvc-wine/vsdownload.py --accept-license --dest /opt/msvc Microsoft.VisualStudio.Workload.VCTools && \
msvc-wine/install.sh /opt/msvc

# Moving the wine prefix to /tmp avoids error D8037 when invoking cl.exe.
ENV WINEPREFIX=/tmp/wineprefix
# Initialize the wine prefix. Wait until the wineserver process has
# exited before closing the session, to avoid corrupting the wine prefix.
RUN wine64 wineboot --init && \
# Since commit 2146cbfaf037e21de56c7157ec40bb6372860f51, the
# msvc-wine effectively initializes the wine prefix when running
# the install.sh script.
msvc-wine/install.sh /opt/msvc && \
# Wait until the wineserver process has exited before closing the session,
# to avoid corrupting the wine prefix.
while (ps -A | grep wineserver) > /dev/null; do sleep 1; done

0 comments on commit 60556c9

Please sign in to comment.