gnome-base/librsvg-2.40.21 compile fails with gcc-14.2.1 because "-Wincompatible-pointer-types" is now an error. There's also a -Wdeprecated-declarations warning. rsvg-css.c: In function 'rsvg_css_parse_xml_attribute_string': rsvg-css.c:866:20: error: assignment to 'xmlStructuredErrorFunc' {aka 'void (*)(void *, const struct _xmlError *)'} from incompatible pointer type 'void (*)(void *, xmlError *)' {aka 'void (*)(void *, struct _xmlError *)'} [-Wincompatible-pointer-types] 866 | handler.serror = rsvg_xml_noerror; | ^ rsvg-gobject.c: In function 'rsvg_handle_init': rsvg-gobject.c:68:13: warning: Deprecated pre-processor symbol: replace with "G_ADD_PRIVATE" 68 | self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, RSVG_TYPE_HANDLE, RsvgHandlePrivate); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ rsvg-gobject.c: In function 'rsvg_handle_class_init': rsvg-gobject.c:327:5: warning: 'g_type_class_add_private' is deprecated [-Wdeprecated-declarations] 327 | g_type_class_add_private (klass, sizeof (RsvgHandlePrivate)); | ^~~~~~~~~~~~~~~~~~~~~~~~ Here's a patch to fix that error and warning so the package will compile. Note: This old version IS still used in Gentoo, even though it is masked in the gentoo base profile, because it is the last C version before the library switched to rust and it still works for the GTK packages that depend on it. There's a proposal (bug 911991) to allow it be be replaced by an alternative package. Reproducible: Always
Created attachment 911393 [details, diff] Patch to fix GCC 14 -Wincompatible-pointer-types error and -Wdeprecated-declaration warning
(In reply to gen2dev from comment #0)\ > Note: This old version IS still used in Gentoo For the platforms it's keyworded on, think nobody needs it except hppa, s390, and alpha at this point though? Afaik sse2-less x86 is mostly resolved I think, and we even have rust on mips and sparc now. Not to say that it shouldn't be fixed, but its importance has dropped a lot.
(In reply to Ionen Wolkens from comment #2) > (In reply to gen2dev from comment #0)\ > > Note: This old version IS still used in Gentoo > For the platforms it's keyworded on, think nobody needs it except hppa, > s390, and alpha at this point though? Afaik sse2-less x86 is mostly resolved > I think, and we even have rust on mips and sparc now. Or err, we do have s390.. I forget the keyword for that one is only on rust-bin. Thought it was odd given had to fix s390 issues on maturin before.
(imagine alpha wouldn't care too much about losing librsvg+gtk, not sure for hppa though)
I reproduced this with llvm 19, the attached patch enables a successful build.