cannot make GdkRectangle synonymous to the unregistered type CairoRectangleInt at C:/msys64/mingw64/lib/perl5/site_perl/Gtk3.pm line 479.

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

cannot make GdkRectangle synonymous to the unregistered type CairoRectangleInt at C:/msys64/mingw64/lib/perl5/site_perl/Gtk3.pm line 479.

gtk-perl-list
A single-line Perl command like:

perl -e "use Gtk3;"

Results in the following error:

cannot make GdkRectangle synonymous to the unregistered type CairoRectangleInt at C:/msys64/mingw64/lib/perl5/site_perl/Gtk3.pm line 479.


Below is the relevant info:

perl -V
Summary of my perl5 (revision 5 version 22 subversion 0) configuration:

  Platform:
    osname=MSWin32, osvers=10.0, archname=MSWin32-x64-multi-thread

On MSYS2 /MinGW64 20161025 updated via pacman -Syu

Other Modules:
Glib 1.327
Glib::Object::Introspection 0.045
Cairo 1.106
Cairo::GObject 1.004
Pango 1.227
Gtk2 1.24992


Commenting out these lines in Gtk3.pm:
 479   Glib::Object::Introspection->_register_boxed_synonym (
 480   "cairo", "RectangleInt", "gdk_rectangle_get_type");

"fixes" the problem.

In the BOOT: section of CairoGObject.xs in Cairo::GObject, this exists:
gperl_register_boxed (CAIRO_GOBJECT_TYPE_RECTANGLE_INT, "Cairo::RectangleInt", &rectangle_int_wrapper_class);

So, I am not sure what Gtk3 is complaining about, but BEGIN fails, and that's the end of it.

For testing I use the scripts here:
https://github.com/dave-theunsub/gtk3-perl-demos

When I comment out the lines as above, most of thsese scripts appear to work.

Thanks

_______________________________________________
gtk-perl-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtk-perl-list
Reply | Threaded
Open this post in threaded view
|

Re: cannot make GdkRectangle synonymous to the unregistered type CairoRectangleInt at C:/msys64/mingw64/lib/perl5/site_perl/Gtk3.pm line 479.

Torsten Schoenfeld
On 23.05.2018 11:03, [hidden email] wrote:
> A single-line Perl command like:
>
> perl -e "use Gtk3;"
>
> Results in the following error:
>
> cannot make GdkRectangle synonymous to the unregistered type CairoRectangleInt at C:/msys64/mingw64/lib/perl5/site_perl/Gtk3.pm line 479.

Haven't seen that one before.  The only possible reasons I can think of
are: a) Cairo::GObject is linked against a different cairo-gobject
library than the one Gtk3/Glib::Object::Introspection see at runtime, or
b) there's a race condition between the BOOT section in Cairo::GObject
and the import sub in Gtk3.

With the attached patches, what's the output of "perl -e'use Gtk3'" on
your system?

On mine, it is:

# perl -e'use Gtk3'
Cairo::GObject: registering 94192984588768 (CairoRectangleInt)
Glib: trying to look up 94192984588768 (CairoRectangleInt)

_______________________________________________
gtk-perl-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtk-perl-list

cairo-debug.patch (670 bytes) Download Attachment
glib-debug.patch (421 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: cannot make GdkRectangle synonymous to the unregistered type CairoRectangleInt at C:/msys64/mingw64/lib/perl5/site_perl/Gtk3.pm line 479.

gtk-perl-list
With the patches below I get:

perl -e "use Gtk3;"

Cairo::GObject: registering 44919376 (CairoRectangleInt)
Glib: trying to look up 63302960 (CairoRectangleInt)
cannot make GdkRectangle synonymous to the unregistered type CairoRectangleInt at C:/msys64/mingw64/lib/perl5/site_perl/Gtk3.pm line 479.
BEGIN failed--compilation aborted at -e line 1.

When I comment out the line below in CairoGObject.xs I still get the same result.

283     // gperl_register_boxed (CAIRO_GOBJECT_TYPE_RECTANGLE_INT, "Cairo::RectangleInt", &rectangle_int_wrapper_class);


On Sat, May 26, 2018 at 08:10:33PM +0200, Torsten Schoenfeld wrote:

> On 23.05.2018 11:03, [hidden email] wrote:
> >A single-line Perl command like:
> >
> >perl -e "use Gtk3;"
> >
> >Results in the following error:
> >
> >cannot make GdkRectangle synonymous to the unregistered type CairoRectangleInt at C:/msys64/mingw64/lib/perl5/site_perl/Gtk3.pm line 479.
>
> Haven't seen that one before.  The only possible reasons I can think
> of are: a) Cairo::GObject is linked against a different
> cairo-gobject library than the one Gtk3/Glib::Object::Introspection
> see at runtime, or b) there's a race condition between the BOOT
> section in Cairo::GObject and the import sub in Gtk3.
>
> With the attached patches, what's the output of "perl -e'use Gtk3'"
> on your system?
>
> On mine, it is:
>
> # perl -e'use Gtk3'
> Cairo::GObject: registering 94192984588768 (CairoRectangleInt)
> Glib: trying to look up 94192984588768 (CairoRectangleInt)

