Skip to content
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

cargo-xwin panics when building inside a dockerfile #52

Open
jaysonsantos opened this issue Jun 9, 2023 · 0 comments
Open

cargo-xwin panics when building inside a dockerfile #52

jaysonsantos opened this issue Jun 9, 2023 · 0 comments

Comments

@jaysonsantos
Copy link
Contributor

Hey there, while building an image to build windows binaries I've faced a panic when xwin tries to splat files.

With this Dockerfile you can reproduce the error:

FROM rust:1.65

ENV XWIN_VERSION 'v0.14.3'
ENV XWIN_URL "https://github.com/rust-cross/cargo-xwin/releases/download/${XWIN_VERSION}/cargo-xwin-${XWIN_VERSION}.x86_64-unknown-linux-musl.tar.gz"
ENV XWIN_VERSION 17
ENV XWIN_ARCH x86_64

RUN apt update && apt install -y curl clang pkg-config && rm -rf /var/lib/apt/lists/*
RUN curl -sL "${XWIN_URL}" | tar xz -C /usr/local/bin && chmod 755 /usr/local/bin/cargo-xwin


RUN rustup target add x86_64-pc-windows-msvc \
    && rustup component add clippy llvm-tools-preview \
    && rustup toolchain install nightly -c rustfmt --profile minimal

RUN cd $(mktemp -d) && cargo new download && cd download && cargo xwin build --target x86_64-pc-windows-msvc --release && cd .. && rm $PWD

When cargo xwin starts, after a while it will crash with the following message:

#0 0.902      Created binary (application) `download` package
#0 126.8 thread 'main' panicked at 'already have /root/.cache/cargo-xwin/xwin/sdk/include/um/appnotify.h matching /root/.cache/cargo-xwin/xwin/sdk/include/um/appnotify.h', /root/.cargo/registry/src/github.com-1ecc6299db9ec823/xwin-0.2.12/src/splat.rs:641:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant