GNOME Bugzilla – Bug 781070
enum collisions w/o -DGIMP_DISABLE_DEPRECATED
Last modified: 2017-04-10 08:42:48 UTC
Hi! I would like to let you know that we patch away *_DISABLE_DEPRECATED defines from configure scripts for GNOME applications by general in Gentoo, which includes GIMP_DISABLE_DEPRECATED. It came to my attention [1] that without -DGIMP_DISABLE_DEPRECATED Gimp Git master no longer compiles because gimpcompatenums.h and gimpbasetypes.h define a number of enum values twice. While in different enum types, they are in the global C namespace technically which is why they collide, e.g.: In file included from gimpbase-private.c:29:0: gimpcompatenums.h:36:3: error: redeclaration of enumerator ‘GIMP_ADD_WHITE_MASK’ GIMP_ADD_WHITE_MASK = GIMP_ADD_MASK_WHITE, ^ In file included from gimpbasetypes.h:26:0, from gimpbase-private.c:26: ../libgimpbase/gimpbaseenums.h:52:3: note: previous definition of ‘GIMP_ADD_WHITE_MASK’ was here GIMP_ADD_WHITE_MASK = GIMP_ADD_MASK_WHITE, /*< skip, pdb-skip >*/ ^ For me, patch [2] fixes compilation. Are you aware of the collisions? Are there plans to resolve them? Best, Sebastian [1] https://bugs.gentoo.org/show_bug.cgi?id=614914 [2] https://614914.bugs.gentoo.org/attachment.cgi?id=469518
If gentoo patches GIMP, and as a consequence GIMP breaks, that's exactly gentoo's problem.
True. What is the current purpose of the GIMP_DISABLE_DEPRECATED switch if it's not fully functional?
If is fully functional, for building external plug-ins, you can to that both with and without GIMP_DISABLE_DEPRECATED defined. GIMP itself can however only be built with the define, it's not supposed to be configurable, and there is no reasaon not to have it defined.
(In reply to Michael Natterer from comment #3) > If is fully functional, for building external plug-ins, you can > to that both with and without GIMP_DISABLE_DEPRECATED defined. So a plugin could never include both gimpcompatenums.h and gimpbasetypes.h and not define GIMP_DISABLE_DEPRECATED? > GIMP itself can however only be built with the define, it's not > supposed to be configurable, and there is no reasaon not to have > it defined. Good to know. I'll need to whitelist GIMP_DISABLE_DEPRECATED, then. ( https://github.com/gentoo/gentoo/blob/master/eclass/gnome2-utils.eclass#L494 )
A plug-in can never include gimpcompatenums.h, it's not even installed.
Alright, thanks.