Bug 1136340 - perl-Qt-0.96.0-12.fc22: FTBFS with Perl 5.20
Summary: perl-Qt-0.96.0-12.fc22: FTBFS with Perl 5.20
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: perl-Qt
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Petr Pisar
QA Contact: Fedora Extras Quality Assurance
URL: https://koji.fedoraproject.org/koji/t...
Whiteboard:
Depends On:
Blocks: 1143844
TreeView+ depends on / blocked
 
Reported: 2014-09-02 11:33 UTC by Jitka Plesnikova
Modified: 2014-11-03 15:00 UTC (History)
8 users (show)

Fixed In Version: perl-Qt-0.96.0-13.fc22
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-11-03 09:31:38 UTC
Type: Bug


Attachments (Terms of Use)
build.log (247.20 KB, text/plain)
2014-09-02 11:33 UTC, Jitka Plesnikova
no flags Details
root.log (113.61 KB, text/plain)
2014-09-02 11:33 UTC, Jitka Plesnikova
no flags Details
Fix for the SvREFCNT_inc issue (1.75 KB, patch)
2014-09-11 15:57 UTC, Petr Pisar
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
CPAN 98790 0 None None None Never
KDE Software Compilation 340518 0 None None None Never

Description Jitka Plesnikova 2014-09-02 11:33:26 UTC
Created attachment 933729 [details]
build.log

perl-Qt can't be rebuilt against perl 5.20, because tests failed.


+ make test
Running tests...
/usr/bin/ctest --force-new-ctest-process 
Test project /builddir/build/BUILD/Qt-0.96.0/build
      Start  1: perlqt_qtcore4_load
 1/26 Test  #1: perlqt_qtcore4_load ..............***Failed    0.26 sec
      Start  2: perlqt_qabstractitemmodel
 2/26 Test  #2: perlqt_qabstractitemmodel ........   Passed    0.26 sec
      Start  3: perlqt_qt3support4_load
 3/26 Test  #3: perlqt_qt3support4_load ..........***Failed    0.26 sec
      Start  4: perlqt_qtdbus4_load
 4/26 Test  #4: perlqt_qtdbus4_load ..............   Passed    0.25 sec
      Start  5: perlqt_qtdeclarative4_load
 5/26 Test  #5: perlqt_qtdeclarative4_load .......   Passed    0.25 sec
      Start  6: perlqt_qtgui4_load
 6/26 Test  #6: perlqt_qtgui4_load ...............***Failed    0.25 sec
      Start  7: perlqt_qpolygon
 7/26 Test  #7: perlqt_qpolygon ..................***Failed    0.23 sec
      Start  8: perlqt_qpolygonf
 8/26 Test  #8: perlqt_qpolygonf .................***Failed    0.24 sec
      Start  9: perlqt_qstringlistmodel
 9/26 Test  #9: perlqt_qstringlistmodel ..........***Failed    0.24 sec
      Start 10: perlqt_qthelp4_load
10/26 Test #10: perlqt_qthelp4_load ..............   Passed    0.24 sec
      Start 11: perlqt_qtmultimedia4_load
11/26 Test #11: perlqt_qtmultimedia4_load ........   Passed    0.29 sec
      Start 12: perlqt_qtnetwork4_load
12/26 Test #12: perlqt_qtnetwork4_load ...........   Passed    0.25 sec
      Start 13: perlqt_qtopengl4_load
13/26 Test #13: perlqt_qtopengl4_load ............   Passed    0.26 sec
      Start 14: perlqt_qtscript4_load
14/26 Test #14: perlqt_qtscript4_load ............   Passed    0.25 sec
      Start 15: perlqt_qtsql4_load
15/26 Test #15: perlqt_qtsql4_load ...............   Passed    0.25 sec
      Start 16: perlqt_qtsvg4_load
16/26 Test #16: perlqt_qtsvg4_load ...............   Passed    0.24 sec
      Start 17: perlqt_qttest4_load
