glib-genmarshal output is sometimes empty because output file is not closed
Building gdk-pixbuf fails on Windows, when Meson is installed from .msi installer package.
> git clone https://gitlab.gnome.org/GNOME/gdk-pixbuf.git
> cd gdk-pixbuf
> mkdir build
> cd build
> meson
> ninja
....
[645/1218] Compiling C object gdk-pixbuf/gdk_pixbuf-2.0-0.dll.p/gdk-pixbuf-loader.c.obj
FAILED: gdk-pixbuf/gdk_pixbuf-2.0-0.dll.p/gdk-pixbuf-loader.c.obj
"cl" "-Igdk-pixbuf\gdk_pixbuf-2.0-0.dll.p" "-Igdk-pixbuf" "-I..\gdk-pixbuf" "-I." "-I.." "-Igdk-pixbuf\pixops" "-I..\gdk-pixbuf\pixops" "-Isubprojects\glib" "-I..\subprojects\glib" "-Isubprojects\glib\glib" "-I..\subprojects\glib\glib" "-Isubprojects\proxy-libintl" "-I..\subprojects\proxy-libintl" "-Isubprojects\glib\gobject" "-I..\subprojects\glib\gobject" "-Isubprojects\glib\gmodule" "-I..\subprojects\glib\gmodule" "-Isubprojects\glib\gio" "-I..\subprojects\glib\gio" "/MD" "/nologo" "/showIncludes" "/W2" "/O2" "/Zi" "-D_POSIX_C_SOURCE=200809L" "-D_DEFAULT_SOURCE" "-D_XOPEN_SOURCE=700" "-utf-8" "-DGDK_PIXBUF_RELOCATABLE" "-DHAVE_CONFIG_H=1" "-utf-8" "-DG_LOG_STRUCTURED=1" "-DG_LOG_DOMAIN=\"GdkPixbuf\"" "-DGDK_PIXBUF_COMPILATION" "-DGDK_PIXBUF_PREFIX=\"c:/\"" "-DGDK_PIXBUF_LOCALEDIR=\"c:/share/locale\"" "-DGDK_PIXBUF_LIBDIR=\"c:/lib\"" "-DGDK_PIXBUF_BINARY_VERSION=\"2.10.0\"" "-DGDK_PIXBUF_ENABLE_BACKEND" "-DPIXBUF_LIBDIR=\"c:/lib/gdk-pixbuf-2.0/2.10.0/loaders\"" "-DBUILT_MODULES_DIR=\"C:\\Users\\Aleksandr\\gdk-pixbuf\\build\\gdk-pixbuf\"" "/Fdgdk-pixbuf\gdk_pixbuf-2.0-0.dll.p\gdk-pixbuf-loader.c.pdb" /Fogdk-pixbuf/gdk_pixbuf-2.0-0.dll.p/gdk-pixbuf-loader.c.obj "/c" ../gdk-pixbuf/gdk-pixbuf-loader.c
../gdk-pixbuf/gdk-pixbuf-loader.c(146): error C2065: '_gdk_pixbuf_marshal_VOID__INT_INT': undeclared identifier
../gdk-pixbuf/gdk-pixbuf-loader.c(146): warning C4047: 'function': 'GSignalCMarshaller' differs in levels of indirection from 'int'
../gdk-pixbuf/gdk-pixbuf-loader.c(146): warning C4024: 'g_signal_new': different types for formal and actual parameter 7
../gdk-pixbuf/gdk-pixbuf-loader.c(166): error C2065: '_gdk_pixbuf_marshal_VOID__VOID': undeclared identifier
../gdk-pixbuf/gdk-pixbuf-loader.c(166): warning C4047: 'function': 'GSignalCMarshaller' differs in levels of indirection from 'int'
../gdk-pixbuf/gdk-pixbuf-loader.c(166): warning C4024: 'g_signal_new': different types for formal and actual parameter 7
../gdk-pixbuf/gdk-pixbuf-loader.c(189): error C2065: '_gdk_pixbuf_marshal_VOID__INT_INT_INT_INT': undeclared identifier
../gdk-pixbuf/gdk-pixbuf-loader.c(189): warning C4047: 'function': 'GSignalCMarshaller' differs in levels of indirection from 'int'
../gdk-pixbuf/gdk-pixbuf-loader.c(189): warning C4024: 'g_signal_new': different types for formal and actual parameter 7
../gdk-pixbuf/gdk-pixbuf-loader.c(211): error C2065: '_gdk_pixbuf_marshal_VOID__VOID': undeclared identifier
../gdk-pixbuf/gdk-pixbuf-loader.c(211): warning C4047: 'function': 'GSignalCMarshaller' differs in levels of indirection from 'int'
../gdk-pixbuf/gdk-pixbuf-loader.c(211): warning C4024: 'g_signal_new': different types for formal and actual parameter 7
Generated gdk-pixbuf/gdk-pixbuf-marshal.c
, gdk-pixbuf/gdk-pixbuf-marshal.h
are empty.
Appending args.output.close()
to glib-genmarshal
fixes the issue.
Initially reported to Meson: https://github.com/mesonbuild/meson/issues/8439