Bug 351525 - Build failure
Summary: Build failure
Status: RESOLVED FIXED
Alias: None
Product: umbrello
Classification: Applications
Component: general (show other bugs)
Version: Git
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Umbrello Development Group
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-08-20 14:36 UTC by Christoph Feck
Modified: 2016-01-26 14:51 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christoph Feck 2015-08-20 14:36:45 UTC
Trying to build the master branch with -DBUILD_KF5=ON I get this error:

In file included from /local/qt5/include/QtTest/qtest.h:38:0,
                 from /local/qt5/include/QtTest/QtTest:7,
                 from /local/git/KDE/sdk/umbrello/unittests/testbase.h:26,
                 from /local/git/KDE/sdk/umbrello/unittests/TEST_cppwriter.h:24,
                 from /local/git/KDE/sdk/umbrello/unittests/TEST_cppwriter.cpp:21:
/local/qt5/include/QtTest/qtestcase.h: In instantiation of 'bool QTest::qCompare(const T&, const T&, const char*, const char*, const char*, int) [with T = Uml::ProgrammingLanguage::Enum]':
/local/git/KDE/sdk/umbrello/unittests/TEST_cppwriter.cpp:44:5:   required from here
/local/qt5/include/QtTest/qtestcase.h:320:87: error: cannot convert 'QString' to 'char*' for argument '3' to 'bool QTest::compare_helper(bool, const char*, char*, char*, const char*, const char*, const char*, int)'
                               toString(t1), toString(t2), actual, expected, file, line);
                                                                                       ^
make[2]: *** [unittests/CMakeFiles/TEST_cppwriter.dir/TEST_cppwriter.cpp.o] Error 1
make[2]: Target `unittests/CMakeFiles/TEST_cppwriter.dir/build' not remade because of errors.
make[1]: *** [unittests/CMakeFiles/TEST_cppwriter.dir/all] Error 2
/local/git/KDE/sdk/umbrello/unittests/TEST_pythonwriter.cpp: In member function 'void TEST_pythonwriter::test_writeClass()':
/local/git/KDE/sdk/umbrello/unittests/TEST_pythonwriter.cpp:51:19: warning: variable 'attr' set but not used [-Wunused-but-set-variable]
     UMLAttribute* attr;
                   ^
In file included from /local/qt5/include/QtTest/qtest.h:38:0,
                 from /local/qt5/include/QtTest/QtTest:7,
                 from /local/git/KDE/sdk/umbrello/unittests/testbase.h:26,
                 from /local/git/KDE/sdk/umbrello/unittests/TEST_pythonwriter.h:24,
                 from /local/git/KDE/sdk/umbrello/unittests/TEST_pythonwriter.cpp:21:
/local/qt5/include/QtTest/qtestcase.h: In instantiation of 'bool QTest::qCompare(const T&, const T&, const char*, const char*, const char*, int) [with T = Uml::ProgrammingLanguage::Enum]':
/local/git/KDE/sdk/umbrello/unittests/TEST_pythonwriter.cpp:44:5:   required from here
/local/qt5/include/QtTest/qtestcase.h:320:87: error: cannot convert 'QString' to 'char*' for argument '3' to 'bool QTest::compare_helper(bool, const char*, char*, char*, const char*, const char*, const char*, int)'
                               toString(t1), toString(t2), actual, expected, file, line);
                                                                                       ^
make[2]: *** [unittests/CMakeFiles/TEST_pythonwriter.dir/TEST_pythonwriter.cpp.o] Error 1
make[2]: Target `unittests/CMakeFiles/TEST_pythonwriter.dir/build' not remade because of errors.
make[1]: *** [unittests/CMakeFiles/TEST_pythonwriter.dir/all] Error 2
In file included from /local/qt5/include/QtTest/qtest.h:38:0,
                 from /local/qt5/include/QtTest/QtTest:7,
                 from /local/git/KDE/sdk/umbrello/unittests/testbase.h:26,
                 from /local/git/KDE/sdk/umbrello/unittests/TEST_umlobject.h:24,
                 from /local/git/KDE/sdk/umbrello/unittests/TEST_umlobject.cpp:21:
/local/qt5/include/QtTest/qtestcase.h: In instantiation of 'bool QTest::qCompare(const T&, const T&, const char*, const char*, const char*, int) [with T = Uml::Visibility::Enum]':
/local/git/KDE/sdk/umbrello/unittests/TEST_umlobject.cpp:203:5:   required from here
/local/qt5/include/QtTest/qtestcase.h:320:87: error: cannot convert 'QString' to 'char*' for argument '3' to 'bool QTest::compare_helper(bool, const char*, char*, char*, const char*, const char*, const char*, int)'
                               toString(t1), toString(t2), actual, expected, file, line);
                                                                                       ^
