From 631a957f9ace96b47418dff2b986a908006c8cf7 Mon Sep 17 00:00:00 2001 From: Jehan Date: Tue, 13 Aug 2024 18:16:39 +0200 Subject: [PATCH] libgimp: have libgimpui depend on pdbgen. There was a weird instance of build failure in CI when compiling one of the libgimpui files. It could not find one of the PDB-generated function: > ../libgimp/gimpaspectpreview.c:329:19: error: call to undeclared function 'gimp_image_get_selection'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] My assumption is that as a multi-threaded build, this file was compiled just at the same time as the PDB was generating it, and therefore it was empty, hence a very bad timing creating a build failure. As I recall, I created the bogus stamp file stamp-pdbgen.h specifically for such race condition issues (because meson has no generic dependency rule, so we can't just ask one job to wait for another). We were using this bogus object as source to libgimp, but not libgimpui. Hopefully this will fix the problem and it won't re-happen randomly. --- libgimp/meson.build | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libgimp/meson.build b/libgimp/meson.build index 27d0c28f71..882a10cb25 100644 --- a/libgimp/meson.build +++ b/libgimp/meson.build @@ -401,6 +401,9 @@ libgimpui = library('gimpui-'+ gimp_api_version, gexiv2, gtk3, ], + sources: [ + pdbgen + ], c_args: [ '-DG_LOG_DOMAIN="LibGimpUI"', '-DGIMP_COMPILATION', ], link_with: [ libgimpwidgets,