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.
This commit is contained in:
Jehan 2024-08-13 18:16:39 +02:00
parent 576554a0af
commit 631a957f9a
1 changed files with 3 additions and 0 deletions

View File

@ -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,