Skip Menu |
 

This queue is for tickets about the Qt CPAN distribution.

Report information
The Basics
Id: 98790
Status: new
Priority: 0/
Queue: Qt

People
Owner: Nobody in particular
Requestors: ppisar [...] redhat.com
Cc:
AdminCc:

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

Attachments
perlqt-4.14.2-Use-a-copy-of-the-Qt-AutoLoad-AUTOLOAD-variable.patch
Qt-0.96.0-Bundle-Devel-Peel-SvREFCNT_inc-removed-from-perl-5.2.patch



Subject: Tests fail with perl-5.20.0: "SvREFCNT_inc" is not exported by the Devel::Peek module
Download (untitled) / with headers
text/plain 1.6k
Perl-5.20's Devel::Peek removed SvREFCNT_inc and SvREFCNT_dec as commented in <https://rt.perl.org/Public/Bug/Display.html?id=117793#txn-1227501> by this commit: commit da1929e7566d4399b20541f8609bd48b40663034 Author: Tony Cook <tony@develop-help.com> Date: Fri Aug 9 11:41:26 2013 +1000 [perl #117793] remove dangerous functions and improve SvREFCNT() This allows Devel::Peek::SvREFCNT() to work on any variable, not just scalars, but has a chance of breaking backward compatibility. Also changes the type of SvREFCNT() to U32 to match the type returned by the underlying macro This causes Qt tests failure: $ prove -b -v "/home/test/fedora/perl-Qt/Qt-0.96.0/qtcore/t/a_loading.t" /home/test/fedora/perl-Qt/Qt-0.96.0/qtcore/t/a_loading.t .. 1..2 ok 1 - use QtCore4; not ok 2 - use QtGui4; # Failed test 'use QtGui4;' # at /home/test/fedora/perl-Qt/Qt-0.96.0/qtcore/t/a_loading.t line 3. # Tried to use 'QtGui4'. # Error: "SvREFCNT_inc" is not exported by the Devel::Peek module # Can't continue after import errors at /home/test/fedora/perl-Qt/Qt-0.96.0/build/blib/lib/QtGui4.pm line 25. # BEGIN failed--compilation aborted at /home/test/fedora/perl-Qt/Qt-0.96.0/build/blib/lib/QtGui4.pm line 25. # Compilation failed in require at /home/test/fedora/perl-Qt/Qt-0.96.0/qtcore/t/a_loading.t line 3. # BEGIN failed--compilation aborted at /home/test/fedora/perl-Qt/Qt-0.96.0/qtcore/t/a_loading.t line 3. # Looks like you failed 1 test of 2. Dubious, test returned 1 (wstat 256, 0x100) Failed 1/2 subtests And because the Devel::Peek::SvREFCNT_inc is used by the library code, even the library cannot be compiled.
From: ppisar [...] redhat.com
Download (untitled) / with headers
text/plain 296b
Dne Čt 11.zář.2014 10:26:46, ppisar napsal(a): Show quoted text
> Perl-5.20's Devel::Peek removed SvREFCNT_inc and SvREFCNT_dec as > commented in > <https://rt.perl.org/Public/Bug/Display.html?id=117793#txn-1227501> by > this commit: >
Attached patch comes from Ubuntu which reimplements the missing function.
Subject: Qt-0.96.0-Bundle-Devel-Peel-SvREFCNT_inc-removed-from-perl-5.2.patch
From 1f62c5d8dd589e7131df0b378513148375e41317 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com> Date: Thu, 11 Sep 2014 16:48:39 +0200 Subject: [PATCH] Bundle Devel::Peel::SvREFCNT_inc removed from perl-5.20.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Patch taken from Ubuntu: perlqt (4:4.14.0-0ubuntu4) utopic; urgency=medium * Devel::Peek in Perl 5.20 no longer exports SvREFCNT_inc, so put a copy in QtGui4::_internal instead. Fixes perlkde build. -- Colin Watson <cjwatson@ubuntu.com> Tue, 26 Aug 2014 14:13:07 -0700 CPAN RT#98790 Signed-off-by: Petr Písař <ppisar@redhat.com> --- qtgui/lib/QtGui4.pm | 3 +-- qtgui/src/QtGui4.xs | 7 +++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/qtgui/lib/QtGui4.pm b/qtgui/lib/QtGui4.pm index a33f66a..2fae3d7 100644 --- a/qtgui/lib/QtGui4.pm +++ b/qtgui/lib/QtGui4.pm @@ -22,7 +22,6 @@ use warnings; use QtCore4; use base qw(Qt::_internal); -use Devel::Peek qw( SvREFCNT_inc ); sub init { @Qt::_internal::vectorTypes{qw(Qt::Polygon Qt::PolygonF Qt::ItemSelection)} @@ -76,7 +75,7 @@ sub Qt::GraphicsObject::ON_DESTROY { } sub Qt::UndoCommand::ON_DESTROY { - Devel::Peek::SvREFCNT_inc( Qt::this() ); + QtGui4::_internal->SvREFCNT_inc( Qt::this() ); # XXX is there a better solution here? return 1; } diff --git a/qtgui/src/QtGui4.xs b/qtgui/src/QtGui4.xs index e1a0783..3a23ad4 100644 --- a/qtgui/src/QtGui4.xs +++ b/qtgui/src/QtGui4.xs @@ -91,6 +91,13 @@ getEnumList() OUTPUT: RETVAL +SV* +SvREFCNT_inc(sv) + SV* sv + PPCODE: + RETVAL = SvREFCNT_inc(sv); + PUSHs(RETVAL); + MODULE = QtGui4 PACKAGE = QtGui4 PROTOTYPES: ENABLE -- 1.9.3
From: ppisar [...] redhat.com
Download (untitled) / with headers
text/plain 908b
Dne Čt 11.zář.2014 11:14:57, ppisar napsal(a): Show quoted text
> Dne Čt 11.zář.2014 10:26:46, ppisar napsal(a):
> > Perl-5.20's Devel::Peek removed SvREFCNT_inc and SvREFCNT_dec as > > commented in > > <https://rt.perl.org/Public/Bug/Display.html?id=117793#txn-1227501> by > > this commit: > >
> Attached patch comes from Ubuntu which reimplements the missing function.
Agter applying the patch, only two tests remain failing. There is a problem when using == operator for the second time: perl -Ibuild/blib/{arch,lib} -e 'use QtGui4; $a = Qt::Point(5,7); $a == $a; $a == $a;' --- Error: Method does not exist or not provided by this binding: QPoint::operator==(), called at -e line 1 'use QtCore4::debug qw(ambiguous)' for more information. --- Error: Method does not exist or not provided by this binding: QGlobalSpace::QGlobalSpace(), called at -e line 1 'use QtCore4::debug qw(ambiguous)' for more information.
From: ppisar [...] redhat.com
Download (untitled) / with headers
text/plain 709b
Dne Pá 12.zář.2014 03:57:38, ppisar napsal(a): Show quoted text
> Agter applying the patch, only two tests remain failing. There is a > problem when using == operator for the second time: > > perl -Ibuild/blib/{arch,lib} -e 'use QtGui4; $a = Qt::Point(5,7); $a > == $a; $a == $a;' > --- Error: Method does not exist or not provided by this binding: > QPoint::operator==(), > called at -e line 1 > 'use QtCore4::debug qw(ambiguous)' for more information. > --- Error: Method does not exist or not provided by this binding: > QGlobalSpace::QGlobalSpace(), > called at -e line 1 > 'use QtCore4::debug qw(ambiguous)' for more information.
This can be fixed by an attached commit from <git://anongit.kde.org/perlqt>. -- Petr
Subject: perlqt-4.14.2-Use-a-copy-of-the-Qt-AutoLoad-AUTOLOAD-variable.patch
From 1b665848e178301344386717c658386d160d222a Mon Sep 17 00:00:00 2001 From: Chris Burel <chrisburel@gmail.com> Date: Fri, 31 Oct 2014 11:23:18 -0700 Subject: [PATCH] Use a copy of the Qt::AutoLoad::AUTOLOAD variable. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This appears to be a change in Perl's behavior. The way the operator overloading in PerlQt works is that it first tries to find an operator method on the class itself, and then next it tries to find one in the so-called QGlobalSpace, which is a place defined by the smoke library for global Qt functions. Perl passes the underlying XS code the full package and function being called, which PerlQt splits into 2 strings, one for the package name, and one for the method name. PerlQt null-terminates the package name string, and in previous versions of Perl, this modification did not affect the source $AUTOLOAD variable. In Perl 5.20.0, it does update the Perl variable, and then causes confusion down the line. https://bugzilla.redhat.com/show_bug.cgi?id=1136340 https://bugs.kde.org/show_bug.cgi?id=340518 Signed-off-by: Petr Písař <ppisar@redhat.com> --- qtcore/src/util.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qtcore/src/util.cpp b/qtcore/src/util.cpp index a163e7e..b913af3 100644 --- a/qtcore/src/util.cpp +++ b/qtcore/src/util.cpp @@ -2047,7 +2047,7 @@ XS(XS_AUTOLOAD) { PERL_SET_CONTEXT(PL_curinterp); // Figure out which package and method is being called, based on the // autoload variable - SV* autoload = get_sv( "Qt::AutoLoad::AUTOLOAD", TRUE ); + SV* autoload = sv_mortalcopy( get_sv( "Qt::AutoLoad::AUTOLOAD", TRUE ) ); char* package = SvPV_nolen( autoload ); char* methodname = 0; // Splits off the method name from the package -- 1.9.3


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.