Qt on Raspberry Pi - QXmlAttributes differs from the implicit declaration



  • Hello!
    Recently I've been following the guide https://wiki.qt.io/Raspberry_Pi_Beginners_Guide and everything went fine, until I've had to build the Qtbase. I ran the configuration and next step is make command. And this is output of this command:

    In file included from ../../include/QtXml/qxml.h:1:0,
                     from dom/qdom.cpp:54:
    ../../include/QtXml/../../src/xml/sax/qxml.h:121:5: error: function ‘QXmlAttributes::QXmlAttributes(QXmlAttributes&&)’ defaulted on its first declaration with an exception-specification that differs from the implicit declaration ‘QXmlAttributes::QXmlAttributes(QXmlAttributes&&)’
    Makefile:1338: recipe for target '.obj/qdom.o' failed
    make[2]: *** [.obj/qdom.o] Error 1
    make[2]: Leaving directory '/home/anon/opt/qt5/qtbase/src/xml'
    Makefile:295: recipe for target 'sub-xml-make_first' failed
    make[1]: *** [sub-xml-make_first] Error 2
    make[1]: Leaving directory '/home/anon/opt/qt5/qtbase/src'
    Makefile:46: recipe for target 'sub-src-make_first' failed
    make: *** [sub-src-make_first] Error 2
    

    To be honest, I have no idea how to handle that problem.
    Some details:
    Host: Debian Jessie 64 bit
    Raspi 3 Raspbian installed from the guide
    Qt version from github (link in guide)

    Thank You in advance for spending you precius time!



  • @tmaczek said in Qt on Raspberry Pi - QXmlAttributes differs from the implicit declaration:

    Qt version from github

    Qt official repository is not github, it's http://code.qt.io could you try with that one?

    You might also want to take a look at https://forum.qt.io/topic/73531/cross-compile-qt-5-on-pi-2-undefined-reference-to-pcre_get_stringtable_entries/2



  • Thank you for your response! Here i come with the answer:

    Qt official repository is not github, it's http://code.qt.io could you try with that one?

    Yes, I meant "Qt from git". I tried with that link:

    git clone git://code.qt.io/qt/qt5.git
    

    (from guide). Do you know what is the possible cause of these errors?

    You might also want to take a look at https://forum.qt.io/topic/73531/cross-compile-qt-5-on-pi-2-undefined-reference-to-pcre_get_stringtable_entries/2

    I used this script Qtrpi, but I got alot of errors: http://pastebin.com/JjXJtyQD
    But I personally would like to use the original step-by-step guide rather than automation script.

    Thanks in advance!



  • I guess you cross-compile on a host. I once tried to cross-compile a newer Qt version for Pi while my host had an older release installed. Although I tried to keep both source trees well separated, i never managed to get a successful build. Then I started from scratch with Qt5.6.2 for both host and Raspberry and everything went fine.
    Probably you use unintentionally header and implementation files from different Qt versions.
    Please double check you -sysroot in the configure command line and which sources are visible from where you execute configure.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.