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

Archlinux Docker fails with 'Unknown arguments specified' #711

Open
twilson90 opened this issue Oct 17, 2024 · 0 comments
Open

Archlinux Docker fails with 'Unknown arguments specified' #711

twilson90 opened this issue Oct 17, 2024 · 0 comments

Comments

@twilson90
Copy link

I'm trying to build in a docker container:

RUN cmake -DTARGET_ARCH=x86_64-w64-mingw32     -DGCC_ARCH=x86-64-v3     -DSINGLE_SOURCE_LOCATION="/home/user/packages"     -DRUSTUP_LOCATION="/home/user/install_rustup"     -G Ninja -B build64 -S mpv-winbuild-cmake:
0.528 -- The C compiler identification is GNU 14.2.1
0.540 -- Detecting C compiler ABI info
0.592 -- Detecting C compiler ABI info - done
0.603 -- Check for working C compiler: /usr/sbin/cc - skipped
0.603 -- Detecting C compile features
0.604 -- Detecting C compile features - done
2.032 -- MINGW_INSTALL_PREFIX dir: /opt/build64/install/x86_64-w64-mingw32
2.032 -- SINGLE_SOURCE_LOCATION dir: /home/user/packages
2.032 -- RUSTUP_LOCATION dir: /home/user/install_rustup
2.032 -- Compiler used: gcc
2.032 -- Malloc: /usr/lib/libmimalloc.so
2.032 -- Ccache: OFF
2.032 -- Target toolchain to build: x86_64-w64-mingw32
2.080 CMake Error at cmake/custom_steps.cmake:130 (if):
2.080   if given arguments:
2.080
2.080     "EXISTS" "/home/user/packages/mingw-w64" "GIT_CLONE_FLAGS" "--filter=tree" "0/.git"
2.080
2.080   Unknown arguments specified
2.080 Call Stack (most recent call first):
2.080   toolchain/mingw-w64.cmake:12 (force_rebuild_git)
2.080   toolchain/CMakeLists.txt:32 (include)
2.080
2.080
2.081 -- Configuring incomplete, errors occurred!

This is my Dockerfile:

FROM manjarolinux/base AS build

RUN cat <<EOF >> /etc/pacman.conf
[multilib]
Include = /etc/pacman.d/mirrorlist
EOF
RUN cat /etc/pacman.conf

RUN pacman -Syyu --noconfirm
RUN pacman -S git gyp mercurial subversion ninja cmake meson ragel yasm nasm asciidoc enca gperf unzip p7zip gcc-multilib clang lld libc++ libc++abi python-pip curl lib32-gcc-libs lib32-glib2 ccache --noconfirm

ENV PIP_BREAK_SYSTEM_PACKAGES=1
RUN pip3 install rst2pdf mako jsonschema

RUN pacman -S llvm --noconfirm

WORKDIR /opt
RUN git clone https://github.com/shinchiro/mpv-winbuild-cmake.git --depth=1

RUN pacman -U https://archive.archlinux.org/repos/2024/06/07/extra/os/x86_64/mimalloc-2.1.2-1-x86_64.pkg.tar.zst --noconfirm

RUN cmake -DTARGET_ARCH=x86_64-w64-mingw32 \
    -DGCC_ARCH=x86-64-v3 \
    -DSINGLE_SOURCE_LOCATION="/home/user/packages" \
    -DRUSTUP_LOCATION="/home/user/install_rustup" \
    -G Ninja -B build64 -S mpv-winbuild-cmake

WORKDIR /opt/build64
RUN ninja download
RUN ninja gcc
RUN ninja mpv

FROM scratch AS artifact
COPY --from=build /opt/mpv/out /

FROM build AS release

Someone else noted this problem:

rust-lang/rust#126200

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