make[2]: *** [unittests/CMakeFiles/TEST_umlobject.dir/TEST_umlobject.cpp.o] Error 1
make[2]: Target `unittests/CMakeFiles/TEST_umlobject.dir/build' not remade because of errors.
make[1]: *** [unittests/CMakeFiles/TEST_umlobject.dir/all] Error 2
make[1]: Target `all' not remade because of errors.
make: *** [all] Error 2
make: Target `default_target' not remade because of errors.
-- Failed: umbrello
Comment 1 Ralf Habacker 2015-08-20 14:43:53 UTC
(In reply to Christoph Feck from comment #0)
> Trying to build the master branch with -DBUILD_KF5=ON I get this error:
 
> /local/qt5/include/QtTest/qtestcase.h:320:87: error: cannot convert
> 'QString' to 'char*' for argument '3' to 'bool QTest::compare_helper(bool,
> const char*, char*, char*, const char*, const char*, const char*, int)'
>                                toString(t1), toString(t2), actual, expected,
> file, line);
>                                                                             
Curious, no problem here on opensuse 13.1

$ qmake-qt5 --version
QMake version 3.0
Using Qt version 5.4.2 in /usr/lib64
Comment 2 Christoph Feck 2015-08-20 17:10:38 UTC
> /local/qt5/bin/qmake --version
QMake version 3.0
Using Qt version 5.6.0 in /local/qt5/lib

(current 5.6 branch, but I also got the error with 5.5 branch)
Comment 3 Ralf Habacker 2015-08-21 06:35:11 UTC
(In reply to Christoph Feck from comment #0)
> Trying to build the master branch with -DBUILD_KF5=ON I get this error:
> /local/git/KDE/sdk/umbrello/unittests/TEST_cppwriter.cpp:21:
> /local/qt5/include/QtTest/qtestcase.h: In instantiation of 'bool
> QTest::qCompare(const T&, const T&, const char*, const char*, const char*,
> int) [with T = Uml::ProgrammingLanguage::Enum]':
> /local/git/KDE/sdk/umbrello/unittests/TEST_cppwriter.cpp:44:5:   required
> from here
line 43ff is 
    Uml::ProgrammingLanguage::Enum lang = cpp->language();
    QCOMPARE(lang, Uml::ProgrammingLanguage::Cpp);

Any idea what has been changed in Qt > 5.4 that this simple check does not work ?
Comment 4 Ralf Habacker 2015-08-22 17:51:05 UTC
(In reply to Ralf Habacker from comment #3)
> (In reply to Christoph Feck from comment #0)
> > Trying to build the master branch with -DBUILD_KF5=ON I get this error:
> > /local/git/KDE/sdk/umbrello/unittests/TEST_cppwriter.cpp:21:
> > /local/qt5/include/QtTest/qtestcase.h: In instantiation of 'bool
> > QTest::qCompare(const T&, const T&, const char*, const char*, const char*,
> > int) [with T = Uml::ProgrammingLanguage::Enum]':
> > /local/git/KDE/sdk/umbrello/unittests/TEST_cppwriter.cpp:44:5:   required
> > from here
> line 43ff is 
>     Uml::ProgrammingLanguage::Enum lang = cpp->language();
>     QCOMPARE(lang, Uml::ProgrammingLanguage::Cpp);
> 
> Any idea what has been changed in Qt > 5.4 that this simple check does not
> work ?
Looks like a local problem. 
Building umbrello with qt 5.5 on KDE build system works without any issue, see https://build.kde.org/job/umbrello%20frameworks%20kf5-qt5/PLATFORM=Linux,compiler=gcc/5/consoleFull
17:21:09 ==== qt5 - Branch 5.5
Comment 5 Christoph Feck 2015-08-22 18:09:57 UTC
Are you sure the CI setup is correct? If it tries to build the frameworks branch, it should not work, because there is no frameworks branch.
Comment 6 Christoph Feck 2015-08-22 18:54:49 UTC
Error probably is in Qt testlib macros.
Comment 7 Ralf Habacker 2015-12-17 11:33:23 UTC
After updating umbrello frameworks branch this issue is still present with jenkis ci.
A local build with Qt 5.4 does not show this issue. 

I did a few tries to get the issue fixed

first http://commits.kde.org/umbrello/ce9c5fd6f0d018534fc3cb04f6391fe8959aff5d, which shows on the next build an issue with Uml::Visibility::Enum, so I guessed to fix the issues in a generic way by providing related top level toString() functions here  http://commits.kde.org/umbrello/132d4498dcc73b25f95045b8fa0d9daff22a3977.

But this fails too. Any idea how to fix ?
Comment 8 Ralf Habacker 2015-12-18 19:44:23 UTC
Git commit 637efcae299d96a4131dfca86402f30493b200d0 by Ralf Habacker.
Committed on 18/12/2015 at 19:44.
Pushed by habacker into branch 'Applications/15.12'.

Another try to fix jenkins CI build issue.

M  +8    -0    unittests/TEST_cppwriter.cpp
M  +8    -0    unittests/TEST_umlobject.cpp

http://commits.kde.org/umbrello/637efcae299d96a4131dfca86402f30493b200d0
Comment 9 Ralf Habacker 2015-12-18 21:56:25 UTC
Git commit f996593e44f11901b63c0d913c28b59886a48a0c by Ralf Habacker.
Committed on 18/12/2015 at 21:54.
Pushed by habacker into branch 'Applications/15.12'.

Try to fix bug Qt5 based compiling test case problems on jenkins CI system by using QVERIFY instead of QCOMPARE.

M  +1    -9    unittests/TEST_cppwriter.cpp
M  +1    -1    unittests/TEST_pythonwriter.cpp
M  +5    -13   unittests/TEST_umlobject.cpp

http://commits.kde.org/umbrello/f996593e44f11901b63c0d913c28b59886a48a0c
Comment 10 Christoph Feck 2016-01-26 14:51:33 UTC
Thanks. Fix verified.