Skip to content

Commit

Permalink
windows-gnu: Use latest stable wine
Browse files Browse the repository at this point in the history
Fixed with winehq-stable (9.0.0):

```
0009:err:module:import_dll Library bcryptprimitives.dll (which is needed by L"Z:\\tmp\\test-gcc\\rust\\target\\i686-pc-windows-gnu\\debug\\rust-test.exe") not found
0009:err:module:LdrInitializeThunk Importing dlls for L"Z:\\tmp\\test-gcc\\rust\\target\\i686-pc-windows-gnu\\debug\\rust-test.exe" failed, status c0000135
```
  • Loading branch information
taiki-e committed Mar 2, 2024
1 parent fb08bd1 commit 362aa1d
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 15 deletions.
2 changes: 2 additions & 0 deletions .github/.cspell/project-dictionary.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ Icelake
INLINES
isnan
isystem
keyrings
keyserver
lclang
LDFLAGS
Expand Down Expand Up @@ -134,6 +135,7 @@ virt
wasmtime
wchar
WINEBOOT
winehq
WINEPATH
WINEPREFIX
wineserver
Expand Down
20 changes: 13 additions & 7 deletions docker/test/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -259,21 +259,25 @@ case "${RUST_TARGET}" in
# /usr/src/lib/libm/src/s_fmin.c:35: undefined reference to `__isnan'
sparc64-unknown-openbsd) no_build_test=1 ;;
esac
# Whether or not to run the test.
no_run_test=""
case "${RUST_TARGET}" in
# TODO(powerpc-unknown-linux-gnuspe): run-pass, but test-run-fail: process didn't exit successfully: `qemu-ppc /tmp/test-gcc/rust/target/powerpc-unknown-linux-gnuspe/debug/deps/rust_test-14b6784dbe26b668` (signal: 4, SIGILL: illegal instruction)
powerpc-unknown-linux-gnuspe) no_run_test=1 ;;
esac
# Whether or not to run the compiled binaries.
no_run="1"
case "${RUST_TARGET}" in
# TODO(riscv32gc-unknown-linux-gnu): libstd's io-related feature on riscv32 linux is broken: https://github.com/rust-lang/rust/issues/88995
# TODO(x86_64-unknown-linux-gnux32): Invalid ELF image for this architecture
riscv32gc-unknown-linux-gnu | x86_64-unknown-linux-gnux32) ;;
# TODO(windows-gnu): https://github.com/rust-lang/rust/pull/121317
# wine: Call from 00006FFFFFC4FCF8 to unimplemented function KERNEL32.dll.WaitOnAddress, aborting
# wine: Call from 00006FFFFFC4FCF8 to unimplemented function KERNEL32.dll.WakeByAddressSingle, aborting
x86_64-pc-windows-gnu) ;;
# TODO(redox):
*-unknown-linux-* | *-android* | *-wasi* | *-emscripten* | *-windows-gnu*) no_run="" ;;
esac
# Whether or not to run the test.
no_run_test=""
case "${RUST_TARGET}" in
# TODO(powerpc-unknown-linux-gnuspe): run-pass, but test-run-fail: process didn't exit successfully: `qemu-ppc /tmp/test-gcc/rust/target/powerpc-unknown-linux-gnuspe/debug/deps/rust_test-14b6784dbe26b668` (signal: 4, SIGILL: illegal instruction)
powerpc-unknown-linux-gnuspe) no_run_test=1 ;;
esac

build_mode=debug
build_std=()
Expand Down Expand Up @@ -1077,7 +1081,9 @@ case "${RUST_TARGET}" in
assert_file_info 'for MS Windows' "${bin}"
else
case "${RUST_TARGET}" in
aarch64-*) assert_file_info 'data' "${bin}" ;; # TODO: ?
# TODO: on ubuntu 22.04+
# aarch64-*) assert_file_info 'Aarch64 COFF object file' "${bin}" ;;
aarch64-*) assert_file_info 'data' "${bin}" ;;
i686-*) assert_file_info 'Intel 80386 COFF object file' "${bin}" ;;
x86_64*) assert_file_info 'Intel amd64 COFF object file' "${bin}" ;;
*) bail "unrecognized target '${RUST_TARGET}'" ;;
Expand Down
16 changes: 12 additions & 4 deletions docker/windows-gnu.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,19 @@ case "${dpkg_arch##*-}" in
;;
*) echo >&2 "unsupported architecture '${dpkg_arch}'" && exit 1 ;;
esac
# See https://wiki.winehq.org/Ubuntu when install the latest wine.
# Install the latest wine: https://wiki.winehq.org/Ubuntu
codename=$(grep '^VERSION_CODENAME=' /etc/os-release | sed 's/^VERSION_CODENAME=//')
mkdir -pm755 /etc/apt/keyrings
curl --proto '=https' --tlsv1.2 -fsSL --retry 10 --retry-connrefused https://dl.winehq.org/wine-builds/winehq.key \
| tee /etc/apt/keyrings/winehq-archive.key >/dev/null
curl --proto '=https' --tlsv1.2 -fsSLR --retry 10 --retry-connrefused "https://dl.winehq.org/wine-builds/ubuntu/dists/${codename}/winehq-${codename}.sources" \
| tee "/etc/apt/sources.list.d/winehq-${codename}.sources" >/dev/null
apt-get -o Acquire::Retries=10 -qq update && apt-get -o Acquire::Retries=10 -o Dpkg::Use-Pty=0 install -y --no-install-recommends \
wine-stable \
wine32 \
wine64
winehq-stable \
# apt-get -o Acquire::Retries=10 -qq update && apt-get -o Acquire::Retries=10 -o Dpkg::Use-Pty=0 install -y --no-install-recommends \
# wine-stable \
# wine32 \
# wine64
wine --version
EOF
ARG RUST_TARGET
Expand Down
16 changes: 12 additions & 4 deletions docker/windows-gnullvm.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,19 @@ esac
case "${RUST_TARGET}" in
aarch64* | arm64*) ;;
*)
# See https://wiki.winehq.org/Ubuntu when install the latest wine.
# Install the latest wine: https://wiki.winehq.org/Ubuntu
codename=$(grep '^VERSION_CODENAME=' /etc/os-release | sed 's/^VERSION_CODENAME=//')
mkdir -pm755 /etc/apt/keyrings
curl --proto '=https' --tlsv1.2 -fsSL --retry 10 --retry-connrefused https://dl.winehq.org/wine-builds/winehq.key \
| tee /etc/apt/keyrings/winehq-archive.key >/dev/null
curl --proto '=https' --tlsv1.2 -fsSLR --retry 10 --retry-connrefused "https://dl.winehq.org/wine-builds/ubuntu/dists/${codename}/winehq-${codename}.sources" \
| tee "/etc/apt/sources.list.d/winehq-${codename}.sources" >/dev/null
apt-get -o Acquire::Retries=10 -qq update && apt-get -o Acquire::Retries=10 -o Dpkg::Use-Pty=0 install -y --no-install-recommends \
wine-stable \
wine32 \
wine64
winehq-stable \
# apt-get -o Acquire::Retries=10 -qq update && apt-get -o Acquire::Retries=10 -o Dpkg::Use-Pty=0 install -y --no-install-recommends \
# wine-stable \
# wine32 \
# wine64
wine --version
;;
esac
Expand Down

0 comments on commit 362aa1d

Please sign in to comment.