Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Cross compiling for Raspberry Error
Forum Update on Monday, May 27th 2025

Cross compiling for Raspberry Error

Scheduled Pinned Locked Moved Solved General and Desktop
7 Posts 4 Posters 2.6k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    Pilot.Rockstar
    wrote on 10 Nov 2016, 04:11 last edited by
    #1

    hello guys,
    This is my first post in that amazing forum :p

    I wanted to cross compile QT 4.8 in my RPi3B from my Linux 16.04LTS so I've followed the Tutorial https://wiki.qt.io/Raspberry_Pi_Beginners_Guide to make it, But i got some errors while i was doing the make -j 4

    here is the error:

    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:1493 : la recette pour la cible « .obj/qdom.o » a échouée
    make[2]: *** [.obj/qdom.o] Erreur 1
    make[2] : on quitte le répertoire « /home/dayaa/opt/qt5/qtbase/src/xml »
    Makefile:307 : la recette pour la cible « sub-xml-install_subtargets » a échouée
    make[1]: *** [sub-xml-install_subtargets] Erreur 2
    make[1] : on quitte le répertoire « /home/dayaa/opt/qt5/qtbase/src »
    Makefile:58 : la recette pour la cible « sub-src-install_subtargets » a échouée
    make: *** [sub-src-install_subtargets] Erreur 2
    
    

    Any help would be Appriciated!!

    thank you guys

    K 1 Reply Last reply 10 Nov 2016, 10:50
    0
    • P Pilot.Rockstar
      10 Nov 2016, 04:11

      hello guys,
      This is my first post in that amazing forum :p

      I wanted to cross compile QT 4.8 in my RPi3B from my Linux 16.04LTS so I've followed the Tutorial https://wiki.qt.io/Raspberry_Pi_Beginners_Guide to make it, But i got some errors while i was doing the make -j 4

      here is the error:

      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:1493 : la recette pour la cible « .obj/qdom.o » a échouée
      make[2]: *** [.obj/qdom.o] Erreur 1
      make[2] : on quitte le répertoire « /home/dayaa/opt/qt5/qtbase/src/xml »
      Makefile:307 : la recette pour la cible « sub-xml-install_subtargets » a échouée
      make[1]: *** [sub-xml-install_subtargets] Erreur 2
      make[1] : on quitte le répertoire « /home/dayaa/opt/qt5/qtbase/src »
      Makefile:58 : la recette pour la cible « sub-src-install_subtargets » a échouée
      make: *** [sub-src-install_subtargets] Erreur 2
      
      

      Any help would be Appriciated!!

      thank you guys

      K Offline
      K Offline
      koahnig
      wrote on 10 Nov 2016, 10:50 last edited by
      #2

      @Pilot.Rockstar

      HI and welcome to devnet forum

      This line looks very strange respectively suspoious to me

      ../../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&&)’
      

      Verify if you can find this as it is shown in the file.

      Where did you get the source of Qt 4.8 from?

      The official source for Qt version 4.8.6 is here ready for download.

      You may use a changed version of Qt source. I have no raspberry experience, but I know sometimes you have to make slight changes.

      Vote the answer(s) that helped you to solve your issue(s)

      N 1 Reply Last reply 22 Jan 2017, 00:25
      1
      • P Offline
        P Offline
        Pilot.Rockstar
        wrote on 10 Nov 2016, 15:37 last edited by
        #3

        thank you buddy for the Answer, The problem was in the Source that i've downloaded from their .git so i've downloaded Qt 5.7 but now still have a problem with Qt3D that didn't crosscompile!

        Thanx for help :)

        1 Reply Last reply
        0
        • K koahnig
          10 Nov 2016, 10:50

          @Pilot.Rockstar

          HI and welcome to devnet forum

          This line looks very strange respectively suspoious to me

          ../../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&&)’
          

          Verify if you can find this as it is shown in the file.

          Where did you get the source of Qt 4.8 from?

          The official source for Qt version 4.8.6 is here ready for download.

          You may use a changed version of Qt source. I have no raspberry experience, but I know sometimes you have to make slight changes.

          N Offline
          N Offline
          nbkhwjm
          wrote on 22 Jan 2017, 00:25 last edited by
          #4

          @koahnig

          This issue also occurs in the latest QT5 --> git://code.qt.io/qt/qt5.git

          /home/nbkhwjm/opt/gcc-4.7-linaro-rpi-gnueabihf/bin/arm-linux-gnueabihf-g++ -c -include .pch/Qt5Xml -pipe -marm -mfpu=vfp -mtune=arm1176jzf-s -march=armv6zk -mabi=aapcs-linux -mfloat-abi=hard --sysroot=/mnt/rasp-pi-rootfs -O2 -std=c++11 -fvisibility=hidden -fvisibility-inlines-hidden -fno-exceptions -Wall -W -Wvla -D_REENTRANT -fPIC -DQT_NO_USING_NAMESPACE -DQT_NO_FOREACH -DQT_BUILD_XML_LIB -DQT_BUILDING_QT -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x050000 -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_CORE_LIB -I. -I../../include -I../../include/QtXml -I../../include/QtXml/5.8.1 -I../../include/QtXml/5.8.1/QtXml -I../../include/QtCore/5.8.1 -I../../include/QtCore/5.8.1/QtCore -I../../include/QtCore -I.moc -I../../mkspecs/devices/linux-rasp-pi-g++ -o .obj/qdom.o dom/qdom.cpp
          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:1350: recipe for target '.obj/qdom.o' failed
          make[2]: *** [.obj/qdom.o] Error 1
          make[2]: Leaving directory '/home/nbkhwjm/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/nbkhwjm/opt/qt5/qtbase/src'
          Makefile:46: recipe for target 'sub-src-make_first' failed
          make: *** [sub-src-make_first] Error 2

          any ideas to this error?

          K 1 Reply Last reply 22 Jan 2017, 09:52
          0
          • N nbkhwjm
            22 Jan 2017, 00:25

            @koahnig

            This issue also occurs in the latest QT5 --> git://code.qt.io/qt/qt5.git

            /home/nbkhwjm/opt/gcc-4.7-linaro-rpi-gnueabihf/bin/arm-linux-gnueabihf-g++ -c -include .pch/Qt5Xml -pipe -marm -mfpu=vfp -mtune=arm1176jzf-s -march=armv6zk -mabi=aapcs-linux -mfloat-abi=hard --sysroot=/mnt/rasp-pi-rootfs -O2 -std=c++11 -fvisibility=hidden -fvisibility-inlines-hidden -fno-exceptions -Wall -W -Wvla -D_REENTRANT -fPIC -DQT_NO_USING_NAMESPACE -DQT_NO_FOREACH -DQT_BUILD_XML_LIB -DQT_BUILDING_QT -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x050000 -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_CORE_LIB -I. -I../../include -I../../include/QtXml -I../../include/QtXml/5.8.1 -I../../include/QtXml/5.8.1/QtXml -I../../include/QtCore/5.8.1 -I../../include/QtCore/5.8.1/QtCore -I../../include/QtCore -I.moc -I../../mkspecs/devices/linux-rasp-pi-g++ -o .obj/qdom.o dom/qdom.cpp
            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:1350: recipe for target '.obj/qdom.o' failed
            make[2]: *** [.obj/qdom.o] Error 1
            make[2]: Leaving directory '/home/nbkhwjm/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/nbkhwjm/opt/qt5/qtbase/src'
            Makefile:46: recipe for target 'sub-src-make_first' failed
            make: *** [sub-src-make_first] Error 2

            any ideas to this error?

            K Offline
            K Offline
            koahnig
            wrote on 22 Jan 2017, 09:52 last edited by
            #5

            @nbkhwjm

            The only recommendation from my side is using Qt 5.7.
            According to @Pilot-Rockstar at least up to Qt3D component.

            Also you should check the compiler you are using. Personally I have made the experince that due to compilers for cross-compilation lagging back in versions issues with newest Qt releases may have problems.

            Vote the answer(s) that helped you to solve your issue(s)

            N 1 Reply Last reply 22 Jan 2017, 19:37
            1
            • K koahnig
              22 Jan 2017, 09:52

              @nbkhwjm

              The only recommendation from my side is using Qt 5.7.
              According to @Pilot-Rockstar at least up to Qt3D component.

              Also you should check the compiler you are using. Personally I have made the experince that due to compilers for cross-compilation lagging back in versions issues with newest Qt releases may have problems.

              N Offline
              N Offline
              nbkhwjm
              wrote on 22 Jan 2017, 19:37 last edited by
              #6

              @koahnig

              I was able to get farther along in the build..

              Errors in build with -Wdate-time is not supported
              first, there are a ton of errors from the -Wdate-time parameter thrown by the compiler. Since we are using the linaro 4.7 cross compiler, they are not supported.. I opened the ./qtbase/mkspecs/features/qt_common.prf and commented out all the lines that added -Wdate-time to the makefiles.. This prevents the copiler errors

              error: function ‘QXmlAttributes::QXmlAttributes(QXmlAttributes&&)’ defaulted on its first declaration with an exception-specification that differs from the implicit declaration ‘QXmlAttributes::QXmlAttributes(QXmlAttributes&&)’

              I opened the /qt5/qtbase/src/xml/sax/qxml.h file and removed and changed:
              QXmlAttributes(QXmlAttributes &&) Q_DECL_NOTHROW = default

              to

              QXmlAttributes(QXmlAttributes &&) = default

              then it compiled

              Im sure there are better ways to do this taking into account macros for the compiler im using, but this got me through it..

              J 1 Reply Last reply 5 Mar 2017, 23:28
              2
              • N nbkhwjm
                22 Jan 2017, 19:37

                @koahnig

                I was able to get farther along in the build..

                Errors in build with -Wdate-time is not supported
                first, there are a ton of errors from the -Wdate-time parameter thrown by the compiler. Since we are using the linaro 4.7 cross compiler, they are not supported.. I opened the ./qtbase/mkspecs/features/qt_common.prf and commented out all the lines that added -Wdate-time to the makefiles.. This prevents the copiler errors

                error: function ‘QXmlAttributes::QXmlAttributes(QXmlAttributes&&)’ defaulted on its first declaration with an exception-specification that differs from the implicit declaration ‘QXmlAttributes::QXmlAttributes(QXmlAttributes&&)’

                I opened the /qt5/qtbase/src/xml/sax/qxml.h file and removed and changed:
                QXmlAttributes(QXmlAttributes &&) Q_DECL_NOTHROW = default

                to

                QXmlAttributes(QXmlAttributes &&) = default

                then it compiled

                Im sure there are better ways to do this taking into account macros for the compiler im using, but this got me through it..

                J Offline
                J Offline
                jinseiseito
                wrote on 5 Mar 2017, 23:28 last edited by
                #7

                @nbkhwjm Thank you for the trick for QXmlAttributes....
                It was very helpful.
                As I corrected that error, another error related to "eglfs". I managed to solve that by using the "-no-eglfs" flag while configuring qtbase (as I am not using eglfs in the qt application to be developped). I hope that will not break any thing !

                1 Reply Last reply
                0

                • Login

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • Users
                • Groups
                • Search
                • Get Qt Extensions
                • Unsolved