Build error: missing vapigen dependency on gdk-pixbuf-2.0
vala bug report here: vala#1199 (closed)
Starting with newer gdk-pixbuf building librsvg started to fail in vapigen:
make[2]: Entering directory '/home/user/M/mingw-w64-librsvg/src/build-x86_64-w64-mingw32'
VAPIGEN librsvg-2.0.vapi
Generation failed: 1 error(s), 0 warning(s)
GdkPixbuf-2.0.gir:6448.55-6448.55: error: The symbol `GModule' could not be found
<type name="GModule.Module" c:type="GModule*"/>
^
make[2]: *** [C:/msys64/mingw64/share/vala/Makefile.vapigen:61: librsvg-2.0.vapi] Error 1
The above bug report suggested that librsvg isn't passing gdk-pixbuf-2.0
as a dependency as it should, and indeed, the following patch makes things work again:
--- librsvg-2.50.3/Makefile.am.orig 2021-07-10 17:47:36.531222200 +0200
+++ librsvg-2.50.3/Makefile.am 2021-07-10 17:47:38.774497600 +0200
@@ -340,7 +340,7 @@
VAPIGEN_VAPIS = librsvg-$(RSVG_API_VERSION).vapi
-librsvg_@RSVG_API_VERSION_U@_vapi_DEPS = gio-2.0 cairo
+librsvg_@RSVG_API_VERSION_U@_vapi_DEPS = gio-2.0 cairo gdk-pixbuf-2.0
librsvg_@RSVG_API_VERSION_U@_vapi_METADATADIRS = $(srcdir)
librsvg_@RSVG_API_VERSION_U@_vapi_FILES = Rsvg-$(RSVG_API_VERSION).gir $(srcdir)/Rsvg-$(RSVG_API_VERSION)-custom.vala