Fresh new native Windows build of GIMP 2.99.17 fails, reports syntax errors in glib gutils.h , gstring.h and gobject.h
Environment/Versions
- GIMP version: 2.99, Gimp development build HEAD 2.99.17
- Package: git gitlab.gnome.org
- Operating System: Native Windows 10 64bit, msys64
Description of the bug
[116/1845] Generating libgimp/Gimp-3.0.gir with a custom command (wrapped by meson to set PATH, to set env)
FAILED: libgimp/Gimp-3.0.gir
Looking at --- stderr --- , the build is complaining about syntax errors in "mingw64/include/glib-2.0/glib/gutils.h", "mingw64/include/glib-2.0/glib/gstring.h", and "mingw64/include/glib-2.0/gobject/gobject.h"
I've googled this error, it also appears in unrelated projects, but I have not found a posted solution.
Reproduction
Is the bug reproducible? Every time. I have not found a work around.
Reproduction steps:
- Clone fresh into new development dir. (All pre-reqs as described in https://developer.gimp.org/core/setup/build and https://developer.gimp.org/core/setup/build/windows) These are my env vars:
GI_TYPELIB_PATH="${GIMP_PREFIX}/lib/girepository-1.0:${GI_TYPELIB_PATH:+:$GI_TYPELIB_PATH}"
PKG_CONFIG_PATH="${GIMP_PREFIX}/lib/pkgconfig:$PKG_CONFIG_PATH"
PKG_CONFIG_PATH="${GIMP_PREFIX}/share/pkgconfig:$PKG_CONFIG_PATH"
LD_LIBRARY_PATH="${GIMP_PREFIX}/lib:${LD_LIBRARY_PATH}"
ACLOCAL_FLAGS="-I/l/bin/msys64/mingw64/share/aclocal"
XDG_DATA_DIRS="$GIMP_PREFIX/share:/usr/local/share/:/usr/share/:/mingw64/share/"
- In ming64 bash, enter
meson setup _build
--prefix="${GIMP_PREFIX}"
--buildtype=debug
-Dpython=enabled
-Dgimpdir=GIMP/git-master
-Dwin32-debug-console=true
-Dappdata-test=disabled
-Dwith-sendmail=false
-Dheadless-tests=disabled
-Dgimpdir=GIMP/git-master - enter "ninja"
…
Expected result: Successful build
Actual result: ninja: build stopped: subcommand failed.
Additional information
--- stderr ---
L:\bin\msys64\mingw64\include\glib-2.0\glib\gutils.h:378: syntax error, unexpected INTEGER, expecting identifier in ' if ((__builtin_expect (__extension__ ({ int G_PASTE (_g_boolean_var_, 0); if (nth_bit < -1) G_PASTE (_g_boolean_var_, 0) = 1; else G_PASTE (_g_boolean_var_, 0) = 0; G_PASTE (_g_boolean_var_, 0); }), 0)))' at '0'
L:\bin\msys64\mingw64\include\glib-2.0\glib\gutils.h:393: syntax error, unexpected INTEGER, expecting identifier in ' if (nth_bit < 0 || (__builtin_expect (__extension__ ({ int G_PASTE (_g_boolean_var_, 1); if (nth_bit > 4 * 8) G_PASTE (_g_boolean_var_, 1) = 1; else G_PASTE (_g_boolean_var_, 1) = 0; G_PASTE (_g_boolean_var_, 1); }), 0)))' at '1'
L:\bin\msys64\mingw64\include\glib-2.0\glib\gutils.h:408: syntax error, unexpected INTEGER, expecting identifier in ' return (__builtin_expect (__extension__ ({ int G_PASTE (_g_boolean_var_, 2); if (number) G_PASTE (_g_boolean_var_, 2) = 1; else G_PASTE (_g_boolean_var_, 2) = 0; G_PASTE (_g_boolean_var_, 2); }), 1)) ?' at '2'
L:\bin\msys64\mingw64\include\glib-2.0\glib\gstring.h:198: syntax error, unexpected INTEGER, expecting identifier in ' if ((__builtin_expect (__extension__ ({ int G_PASTE (_g_boolean_var_, 3); if (gstring != ' at '3'
L:\bin\msys64\mingw64\include\glib-2.0\glib\gstring.h:220: syntax error, unexpected INTEGER, expecting identifier in ' if (__builtin_expect (__extension__ ({ int G_PASTE (_g_boolean_var_, 4); if (gstring == ' at '4'
L:\bin\msys64\mingw64\include\glib-2.0\glib\gstring.h:223: syntax error, unexpected INTEGER, expecting identifier in ' if (__builtin_expect (__extension__ ({ int G_PASTE (_g_boolean_var_, 5); if (val == ' at '5'
L:\bin\msys64\mingw64\include\glib-2.0\glib\gstring.h:231: syntax error, unexpected INTEGER, expecting identifier in ' if ((__builtin_expect (__extension__ ({ int G_PASTE (_g_boolean_var_, 6); if (gstring->len + len_unsigned < gstring->allocated_len) G_PASTE (_g_boolean_var_, 6) = 1; else G_PASTE (_g_boolean_var_, 6) = 0; G_PASTE (_g_boolean_var_, 6); }), 1)))' at '6'
L:\bin\msys64\mingw64\include\glib-2.0\glib\gstring.h:234: syntax error, unexpected IF in ' if ((__builtin_expect (__extension__ ({ int G_PASTE (_g_boolean_var_, 7); if (val + len_unsigned <= end || val > end + len_unsigned) G_PASTE (_g_boolean_var_, 7) = 1; else G_PASTE (_g_boolean_var_, 7) = 0; G_PASTE (_g_boolean_var_, 7); }), 1)))' at 'if'
L:\bin\msys64\mingw64\include\glib-2.0\glib\gstring.h:234: syntax error, unexpected INTEGER, expecting identifier in ' if ((__builtin_expect (__extension__ ({ int G_PASTE (_g_boolean_var_, 7); if (val + len_unsigned <= end || val > end + len_unsigned) G_PASTE (_g_boolean_var_, 7) = 1; else G_PASTE (_g_boolean_var_, 7) = 0; G_PASTE (_g_boolean_var_, 7); }), 1)))' at '7'
L:\bin\msys64\mingw64\include\glib-2.0\gobject\gobject.h:819: syntax error, unexpected INTEGER, expecting identifier in ' do { if (__builtin_expect (__extension__ ({ int G_PASTE (_g_boolean_var_, 8); if ((((g_type_check_instance_is_fundamentally_a ((GTypeInstance*) ((weak_pointer)), (((GType) ((20) << (2))))))))) G_PASTE (_g_boolean_var_, 8) = 1; else G_PASTE (_g_boolean_var_, 8) = 0; G_PASTE (_g_boolean_var_, 8); }), 1)) ; else g_assertion_message (((gchar*) 0), "L:/bin/msys64/mingw64/include/glib-2.0/gobject/gobject.h", 819, ((const char*) (__func__)), "'" "G_IS_OBJECT (weak_pointer)" "' should be TRUE"); } while (0);' at '8'
L:\bin\msys64\mingw64\include\glib-2.0\gobject\gobject.h:819: syntax error, unexpected ')', expecting identifier or '(' in ' do { if (__builtin_expect (__extension__ ({ int G_PASTE (_g_boolean_var_, 8); if ((((g_type_check_instance_is_fundamentally_a ((GTypeInstance*) ((weak_pointer)), (((GType) ((20) << (2))))))))) G_PASTE (_g_boolean_var_, 8) = 1; else G_PASTE (_g_boolean_var_, 8) = 0; G_PASTE (_g_boolean_var_, 8); }), 1)) ; else g_assertion_message (((gchar*) 0), "L:/bin/msys64/mingw64/include/glib-2.0/gobject/gobject.h", 819, ((const char*) (__func__)), "'" "G_IS_OBJECT (weak_pointer)" "' should be TRUE"); } while (0);' at ')'
L:\bin\msys64\mingw64\include\glib-2.0\gobject\gobject.h:822: syntax error, unexpected INTEGER, expecting identifier in ' do { if (__builtin_expect (__extension__ ({ int G_PASTE (_g_boolean_var_, 9); if ((weak_pointer) == ' at '9'
L:\bin\msys64\mingw64\include\glib-2.0\gobject\gobject.h:822: syntax error, unexpected ')', expecting identifier or '(' in '# 822 "L:/bin/msys64/mingw64/include/glib-2.0/gobject/gobject.h"' at ')'
Command '['L:/projects/3rd_party/gimp_world/gimp/_build/tmp-introspecte4qhcnnf/Gimp-3.0.exe', '--introspect-dump=L:/projects/3rd_party/gimp_world/gimp/_build/tmp-introspecte4qhcnnf/functions.txt,L:/projects/3rd_party/gimp_world/gimp/_build/tmp-introspecte4qhcnnf/dump.xml']' returned non-zero exit status 3221225725.
[154/1849] Compiling C object plug-ins/file-jpeg/file-jpeg.exe.p/jpeg-save.c.obj
ninja: build stopped: subcommand failed.
Edited by Michael Schumacher