Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 944392 - gnome-base/librsvg-2.40.21 compile fails with GCC 14 due to assignment from incompatible pointer type
Summary: gnome-base/librsvg-2.40.21 compile fails with GCC 14 due to assignment from i...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Linux Gnome Desktop Team
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks: c99-porting
  Show dependency tree
 
Reported: 2024-11-22 05:03 UTC by gen2dev
Modified: 2025-03-14 14:04 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch to fix GCC 14 -Wincompatible-pointer-types error and -Wdeprecated-declaration warning (librsvg-2.40.21_gcc-14-compat.patch,2.35 KB, patch)
2024-11-22 05:07 UTC, gen2dev
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description gen2dev 2024-11-22 05:03:55 UTC
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
Comment 1 gen2dev 2024-11-22 05:07:02 UTC
Created attachment 911393 [details, diff]
Patch to fix GCC 14 -Wincompatible-pointer-types error and -Wdeprecated-declaration warning
Comment 2 Ionen Wolkens gentoo-dev 2024-11-22 05:58:22 UTC
(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.
Comment 3 Ionen Wolkens gentoo-dev 2024-11-22 06:05:11 UTC
(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.
Comment 4 Ionen Wolkens gentoo-dev 2024-11-22 06:06:59 UTC
(imagine alpha wouldn't care too much about losing librsvg+gtk, not sure for hppa though)
Comment 5 Vic Kerr (wikky) 2025-03-14 14:04:43 UTC
I reproduced this with llvm 19, the attached patch enables a successful build.