After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 665266 - SvMAGIC_set not defined for perl-5.8.0
SvMAGIC_set not defined for perl-5.8.0
Status: RESOLVED FIXED
Product: gnome-perl
Classification: Bindings
Component: Glib
unspecified
Other Windows
: Normal normal
: ---
Assigned To: gtk2-perl-bugs
gtk2-perl-bugs
Depends on:
Blocks:
 
 
Reported: 2011-12-01 06:33 UTC by sisyphus1
Modified: 2012-01-07 14:09 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Add a fallback implementation of SvMAGIC_set (1019 bytes, patch)
2011-12-09 23:42 UTC, Torsten Schoenfeld
none Details | Review

Description sisyphus1 2011-12-01 06:33:43 UTC
This report also filed at
https://rt.cpan.org/Ticket/Display.html?id=72830
(by mistake).

Hi,
Not sure when that symbol first arrived on the scene (5.009003 perhaps ?), but it's not be found in my build of perl-5.8.0. Therefore, if we really want Glib to be buildable using 5.8.0 we need the following patch to gperl.h (or something similar).

--- gperl.h_orig	2011-11-30 19:15:41 +1100
+++ gperl.h	2011-11-30 19:33:25 +1100
@@ -36,6 +36,13 @@
 
 #include <glib-object.h>
 
+/* copied from ppport.h */
+#ifndef SvMAGIC_set
+#  define SvMAGIC_set(sv, val)           \
+                STMT_START { assert(SvTYPE(sv) >= SVt_PVMG); \
+                (((XPVMG*) SvANY(sv))->xmg_magic = (val)); } STMT_END
+#endif
+
 /*
  * filenames
  */

Cheers,
Rob
Comment 1 sisyphus1 2011-12-01 06:35:40 UTC
Sorry - I should've specified this applies to version 1.241 of Glib.
No such problem with version 1.224.
Comment 2 Torsten Schoenfeld 2011-12-09 23:42:00 UTC
Created attachment 203173 [details] [review]
Add a fallback implementation of SvMAGIC_set

Interesting.  PPPort says 5.9.3, but my 5.8.8 actually has that macro already.
Regardless, can you try this patch?  Do Glib's and Gtk2's test suites still
pass after this?  (Or, at least, do not fail more tests?)
Comment 3 sisyphus1 2011-12-14 12:51:24 UTC
It's in my 5.8.8, too - probably first appeared in 5.9.3, then backported to 5.8.8. (I'm guessing that 5.8.8 came out *after* 5.9.3).
Switching the definition from gperl.h to GObject.xs (as you have done) also works fine.

Thanks Torsten.

Cheers,
Rob
Comment 4 Torsten Schoenfeld 2012-01-07 14:09:38 UTC
Alright, pushed to master.  I also fixed what perl 5.8.0 considers a syntax error in Glib::GenPod.