gitlab-ci: fix the CI build.

In the last few days, our deps-win64 job started to fail with:
> $ update-alternatives --set x86_64-w64-mingw32-g++ /usr/bin/x86_64-w64-mingw32-g++-posix
> update-alternatives: error: no alternatives for x86_64-w64-mingw32-g++

The reason lies in this change in Debian testing 10 days ago:

----
gcc-mingw-w64 (25) unstable; urgency=medium

  * Upgrade to GCC 12. Closes: #1023679. It is no longer possible to tweak
    the installation directory for different thread models, so the -posix
    and -win32 packages are no longer co-installable.
  * Drop “Built-Using” from “Architecture: all” packages.
  * Since the POSIX and Win32 packages are no longer co-installable,
    drop support for alternatives and use symlinks to provide the full
    set of command names.
  * Standards-Version 4.6.1, no change required.

 -- Stephen Kitt <skitt@debian.org>  Mon, 12 Dec 2022 09:00:34 +0100
----

So from now on, we'll only install the posix variant of the cross-compiler.
Hopefully it will work for all packages we build.
This commit is contained in:
Jehan 2022-12-23 16:26:45 +01:00
parent d08a63d610
commit 5d30089d71
1 changed files with 5 additions and 4 deletions

View File

@ -101,7 +101,11 @@ build-image-win64:
- echo "FROM debian:testing" > Dockerfile - echo "FROM debian:testing" > Dockerfile
- echo "RUN apt-get update" >> Dockerfile - echo "RUN apt-get update" >> Dockerfile
- echo "RUN apt-get install -y --no-install-recommends \\" >> Dockerfile - echo "RUN apt-get install -y --no-install-recommends \\" >> Dockerfile
- echo "automake autopoint build-essential cmake cpio g++-mingw-w64-x86-64 gcc-mingw-w64-x86-64 gettext git libgdk-pixbuf2.0-dev libglib2.0-bin librsvg2-dev meson pkg-config python3 python3-distutils python3-docutils python3-pip rpm xsltproc" >> Dockerfile # libjxl uses C++ features that require posix threads so we install
# specifically g++-mingw-w64-x86-64-posix and gcc-mingw-w64-x86-64-posix.
# Note that we can't install both the -posix and -win32 versions since
# update gcc-mingw-w64 (25).
- echo "automake autopoint build-essential cmake cpio g++-mingw-w64-x86-64-posix gcc-mingw-w64-x86-64-posix gettext git libgdk-pixbuf2.0-dev libglib2.0-bin librsvg2-dev meson pkg-config python3 python3-distutils python3-docutils python3-pip rpm xsltproc" >> Dockerfile
- /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile --destination $CI_REGISTRY_IMAGE:build-win64-latest --cache=true --cache-ttl=120h - /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile --destination $CI_REGISTRY_IMAGE:build-win64-latest --cache=true --cache-ttl=120h
@ -505,9 +509,6 @@ deps-win64:
- pip3 install zstandard - pip3 install zstandard
script: script:
- export PATH="`pwd`/.local/bin:$PATH" - export PATH="`pwd`/.local/bin:$PATH"
# libjxl uses C++ features that require posix threads
- update-alternatives --set x86_64-w64-mingw32-g++ /usr/bin/x86_64-w64-mingw32-g++-posix
- update-alternatives --set x86_64-w64-mingw32-gcc /usr/bin/x86_64-w64-mingw32-gcc-posix
- crossroad w64 gimp --run="build/windows/gitlab-ci/build-deps-crossroad.sh" - crossroad w64 gimp --run="build/windows/gitlab-ci/build-deps-crossroad.sh"
artifacts: artifacts:
name: "${CI_JOB_NAME}-${CI_COMMIT_REF_SLUG}" name: "${CI_JOB_NAME}-${CI_COMMIT_REF_SLUG}"