17/26 Test #17: perlqt_qttest4_load ..............   Passed    0.24 sec
      Start 18: perlqt_qtesteventlist
18/26 Test #18: perlqt_qtesteventlist ............***Failed    0.23 sec
      Start 19: perlqt_qtuitools4_load
19/26 Test #19: perlqt_qtuitools4_load ...........   Passed    0.24 sec
      Start 20: perlqt_qtwebkit4_load
20/26 Test #20: perlqt_qtwebkit4_load ............   Passed    0.27 sec
      Start 21: perlqt_qtxml4_load
21/26 Test #21: perlqt_qtxml4_load ...............   Passed    0.25 sec
      Start 22: perlqt_qtxmlpatterns4_load
22/26 Test #22: perlqt_qtxmlpatterns4_load .......   Passed    0.25 sec
      Start 23: perlqt_phonon_load
23/26 Test #23: perlqt_phonon_load ...............   Passed    0.25 sec
      Start 24: perlqt_qsci_load
24/26 Test #24: perlqt_qsci_load .................   Passed    0.25 sec
      Start 25: perlqt_qwt_load
25/26 Test #25: perlqt_qwt_load ..................   Passed    0.26 sec
      Start 26: perlqt_qimageblitz_load
26/26 Test #26: perlqt_qimageblitz_load ..........   Passed    0.24 sec
73% tests passed, 7 tests failed out of 26
Total Test time (real) =   6.54 sec
The following tests FAILED:
	  1 - perlqt_qtcore4_load (Failed)
	  3 - perlqt_qt3support4_load (Failed)
	  6 - perlqt_qtgui4_load (Failed)
	  7 - perlqt_qpolygon (Failed)
	  8 - perlqt_qpolygonf (Failed)
	  9 - perlqt_qstringlistmodel (Failed)
	 18 - perlqt_qtesteventlist (Failed)
Errors while running CTest
Makefile:120: recipe for target 'test' failed
make: *** [test] Error 8

Comment 1 Jitka Plesnikova 2014-09-02 11:33:58 UTC
Created attachment 933730 [details]
root.log

Comment 2 Petr Pisar 2014-09-11 14:00:45 UTC
Verbose example of the failure (see Testing/Temporary/LastTest.log):

[test@fedora-22 build]$ 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 

Test Summary Report
-------------------
/home/test/fedora/perl-Qt/Qt-0.96.0/qtcore/t/a_loading.t (Wstat: 256 Tests: 2 Failed: 1)
  Failed test:  2
  Non-zero exit status: 1
Files=1, Tests=2,  0 wallclock secs ( 0.04 usr  0.02 sys +  0.10 cusr  0.07 csys =  0.23 CPU)
Result: FAIL

Debian delivers SVN snapshot from kde.org.

Comment 3 Petr Pisar 2014-09-11 14:20:22 UTC
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

