-
Notifications
You must be signed in to change notification settings - Fork 765
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
uv
's tool installation feature breaks on Wine
#5090
Comments
Interesting, but Rye doesn't use the |
I haven't run it in a venv to test, the issue might be with |
This doesn't look related to tool installs, just something with our cache? Are you getting a Windows version of uv? I imagine this is some weird interaction of our Windows-specific file system code on a machine that's actually using a Linux file system? Can you share the output with |
I downloaded this archive and ran the
Here's the output when the env var and Click for log
|
Thanks for the logs! Unfortunately there are a ton of possible places we can throw a cache read error in this code path. However, the error code 50 looks associated with taking locks — which is essential for safe operation. See https://docs.oracle.com/en-us/iaas/Content/File/Troubleshooting/applicationfailstoacquirelock.htm Could you explore those two options? |
I've never tested on Wine, maybe our fs ops are just making bad assumptions :) |
Did some digging and this may be a Wine issue at first glance. When using Rye with
The line:
Comes from here in Wine. Sounds like it's related, but I'm not familiar enough with what Rye/ |
I hit the same error trying to run uv on Wine inside Docker. Here's the dockerfile I used (modtly taken form here): FROM debian:bookworm AS wine
ENV WINEPREFIX="/wine" \
WINEDEBUG=-all \
DISPLAY=:1 \
DEBIAN_FRONTEND=noninteractive \
PUID=0 \
PGID=0
RUN dpkg --add-architecture i386 \
&& apt-get update \
&& apt-get install -y --no-install-recommends ca-certificates
ADD --chmod=644 https://dl.winehq.org/wine-builds/winehq.key /etc/apt/keyrings/winehq-archive.key
ADD https://dl.winehq.org/wine-builds/debian/dists/bookworm/winehq-bookworm.sources /etc/apt/sources.list.d/
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
winehq-devel \
# wine64 \
# wine32 \
xvfb \
winbind \
unzip \
&& apt-get autoremove -y ca-certificates \
&& rm -rf /var/lib/apt/lists/*
RUN Xvfb :1 -screen 0 320x240x24 & \
WINEDLLOVERRIDES="mscoree,mshtml=" wineboot -u
RUN rm /tmp/.X1-lock
RUN winecfg -v win10 && wineserver -w
COPY --chmod=755 entrypoint.sh /entrypoint.sh
ENTRYPOINT [ "/entrypoint.sh" ]
WORKDIR /app
VOLUME /app
FROM wine AS wine-uv
ARG UV_VERSION=0.4.21
ARG UV_ARCH=x86_64
ADD https://github.com/astral-sh/uv/releases/download/${UV_VERSION}/uv-${UV_ARCH}-pc-windows-msvc.zip /app/
RUN unzip uv-${UV_ARCH}-pc-windows-msvc.zip && rm uv-${UV_ARCH}-pc-windows-msvc.zip I built and ran it with docker build -f wine:test .
docker run --rm -ti -e WINEDEBUG= -e RUST_LOG=trace wine:test /bin/bash I then tried to install wheel wine ./uv.exe -v tool install wheel I have quite a few more lines in the log, Full Log
FYI, python is installed successfully on the first run, but I left out the logs for brevity. I tried to add the registry key mentioned in the article, but nothing changed wine reg add 'HKLM\SOFTWARE\Microsoft\ClientForNFS\CurrentVersion\Users\Default\Defaults' /v Locking /t REG_DWORD /d 1 I also tried to install some other packages that has dependencies (pre-commit to be specific), and it fails as soon as the first package (cfgv) is downloaded. |
Reproduce
Steps 1 - 7 should run successfully, step 8 results in an error:
winecfg
, set Windows version to Windows 10 or 11 if it isn't already setwget "https://www.python.org/ftp/python/3.12.4/python-3.12.4-amd64.exe"
wine python-3.12.4-amd64.exe
wine python -m ensurepip
wine python -m pip install uv
wine python -m uv tool install wheel
, see output belowOutput
Expected output
Run on Windows 11:
Notes
uv
version is0.2.25 (d1010228b 2024-07-15)
This might be related to bug uv pip install inconsistent failure on Windows #1491 on Windows, the results are similar but the os error is
5
, not50
. I cannot getuv
to install tools no matter how many times I run it, unlike the reporter in uv pip install inconsistent failure on Windows #1491 is able to.This also breaks Rye on Wine and can be reproduced with the following:
winecfg
, set Windows version to Windows 10 or 11 if it isn't already setwget "https://github.com/astral-sh/rye/releases/latest/download/rye-x86_64-windows.exe"
wine rye-x86_64-windows.exe
wine rye install wheel
:The text was updated successfully, but these errors were encountered: