Skip Menu |

This queue is for tickets about the Gnome2-Rsvg CPAN distribution.

Report information
The Basics
Id: 133521
Status: resolved
Priority: 0/
Queue: Gnome2-Rsvg

People
Owner: XAOC [...] cpan.org
Requestors: perldev [...] drfasching.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Compile error on librsvg2 v2.48.7
Date: Mon, 12 Oct 2020 18:33:17 +0200
To: bug-Gnome2-Rsvg [...] rt.cpan.org
From: Franz Fasching <perldev [...] drfasching.com>
Dear Gnome2::Rsvg maintainers! Just noticed that the Gnome2::Rsvg module no longer compiles with librsvg2-dev version 2.48.7 installed, as the include file <librsvg/librsvg-enum-types.h> included from rsvg2perl.h no longer exists. Obviously the required enums are defined now already in <librsvg/rsvg.h>. Commenting out or deleting line 28 from rsvg2perl.h: // #include <librsvg/librsvg-enum-types.h> resolves the problem, and the module compiles and installs fine. Thanks for this fine module and best regards, Franz
On Mon Oct 12 12:39:55 2020, perldev@drfasching.com wrote: Show quoted text
> Dear Gnome2::Rsvg maintainers! > > Just noticed that the Gnome2::Rsvg module no longer compiles with > librsvg2-dev version 2.48.7 installed, as the include file > <librsvg/librsvg-enum-types.h> included from rsvg2perl.h no longer > exists.
Hi, thanks for the bug report. Unfortunately, we announced on the mailing list on October 1st [1][2][3] that the Gtk-Perl team will be deprecating the Gnome2::Rsvg module in December of 2020. We'd rather not add the code comment that you suggested, since that's more of a temporary fix than a long term solution. The migration path for Gnome2::Rsvg (as noted in [2]) is to use a Glib::Object::Introspection object to create an Rsvg2::Handle object, and from there you can make calls into librsvg from Perl. Do you need anything else for this ticket, or can it be closed? Thanks! [1] Announcement: https://mail.gnome.org/archives/gtk-perl-list/2020-October/msg00002.html [2] Full list of deprecated modules and their replacements: https://mail.gnome.org/archives/gtk-perl-list/2020-October/msg00003.html [3] Deprecation patches (including Gnome2::Rsvg): https://mail.gnome.org/archives/gtk-perl-list/2020-October/msg00004.html
Subject: Re: [rt.cpan.org #133521] Compile error on librsvg2 v2.48.7
Date: Tue, 13 Oct 2020 11:09:30 +0200
To: bug-Gnome2-Rsvg [...] rt.cpan.org
From: Franz Fasching <perldev [...] drfasching.com>
HI Brian, thanks for the quick response. The depreciation of this module slipped my attention, thanks for the hint. I'll take a look at the Glib::Object::Introspection and Rsvg2::Handle objects. Yes, the ticket can be closed, fine for me. Regards, Franz Am 12.10.20 um 21:18 schrieb Brian Manning via RT: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=133521 > > > On Mon Oct 12 12:39:55 2020, perldev@drfasching.com wrote:
>> Dear Gnome2::Rsvg maintainers! >> >> Just noticed that the Gnome2::Rsvg module no longer compiles with >> librsvg2-dev version 2.48.7 installed, as the include file >> <librsvg/librsvg-enum-types.h> included from rsvg2perl.h no longer >> exists.
> Hi, thanks for the bug report. > > Unfortunately, we announced on the mailing list on October 1st [1][2][3] that the Gtk-Perl team will be deprecating the Gnome2::Rsvg module in December of 2020. We'd rather not add the code comment that you suggested, since that's more of a temporary fix than a long term solution. > > The migration path for Gnome2::Rsvg (as noted in [2]) is to use a Glib::Object::Introspection object to create an Rsvg2::Handle object, and from there you can make calls into librsvg from Perl. > > Do you need anything else for this ticket, or can it be closed? > > Thanks! > > [1] Announcement: https://mail.gnome.org/archives/gtk-perl-list/2020-October/msg00002.html > [2] Full list of deprecated modules and their replacements: https://mail.gnome.org/archives/gtk-perl-list/2020-October/msg00003.html > [3] Deprecation patches (including Gnome2::Rsvg): https://mail.gnome.org/archives/gtk-perl-list/2020-October/msg00004.html >
Marking ticket as 'resolved'. Thanks!
Subject: Re: [rt.cpan.org #133521] Resolved: Compile error on librsvg2 v2.48.7
Date: Wed, 14 Oct 2020 12:11:11 +0200
To: bug-Gnome2-Rsvg [...] rt.cpan.org
From: Franz Fasching <perldev [...] drfasching.com>
Hi Brian, sorry to bother you again, but the new Rsvg methods invoked on the handle obtained via Glib::Object::Introspection do not seem to be call-compatible to the previous Gnome2::Rsvg interface. Doing:   Glib::Object::Introspection->setup                 ( basename => 'Rsvg',                   version => '2.0',                   package => 'Rsvg2',                 );   $handle = Rsvg2::Handle->new();   $handle->write($str); results in:   need an array ref to convert to GArray However, providing just a simple string with SVG XML used to work with Gnome2::Rsvg. If I try to provide the "write" method with an array ref, the following problem occurs (I use Cairo to render the SVG to PDF):   internal problem: GType CairoContext (94611185394944) has not been registered with GPerl at /usr/lib/x86_64-linux-gnu/perl5/5.30/Glib/Object/Introspection.pm line 67. Why does the write method insist on a GArray anyway? Looking at the C function signature, it seems it expects a "const guchar *" according to https://developer.gnome.org/rsvg/stable/RsvgHandle.html#rsvg-handle-write. <https://developer.gnome.org/rsvg/stable/RsvgHandle.html#rsvg-handle-write> Could this be a .typelib problem? Thanks for any hints, Franz Am 13.10.20 um 17:20 schrieb Brian Manning via RT: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=133521 > > > According to our records, your request has been resolved. If you have any > further questions or concerns, please respond to this message.
On Wed Oct 14 06:11:28 2020, perldev@drfasching.com wrote: Show quoted text
> Hi Brian, > > sorry to bother you again, but the new Rsvg methods invoked on the > handle obtained via Glib::Object::Introspection do not seem to be > call-compatible to the previous Gnome2::Rsvg interface.
Hi, it's probably better to ask this question on the mailing list; I don't have an answer to your question, and someone on the list may have one, and this RT queue is for Gnome2::Rsvg, and not Glib::Object::Introspection.
Subject: Re: [rt.cpan.org #133521] Resolved: Compile error on librsvg2 v2.48.7
Date: Wed, 14 Oct 2020 20:43:40 +0200
To: bug-Gnome2-Rsvg [...] rt.cpan.org
From: Torsten Schoenfeld <torsten.schoenfeld [...] gmx.de>
Brian is right that this is better discussed on the mailing list or on GNOME Discourse. But since we're here already: On 14.10.20 12:11, Franz Fasching via RT wrote: Show quoted text
> sorry to bother you again, but the new Rsvg methods invoked on the > handle obtained via Glib::Object::Introspection do not seem to be > call-compatible to the previous Gnome2::Rsvg interface. Doing: > >   Glib::Object::Introspection->setup >                 ( basename => 'Rsvg', >                   version => '2.0', >                   package => 'Rsvg2', >                 ); >   $handle = Rsvg2::Handle->new(); >   $handle->write($str); > > results in: > >   need an array ref to convert to GArray > > However, providing just a simple string with SVG XML used to work with > Gnome2::Rsvg.
write() is annotated with "[array length=count][element-type guchar]", so we expect an array ref. We could automatically use something like map ord, split //, $string if a string is given, but since that also has performance implications, we don't do this. Show quoted text
> If I try to provide the "write" method with an array ref, the following > problem occurs (I use Cairo to render the SVG to PDF): > >   internal problem: GType CairoContext (94611185394944) has not been > registered with GPerl at > /usr/lib/x86_64-linux-gnu/perl5/5.30/Glib/Object/Introspection.pm line 67.
Sounds like you need to use Cairo::GObject. -Torsten
Subject: Re: [rt.cpan.org #133521] Resolved: Compile error on librsvg2 v2.48.7
Date: Thu, 15 Oct 2020 11:09:15 +0200
To: bug-Gnome2-Rsvg [...] rt.cpan.org
From: Franz Fasching <perldev [...] drfasching.com>
Show quoted text
> Brian is right that this is better discussed on the mailing list or or> GNOME Discourse. But since we're here already:
Thanks Torsten for jumping in. Already posted on the mailing list. Show quoted text
> write() is annotated with "[array length=count][element-type guchar]", > so we expect an array ref. We could automatically use something like > map ord, split //, $string if a string is given, but since that also has > performance implications, we don't do this.
Right, I don't want to do this either for large SVG XML docs. Gnome2::Rsvg XS for rsvg_handle_write looks like: ## gboolean rsvg_handle_write (RsvgHandle *handle, const guchar *buf, gsize count, GError **error) gboolean rsvg_handle_write (handle, data) RsvgHandle *handle SV *data PREINIT: const guchar *buf = NULL; STRLEN len; GError *error = NULL; CODE: buf = (const guchar *) SvPV (data, len); RETVAL = rsvg_handle_write (handle, buf, len, &error); if (error) gperl_croak_gerror (NULL, error); OUTPUT: RETVAL "data" can be passed as a simple SV, whose length is determined by XS code. Can something similar be achieved with G::O::I? Show quoted text
> Sounds like you need to use Cairo::GObject.
Thanks for the hint, will try. -Franz