[gimp/wip/Jehan/native-win64-build: 1/2] Cleanup the Gitlab runner manually.




commit 581387fc6f98c0d65aee5237ba241023c714cfdf
Author: Jehan <jehan girinstud io>
Date:   Mon May 3 16:08:03 2021 +0200

    Cleanup the Gitlab runner manually.
    
    Ok so this is horrible, but this is the only way I found to get past
    some errors. The build would break randomly (sometimes it would,
    sometimes not, with the same gitlab-ci rules) because of existing files.
    The errors would be the following when trying to install dependency
    packages with pacman:
    
    > mingw-w64-x86_64-glib2: /mingw64/bin/libglib-2.0-0.dll exists in filesystem
    
    At first I thought it was a bug in Pacman or MSYS2, but on some runners,
    I had such warnings at the very start of the runner (note: on some
    runners, the warnings would not be displayed even though the final
    conflicting files error would still happen at the end of the logs):
    
    > warning: failed to remove mingw64/bin/libglib-2.0-0.dll: Invalid argument
    
    It looks like it might be related to this Gitlab bug where a runner
    would fail to clean its environment:
    https://gitlab.com/gitlab-org/gitlab-runner/-/issues/1839
    
    In any case, the only way I found so far is to manually remove the
    conflicting files before installing the packages supposed to install
    these. This is completely horrible (and I sure hope it won't come up
    again with different files each time) but really the only workaround I
    found so far (I think a real solution will have to come from Gitlab code
    or from the GNOME admins, not sure what is the exact source of the
    problem).

 build/windows/build-msys2.sh | 38 ++++++++++++++++++++++++++++----------
 configure.ac                 |  2 +-
 2 files changed, 29 insertions(+), 11 deletions(-)
---
diff --git a/build/windows/build-msys2.sh b/build/windows/build-msys2.sh
index 2cbbeb27e9..96e4b7ddaa 100644
--- a/build/windows/build-msys2.sh
+++ b/build/windows/build-msys2.sh
@@ -8,6 +8,22 @@ else
     export MSYS2_ARCH="x86_64"
 fi
 
+# Why do we even have to remove these manually? The whole thing is
+# messed up, but it looks like the Gitlab runner fails to clean properly
+# (it spews a bunch of "failed to remove" warnings at runner start, then
+# ends with a "error: failed to commit transaction (conflicting files)"
+# listing the various files it failed to remove).
+# Might be tied to: https://gitlab.com/gitlab-org/gitlab-runner/-/issues/1839
+rm -f /c/msys64/mingw64/bin/libpcre-1.dll
+rm -f /c/msys64/mingw64/bin/libgio-2.0-0.dll
+rm -f /c/msys64/mingw64/bin/libglib-2.0-0.dll
+rm -f /c/msys64/mingw64/bin/libgmodule-2.0-0.dll
+rm -f /c/msys64/mingw64/bin/libgobject-2.0-0.dll
+rm -f /c/msys64/mingw64/bin/libpng16-16.dll
+rm -f /c/msys64/mingw64/bin/gdk-pixbuf-pixdata.exe
+rm -f /c/msys64/mingw64/bin/libgdk_pixbuf-2.0-0.dll
+rm -f /c/msys64/mingw64/lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-png.dll
+
 # Update everything
 pacman --noconfirm -Suy
 
@@ -41,7 +57,9 @@ pacman --noconfirm -S --needed \
     mingw-w64-$MSYS2_ARCH-gtk-doc \
     mingw-w64-$MSYS2_ARCH-gtk3 \
     mingw-w64-$MSYS2_ARCH-vala \
-    mingw-w64-$MSYS2_ARCH-luajit
+    mingw-w64-$MSYS2_ARCH-luajit \
+    mingw-w64-$MSYS2_ARCH-babl \
+    mingw-w64-$MSYS2_ARCH-gegl
 
 mkdir -p _ccache
 export CCACHE_BASEDIR="$(pwd)"
@@ -59,15 +77,15 @@ export ACLOCAL_FLAGS="-I/c/msys64/mingw64/share/aclocal"
 git clone --depth=${GIT_DEPTH} --branch BABL_0_1_78 https://gitlab.gnome.org/GNOME/babl.git _babl
 git clone --depth=${GIT_DEPTH} https://gitlab.gnome.org/GNOME/gegl.git _gegl
 
-cd _babl
-meson -Dprefix="${GIMP_PREFIX}" -Dwith-docs=false _build
-ninja -v -C _build
-ninja -C _build install
-cd ../_gegl
-meson --prefix="${GIMP_PREFIX}" -Ddocs=false _build
-ninja -C _build
-ninja -C _build install
-cd ..
+#cd _babl
+#meson -Dprefix="${GIMP_PREFIX}" -Dwith-docs=false _build
+#ninja -v -C _build
+#ninja -C _build install
+#cd ../_gegl
+#meson --prefix="${GIMP_PREFIX}" -Ddocs=false _build
+#ninja -C _build
+#ninja -C _build install
+#cd ..
 
 # Build
 ccache --zero-stats
diff --git a/configure.ac b/configure.ac
index d648f47ce1..834b719775 100644
--- a/configure.ac
+++ b/configure.ac
@@ -60,7 +60,7 @@ m4_define([fontconfig_required_version], [2.12.4])
 m4_define([freetype2_required_version], [2.1.7])
 m4_define([gdk_pixbuf_required_version], [2.30.8])
 m4_define([gegl_major_minor_version], [0.4])
-m4_define([gegl_micro_version], [30])
+m4_define([gegl_micro_version], [28])
 m4_define([gegl_required_version],
           [gegl_major_minor_version.gegl_micro_version])
 m4_define([gexiv2_required_version], [0.10.6])


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]