> diff --git a/CairoGObject.xs b/CairoGObject.xs
> index ab1c70b..23428a3 100644
> --- a/CairoGObject.xs
> +++ b/CairoGObject.xs
> @@ -283,6 +283,7 @@ BOOT:
>                        &surface_wrapper_class);
>   gperl_register_boxed (CAIRO_GOBJECT_TYPE_RECTANGLE, "Cairo::Rectangle",
>                        &rectangle_wrapper_class);
> + warn ("Cairo::GObject: registering %ld (%s)\n", CAIRO_GOBJECT_TYPE_RECTANGLE_INT, g_type_name (CAIRO_GOBJECT_TYPE_RECTANGLE_INT));
>   gperl_register_boxed (CAIRO_GOBJECT_TYPE_RECTANGLE_INT, "Cairo::RectangleInt",
>                        &rectangle_int_wrapper_class);
>   gperl_register_boxed (CAIRO_GOBJECT_TYPE_REGION, "Cairo::Region",

> diff --git a/GBoxed.xs b/GBoxed.xs
> index 5c726aa..1b623df 100644
> --- a/GBoxed.xs
> +++ b/GBoxed.xs
> @@ -287,6 +287,7 @@ gperl_register_boxed_synonym (GType registered_gtype,
>  
>   G_LOCK (info_by_gtype);
>  
> + warn ("Glib: trying to look up %ld (%s)\n", registered_gtype, g_type_name (registered_gtype));
>   registered_boxed_info = (BoxedInfo *)
>   g_hash_table_lookup (info_by_gtype, (gpointer) registered_gtype);
>  

> _______________________________________________
> gtk-perl-list mailing list
> [hidden email]
> https://mail.gnome.org/mailman/listinfo/gtk-perl-list

_______________________________________________
gtk-perl-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtk-perl-list
Reply | Threaded
Open this post in threaded view
|

Re: cannot make GdkRectangle synonymous to the unregistered type CairoRectangleInt at C:/msys64/mingw64/lib/perl5/site_perl/Gtk3.pm line 479.

gtk-perl-list
In reply to this post by Torsten Schoenfeld
I has anyone else seen this or been able to do anything about it?


On Sat, May 26, 2018 at 08:10:33PM +0200, Torsten Schoenfeld wrote:

> On 23.05.2018 11:03, [hidden email] wrote:
> >A single-line Perl command like:
> >
> >perl -e "use Gtk3;"
> >
> >Results in the following error:
> >
> >cannot make GdkRectangle synonymous to the unregistered type CairoRectangleInt at C:/msys64/mingw64/lib/perl5/site_perl/Gtk3.pm line 479.
>
> Haven't seen that one before.  The only possible reasons I can think
> of are: a) Cairo::GObject is linked against a different
> cairo-gobject library than the one Gtk3/Glib::Object::Introspection
> see at runtime, or b) there's a race condition between the BOOT
> section in Cairo::GObject and the import sub in Gtk3.
>
> With the attached patches, what's the output of "perl -e'use Gtk3'"
> on your system?
>
> On mine, it is:
>
> # perl -e'use Gtk3'
> Cairo::GObject: registering 94192984588768 (CairoRectangleInt)
> Glib: trying to look up 94192984588768 (CairoRectangleInt)

> diff --git a/CairoGObject.xs b/CairoGObject.xs
> index ab1c70b..23428a3 100644
> --- a/CairoGObject.xs
> +++ b/CairoGObject.xs
> @@ -283,6 +283,7 @@ BOOT:
>                        &surface_wrapper_class);
>   gperl_register_boxed (CAIRO_GOBJECT_TYPE_RECTANGLE, "Cairo::Rectangle",
>                        &rectangle_wrapper_class);
> + warn ("Cairo::GObject: registering %ld (%s)\n", CAIRO_GOBJECT_TYPE_RECTANGLE_INT, g_type_name (CAIRO_GOBJECT_TYPE_RECTANGLE_INT));
>   gperl_register_boxed (CAIRO_GOBJECT_TYPE_RECTANGLE_INT, "Cairo::RectangleInt",
>                        &rectangle_int_wrapper_class);
>   gperl_register_boxed (CAIRO_GOBJECT_TYPE_REGION, "Cairo::Region",

> diff --git a/GBoxed.xs b/GBoxed.xs
> index 5c726aa..1b623df 100644
> --- a/GBoxed.xs
> +++ b/GBoxed.xs
> @@ -287,6 +287,7 @@ gperl_register_boxed_synonym (GType registered_gtype,
>  
>   G_LOCK (info_by_gtype);
>  
> + warn ("Glib: trying to look up %ld (%s)\n", registered_gtype, g_type_name (registered_gtype));
>   registered_boxed_info = (BoxedInfo *)
>   g_hash_table_lookup (info_by_gtype, (gpointer) registered_gtype);
>  

> _______________________________________________
> gtk-perl-list mailing list
> [hidden email]
> https://mail.gnome.org/mailman/listinfo/gtk-perl-list

_______________________________________________
gtk-perl-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtk-perl-list