Comment 4 Petr Pisar 2014-09-11 14:23:54 UTC
(In reply to Petr Pisar from comment #2)
> 
> Debian delivers SVN snapshot from kde.org.

Actually Debian has no fix. They disabled the tests :(

Comment 5 Petr Pisar 2014-09-11 15:57:38 UTC
Created attachment 936607 [details]
Fix for the SvREFCNT_inc issue

This patch fixes the missing refcounter.

Then all tests pass except two of them:

7/26 Testing: perlqt_qpolygon
7/26 Test: perlqt_qpolygon
Command: "/bin/prove" "/home/test/fedora/perl-Qt/Qt-0.96.0/qtgui/t/qpolygon.t"
Directory: /home/test/fedora/perl-Qt/Qt-0.96.0/build/qtgui/t
"perlqt_qpolygon" start time: Sep 11 17:49 CEST
Output:
----------------------------------------------------------
--- Error: Method does not exist or not provided by this binding:
QPoint::operator==(),
called at /home/test/fedora/perl-Qt/Qt-0.96.0/qtgui/t/qpolygon.t line 26
--- Error: Method does not exist or not provided by this binding:
QGlobalSpace::QGlobalSpace(),
called at /home/test/fedora/perl-Qt/Qt-0.96.0/qtgui/t/qpolygon.t line 26
# Looks like you planned 32 tests but ran 5.
# Looks like your test exited with 255 just after 5.
/home/test/fedora/perl-Qt/Qt-0.96.0/qtgui/t/qpolygon.t .. 
Dubious, test returned 255 (wstat 65280, 0xff00)
Failed 27/32 subtests 

Test Summary Report
-------------------
/home/test/fedora/perl-Qt/Qt-0.96.0/qtgui/t/qpolygon.t (Wstat: 65280 Tests: 5 Failed: 0)
  Non-zero exit status: 255
  Parse errors: Bad plan.  You planned 32 tests but ran 5.
Files=1, Tests=5,  1 wallclock secs ( 0.04 usr  0.02 sys +  0.21 cusr  0.09 csys =  0.36 CPU)
Result: FAIL
<end of output>
Test time =   0.51 sec
----------------------------------------------------------
Test Failed.
"perlqt_qpolygon" end time: Sep 11 17:49 CEST
"perlqt_qpolygon" time elapsed: 00:00:00
----------------------------------------------------------

8/26 Testing: perlqt_qpolygonf
8/26 Test: perlqt_qpolygonf
Command: "/bin/prove" "/home/test/fedora/perl-Qt/Qt-0.96.0/qtgui/t/qpolygonf.t"
Directory: /home/test/fedora/perl-Qt/Qt-0.96.0/build/qtgui/t
"perlqt_qpolygonf" start time: Sep 11 17:49 CEST
Output:
----------------------------------------------------------
--- Error: Method does not exist or not provided by this binding:
QPointF::operator==(),
called at /home/test/fedora/perl-Qt/Qt-0.96.0/qtgui/t/qpolygonf.t line 26
--- Error: Method does not exist or not provided by this binding:
QGlobalSpace::QGlobalSpace(),
called at /home/test/fedora/perl-Qt/Qt-0.96.0/qtgui/t/qpolygonf.t line 26
# Looks like you planned 32 tests but ran 5.
# Looks like your test exited with 255 just after 5.
/home/test/fedora/perl-Qt/Qt-0.96.0/qtgui/t/qpolygonf.t .. 
Dubious, test returned 255 (wstat 65280, 0xff00)
Failed 27/32 subtests 

Test Summary Report
-------------------
/home/test/fedora/perl-Qt/Qt-0.96.0/qtgui/t/qpolygonf.t (Wstat: 65280 Tests: 5 Failed: 0)
  Non-zero exit status: 255
  Parse errors: Bad plan.  You planned 32 tests but ran 5.
Files=1, Tests=5,  0 wallclock secs ( 0.03 usr  0.02 sys +  0.23 cusr  0.07 csys =  0.35 CPU)
Result: FAIL
<end of output>
Test time =   0.51 sec
----------------------------------------------------------
Test Failed.
"perlqt_qpolygonf" end time: Sep 11 17:49 CEST
"perlqt_qpolygonf" time elapsed: 00:00:00
----------------------------------------------------------

Comment 6 Sergio Basto 2014-09-20 03:10:13 UTC
As usual is not perl-Qt build that fails but tests

Could we skipped check section and build perlQt and other dependent packages ?

Comment 7 Ralf Corsepius 2014-09-22 05:03:58 UTC
(In reply to Sergio Monteiro Basto from comment #6)
> Could we skipped check section and build perlQt and other dependent packages
> ?
In general, this is a bad idea. It would only be reasonable to do so (or selectively switch off individual tests), if one is 100% sure a package's testsuite is failing because of bugs in the testsuite itself and not because a test triggers/reveils a bug inside of a package.

AFAIU, in this case, the testsuite trips over perl-5.2x incompatibilities and actual bugs in perl-Qt. I.e. disabling test rsp. the testsuite would just let the package appear functional, while it actually is broken.

So, no, I do not think it would be reasonable to disable the testsuite.

Comment 8 Petr Pisar 2014-10-06 12:57:40 UTC
There are two bugs in the perl-Qt. The first one relying on a removed function can be fixed by attached patch.

The second one remaining is not working overloaded == operator. More specifically, using == for second time on a QPoint object throws an exception. I don't know if this is a bug in perl-Qt or Perl, but this is a bug which makes perl-Qt faulty and I agree with Ralf that package in this state should not be delivered by the Fedora.

I recommend to perl-Qt's maintainer to ask KDE developers for a help because the code is currently maintained by them. The CPAN release is abandoned. KDE should release the code and perl-Qt maintainer should use that source instead. (However I believe that even current KDE's code does not work with perl 5.20.)

Comment 9 Chris 2014-10-31 18:32:30 UTC
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.

I've pushed both Petr's change, and a change to fix this issue, to the master branch in perlqt's git repo at git://anongit.kde.org/perlqt.  Can someone try it out?

Comment 10 Petr Pisar 2014-11-03 09:09:15 UTC
Thanks for the fix. It works on the ancient 0.96 version. I will try to test the git tree too. Do you release tar balls? It would help us a lot.

Comment 11 Petr Pisar 2014-11-03 10:01:09 UTC
The git tree configures against Qt4:

[...]
-----------------------------------------------------------------------------
-- The following external packages were located on your system.
-- This installation will have the extra features provided by these packages.
-----------------------------------------------------------------------------
   * QScintilla2 - QScintilla2 libraries
   * QImageBlitz - QImageBlitz library
   * Phonon - Phonon multimedia framework
   * Qwt5 for Qt4 - Qwt5 libraries for Qt4

-----------------------------------------------------------------------------
-- Congratulations! All external packages have been found.
-----------------------------------------------------------------------------


and builds successfully besides one warning:

/tmp/perlqt/qtcore/src/util.cpp: In function ‘void XS_AUTOLOAD(PerlInterpreter*, CV*)’:
/tmp/perlqt/qtcore/src/util.cpp:2254:59: warning: converting ‘false’ to pointer type ‘void*’ [-Wconversion-null]
         static smokeperl_object nothis = { 0, 0, 0, false };

but almost all tests fail:

[...]
3% tests passed, 30 tests failed out of 31

The log shows:

#   Failed test 'use QtCore4;'
#   at /tmp/perlqt/qtcore/t/a_loading.t line 2.
#     Tried to use 'QtCore4'.
#     Error:  Can't locate QtCore4.pm in @INC (you may need to install the QtCore4 module) (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at /tmp/perlqt/qtcore/t/a_loading.t line 2.
# BEGIN failed--compilation aborted at /tmp/perlqt/qtcore/t/a_loading.t line 2.

Obviously the tests are run without setting perl search path to the just compiled code. If I run the tests as:

$ PERL5LIB=$PWD/blib/arch:$PWD/blib/lib make test

Then the results are much better hover, not hundred-percent:

The following tests FAILED:
          2 - perlqt_qtcore4_qapp (Failed)
          3 - perlqt_qtcore4_sigslot (Failed)
          4 - perlqt_qtcore4_sigslot_inherit (Failed)
          5 - perlqt_qtcore4_handlers (Failed)
         22 - perlqt_qsignalspy (Failed)

That's because the tests require accessible X11 server:

Command: "/bin/prove" "/tmp/perlqt/qtcore/t/c_qapp.t"
Directory: /tmp/perlqt/qtcore/t
"perlqt_qtcore4_qapp" start time: Nov 03 10:52 CET
Output:
----------------------------------------------------------
c_qapp.t: cannot connect to X server

When running the tests against Xvfb, then all the tests pass.

So the only issue is the missing path to the Perl modules.

Comment 12 Chris 2014-11-03 15:00:48 UTC
I could never figure out if the normal workflow is to run make install before or after make test. So I added a config var for it. When running cmake, you can specify -DUSE_BUILD_DIR_FOR_TESTS=TRUE, and then it should adjust the PERL5LIB for you.


Note You need to log in before you can comment on or make changes to this bug.