msys2 / MINGW-packages

Package scripts for MinGW-w64 targets to build under MSYS2.
https://packages.msys2.org
BSD 3-Clause "New" or "Revised" License
2.31k stars 1.23k forks source link

gimp: rebuild with GCC 14 #22552

Closed mmuetzel closed 1 week ago

mmuetzel commented 2 weeks ago

Cherry-pick patch from upstream to avoid warnings that are elevated to an error in GCC 14.

See build error in #22550.


../../../gimp-2.10.38/plug-ins/file-tiff/file-tiff-load.c:1372:56: error: passing argument 2 of 'gimp_image_get_resolution' from incompatible pointer type [-Wincompatible-pointer-types]
 1372 |                     gimp_image_get_resolution (*image, &xres, &yres);
      |                                                        ^~~~~
      |                                                        |
      |                                                        gfloat * {aka float *}
In file included from ../../../gimp-2.10.38/libgimp/gimp_pdb_headers.h:55,
                 from ../../../gimp-2.10.38/libgimp/gimp.h:66,
                 from ../../../gimp-2.10.38/plug-ins/file-tiff/file-tiff-load.c:52:
../../../gimp-2.10.38/libgimp/gimpimage_pdb.h:179:86: note: expected 'gdouble *' {aka 'double *'} but argument is of type 'gfloat *' {aka 'float *'}
  179 |                                                                 gdouble             *xresolution,
      |                                                                 ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
../../../gimp-2.10.38/plug-ins/file-tiff/file-tiff-load.c:1372:63: error: passing argument 3 of 'gimp_image_get_resolution' from incompatible pointer type [-Wincompatible-pointer-types]
 1372 |                     gimp_image_get_resolution (*image, &xres, &yres);
      |                                                               ^~~~~
      |                                                               |
      |                                                               gfloat * {aka float *}
../../../gimp-2.10.38/libgimp/gimpimage_pdb.h:180:86: note: expected 'gdouble *' {aka 'double *'} but argument is of type 'gfloat *' {aka 'float *'}
mmuetzel commented 2 weeks ago

Why is there such a large file-diff on a simple rebuild with only a minor unrelated patch? Did some dependencies break since the last build?

@lazka: Is this expected? Is this rebuild ok?

lazka commented 2 weeks ago

weird, no idea right now

mmuetzel commented 1 week ago

As @MehdiChinoune pointed out in a since deleted(?) comment, this might be due to the name of the gdk-pixbuf module installed by librsvg. Thank you for that hint.

It turns out, GIMP can in fact not find that module unless it has a name that matches the pattern of the other modules exactly. Let's see if renaming that module reduces the file-diff.

lazka commented 1 week ago

https://gitlab.gnome.org/GNOME/gimp/-/blob/5cb3a543b0be4a8ba0261280903fe72a6b0c417d/configure.ac?page=3#L2507-2508

mmuetzel commented 1 week ago

Do you prefer to change that in GIMP instead?

lazka commented 1 week ago

Yeah, I've created https://gitlab.gnome.org/GNOME/gimp/-/merge_requests/1966

gimp2 is on its way out, and ideally it shouldn't depend on the DLL names in the first place. The loader name even changed on Linux.

mmuetzel commented 1 week ago

Thanks for the patch for upstream. If I understand correctly, it would break compatibility with older versions of librsvg. But it is good enough for MSYS2 in any case.

On the chance that the patch won't be accepted in its current form by upstream, I added the patch to this PR (instead of downloading it from the upstream merge request).

Additionally, I added a patch to fix compatibility with newer versions of libheif.

mmuetzel commented 1 week ago

Oops. I crossed with your push and force-pushed after it.

Sorry for that. I hope I didn't revert some important parts doing that...

lazka commented 1 week ago

all good

mmuetzel commented 1 week ago

It looks like the file-diff is empty now (as expected for a rebuild).