Cross Compilation error



  • Hello Guys,

    I am cross-compiling the qt 5.13.1 in 64-bit Ubuntu PC.

    Target platform is Phytec WEGA Board (AM335X - core).

    I use "arm-cortexa8-linux-gnueabihf" Toolchain for cross compilation.

    Following configuration i have used to buid qt :-

    ./configure -opensource -confirm-license -platform linux-arm-cortex-gnueabihf-g++ -device linux-arm-cortex-gnueabihf-g++ -device-option CROSS_COMPILE=/home/tdp0009/Teq_Projects/Aug_2019/HMI/Phytec_Toolchain/arm-cortexa8-linux-gnueabihf/bin/arm-cortexa8-linux-gnueabihf- -sysroot /media/tdp0009/rootfs -make libs -prefix ~/Teq_Projects/Aug_2019/HMI/QT/qt_source_hmi/Build_For_Phytec -v -no-use-gold-linker -no-gbm -opengl es2 
    

    and during compilation i face following error.

    root@tdp0009-desktop:/home/tdp0009/Teq_Projects/Aug_2019/HMI/QT/qt_source_hmi/qt-everywhere-src-5.13.1# 
    root@tdp0009-desktop:/home/tdp0009/Teq_Projects/Aug_2019/HMI/QT/qt_source_hmi/qt-everywhere-src-5.13.1# ./configure -opensource -confirm-license -platform linux-arm-cortex-gnueabihf-g++ -device linux-arm-cortex-gnueabihf-g++ -device-option CROSS_COMPILE=/home/tdp0009/Teq_Projects/Aug_2019/HMI/Phytec_Toolchain/arm-cortexa8-linux-gnueabihf/bin/arm-cortexa8-linux-gnueabihf- -sysroot /media/tdp0009/rootfs -make libs -prefix ~/Teq_Projects/Aug_2019/HMI/QT/qt_source_hmi/Build_For_Phytec -v -no-use-gold-linker -no-gbm -opengl es2 
    + cd qtbase
    + /home/tdp0009/Teq_Projects/Aug_2019/HMI/QT/qt_source_hmi/qt-everywhere-src-5.13.1/qtbase/configure -top-level -opensource -confirm-license -platform linux-arm-cortex-gnueabihf-g++ -device linux-arm-cortex-gnueabihf-g++ -device-option CROSS_COMPILE=/home/tdp0009/Teq_Projects/Aug_2019/HMI/Phytec_Toolchain/arm-cortexa8-linux-gnueabihf/bin/arm-cortexa8-linux-gnueabihf- -sysroot /media/tdp0009/rootfs -make libs -prefix /root/Teq_Projects/Aug_2019/HMI/QT/qt_source_hmi/Build_For_Phytec -v -no-use-gold-linker -no-gbm -opengl es2
    Creating qmake...
    arm-cortexa8-linux-gnueabihf-g++ -c -o qrandom.o   -std=c++11 -ffunction-sections -fdata-sections -g -g  -I/home/tdp0009/Teq_Projects/Aug_2019/HMI/QT/qt_source_hmi/qt-everywhere-src-5.13.1/qtbase/qmake -I/home/tdp0009/Teq_Projects/Aug_2019/HMI/QT/qt_source_hmi/qt-everywhere-src-5.13.1/qtbase/qmake/library -I/home/tdp0009/Teq_Projects/Aug_2019/HMI/QT/qt_source_hmi/qt-everywhere-src-5.13.1/qtbase/qmake/generators -I/home/tdp0009/Teq_Projects/Aug_2019/HMI/QT/qt_source_hmi/qt-everywhere-src-5.13.1/qtbase/qmake/generators/unix -I/home/tdp0009/Teq_Projects/Aug_2019/HMI/QT/qt_source_hmi/qt-everywhere-src-5.13.1/qtbase/qmake/generators/win32 -I/home/tdp0009/Teq_Projects/Aug_2019/HMI/QT/qt_source_hmi/qt-everywhere-src-5.13.1/qtbase/qmake/generators/mac -I/home/tdp0009/Teq_Projects/Aug_2019/HMI/QT/qt_source_hmi/qt-everywhere-src-5.13.1/qtbase/include -I/home/tdp0009/Teq_Projects/Aug_2019/HMI/QT/qt_source_hmi/qt-everywhere-src-5.13.1/qtbase/include/QtCore -I/home/tdp0009/Teq_Projects/Aug_2019/HMI/QT/qt_source_hmi/qt-everywhere-src-5.13.1/qtbase/include/QtCore/5.13.1 -I/home/tdp0009/Teq_Projects/Aug_2019/HMI/QT/qt_source_hmi/qt-everywhere-src-5.13.1/qtbase/include/QtCore/5.13.1/QtCore -I../src/corelib/global -I/home/tdp0009/Teq_Projects/Aug_2019/HMI/QT/qt_source_hmi/qt-everywhere-src-5.13.1/qtbase/mkspecs/linux-arm-cortex-gnueabihf-g++ -DQT_VERSION_STR=\"5.13.1\" -DQT_VERSION_MAJOR=5 -DQT_VERSION_MINOR=13 -DQT_VERSION_PATCH=1 -DQT_BUILD_QMAKE -DQT_BOOTSTRAPPED -DPROEVALUATOR_FULL -DQT_NO_FOREACH /home/tdp0009/Teq_Projects/Aug_2019/HMI/QT/qt_source_hmi/qt-everywhere-src-5.13.1/qtbase/src/corelib/global/qrandom.cpp
    In file included from /home/tdp0009/Teq_Projects/Aug_2019/HMI/QT/qt_source_hmi/qt-everywhere-src-5.13.1/qtbase/src/corelib/global/qrandom.cpp:43:0:
    /home/tdp0009/Teq_Projects/Aug_2019/HMI/QT/qt_source_hmi/qt-everywhere-src-5.13.1/qtbase/src/corelib/global/qrandom.h:204:9: error: 'is_trivially_destructible' is not a member of 'std'
    /home/tdp0009/Teq_Projects/Aug_2019/HMI/QT/qt_source_hmi/qt-everywhere-src-5.13.1/qtbase/src/corelib/global/qrandom.h:204:9: error: '::value' has not been declared
    /home/tdp0009/Teq_Projects/Aug_2019/HMI/QT/qt_source_hmi/qt-everywhere-src-5.13.1/qtbase/src/corelib/global/qrandom.h:204:9: error: expected primary-expression before 'bool'
    /home/tdp0009/Teq_Projects/Aug_2019/HMI/QT/qt_source_hmi/qt-everywhere-src-5.13.1/qtbase/src/corelib/global/qrandom.h:204:9: error: expected ',' before 'bool'
    /home/tdp0009/Teq_Projects/Aug_2019/HMI/QT/qt_source_hmi/qt-everywhere-src-5.13.1/qtbase/src/corelib/global/qrandom.h:204:9: error: expected string-literal before 'bool'
    /home/tdp0009/Teq_Projects/Aug_2019/HMI/QT/qt_source_hmi/qt-everywhere-src-5.13.1/qtbase/src/corelib/global/qrandom.h:204:9: error: expected ')' before 'bool'
    Makefile:315: recipe for target 'qrandom.o' failed
    make: *** [qrandom.o] Error 1
    

    what is error says?

    can you guys please help me to sort out this error?

    i am waiting for reply.


  • Moderators

    Some STD functions are missing, which might mean several things:

    • your (cross-)compiler is too old. Make sure it completely supports C++11 standard (GCC 4.9 and newer)
    • your cross-compilation toolchain is incomplete and lacks some STD library headers


  • @sierdzio

    Thank You For your quick response.

    can you please suggest me the latest tool-chain link that are supported c++11 and gcc 4.9?

    looking forward hearing from you.

    thank you once again



  • @sierdzio

    I am trying to cross compile the qt 5.13.1 with following cross-compilation toolchain.

    gcc-linaro-7.4.1-2019.02-x86_64_arm-linux-gnueabihf
    

    and i face following error

    arm-linux-gnueabihf-g++ -c -o qlocale_unix.o   -std=c++11 -ffunction-sections -fdata-sections -g -g  -I/home/tdp0009/Teq_Projects/Aug_2019/HMI/QT/qt_source_hmi/qt-everywhere-src-5.13.1/qtbase/qmake -I/home/tdp0009/Teq_Projects/Aug_2019/HMI/QT/qt_source_hmi/qt-everywhere-src-5.13.1/qtbase/qmake/library -I/home/tdp0009/Teq_Projects/Aug_2019/HMI/QT/qt_source_hmi/qt-everywhere-src-5.13.1/qtbase/qmake/generators -I/home/tdp0009/Teq_Projects/Aug_2019/HMI/QT/qt_source_hmi/qt-everywhere-src-5.13.1/qtbase/qmake/generators/unix -I/home/tdp0009/Teq_Projects/Aug_2019/HMI/QT/qt_source_hmi/qt-everywhere-src-5.13.1/qtbase/qmake/generators/win32 -I/home/tdp0009/Teq_Projects/Aug_2019/HMI/QT/qt_source_hmi/qt-everywhere-src-5.13.1/qtbase/qmake/generators/mac -I/home/tdp0009/Teq_Projects/Aug_2019/HMI/QT/qt_source_hmi/qt-everywhere-src-5.13.1/qtbase/include -I/home/tdp0009/Teq_Projects/Aug_2019/HMI/QT/qt_source_hmi/qt-everywhere-src-5.13.1/qtbase/include/QtCore -I/home/tdp0009/Teq_Projects/Aug_2019/HMI/QT/qt_source_hmi/qt-everywhere-src-5.13.1/qtbase/include/QtCore/5.13.1 -I/home/tdp0009/Teq_Projects/Aug_2019/HMI/QT/qt_source_hmi/qt-everywhere-src-5.13.1/qtbase/include/QtCore/5.13.1/QtCore -I../src/corelib/global -I/home/tdp0009/Teq_Projects/Aug_2019/HMI/QT/qt_source_hmi/qt-everywhere-src-5.13.1/qtbase/mkspecs/arm-linux-gnueabihf-g++ -DQT_VERSION_STR=\"5.13.1\" -DQT_VERSION_MAJOR=5 -DQT_VERSION_MINOR=13 -DQT_VERSION_PATCH=1 -DQT_BUILD_QMAKE -DQT_BOOTSTRAPPED -DPROEVALUATOR_FULL -DQT_NO_FOREACH /home/tdp0009/Teq_Projects/Aug_2019/HMI/QT/qt_source_hmi/qt-everywhere-src-5.13.1/qtbase/src/corelib/tools/qlocale_unix.cpp
    arm-linux-gnueabihf-g++ -c -o qlibraryinfo.o   -std=c++11 -ffunction-sections -fdata-sections -g -g  -I/home/tdp0009/Teq_Projects/Aug_2019/HMI/QT/qt_source_hmi/qt-everywhere-src-5.13.1/qtbase/qmake -I/home/tdp0009/Teq_Projects/Aug_2019/HMI/QT/qt_source_hmi/qt-everywhere-src-5.13.1/qtbase/qmake/library -I/home/tdp0009/Teq_Projects/Aug_2019/HMI/QT/qt_source_hmi/qt-everywhere-src-5.13.1/qtbase/qmake/generators -I/home/tdp0009/Teq_Projects/Aug_2019/HMI/QT/qt_source_hmi/qt-everywhere-src-5.13.1/qtbase/qmake/generators/unix -I/home/tdp0009/Teq_Projects/Aug_2019/HMI/QT/qt_source_hmi/qt-everywhere-src-5.13.1/qtbase/qmake/generators/win32 -I/home/tdp0009/Teq_Projects/Aug_2019/HMI/QT/qt_source_hmi/qt-everywhere-src-5.13.1/qtbase/qmake/generators/mac -I/home/tdp0009/Teq_Projects/Aug_2019/HMI/QT/qt_source_hmi/qt-everywhere-src-5.13.1/qtbase/include -I/home/tdp0009/Teq_Projects/Aug_2019/HMI/QT/qt_source_hmi/qt-everywhere-src-5.13.1/qtbase/include/QtCore -I/home/tdp0009/Teq_Projects/Aug_2019/HMI/QT/qt_source_hmi/qt-everywhere-src-5.13.1/qtbase/include/QtCore/5.13.1 -I/home/tdp0009/Teq_Projects/Aug_2019/HMI/QT/qt_source_hmi/qt-everywhere-src-5.13.1/qtbase/include/QtCore/5.13.1/QtCore -I../src/corelib/global -I/home/tdp0009/Teq_Projects/Aug_2019/HMI/QT/qt_source_hmi/qt-everywhere-src-5.13.1/qtbase/mkspecs/arm-linux-gnueabihf-g++ -DQT_VERSION_STR=\"5.13.1\" -DQT_VERSION_MAJOR=5 -DQT_VERSION_MINOR=13 -DQT_VERSION_PATCH=1 -DQT_BUILD_QMAKE -DQT_BOOTSTRAPPED -DPROEVALUATOR_FULL -DQT_NO_FOREACH -DQT_BUILD_QMAKE_BOOTSTRAP /home/tdp0009/Teq_Projects/Aug_2019/HMI/QT/qt_source_hmi/qt-everywhere-src-5.13.1/qtbase/src/corelib/global/qlibraryinfo.cpp
    arm-linux-gnueabihf-g++ -o "../bin/qmake" main.o meta.o option.o project.o property.o ioutils.o proitems.o qmakebuiltins.o qmakeevaluator.o qmakeglobals.o qmakeparser.o qmakevfs.o pbuilder_pbx.o makefile.o makefiledeps.o metamakefile.o projectgenerator.o unixmake2.o unixmake.o mingw_make.o msbuild_objectmodel.o msvc_nmake.o msvc_objectmodel.o msvc_vcproj.o msvc_vcxproj.o winmakefile.o xmloutput.o qutfcodec.o qendian.o qglobal.o qlogging.o qmalloc.o qnumeric.o qoperatingsystemversion.o qrandom.o qabstractfileengine.o qbuffer.o qdatastream.o qdebug.o qdir.o qdiriterator.o qfile.o qfiledevice.o qfileinfo.o qfilesystemengine.o qfilesystementry.o qfsfileengine.o qfsfileengine_iterator.o qiodevice.o qsettings.o qtemporaryfile.o qtextstream.o qjsonarray.o qjson.o qjsondocument.o qjsonobject.o qjsonparser.o qjsonvalue.o qmetatype.o qsystemerror.o qvariant.o quuid.o qarraydata.o qbitarray.o qbytearray.o qbytearraymatcher.o qcryptographichash.o qdatetime.o qhash.o qlinkedlist.o qlist.o qlocale.o qlocale_tools.o qmap.o qregexp.o qringbuffer.o qstringbuilder.o qstring_compat.o qstring.o qstringlist.o qversionnumber.o qvsnprintf.o qxmlstream.o qxmlutils.o qcore_unix.o qfilesystemengine_unix.o qfilesystemiterator_unix.o qfsfileengine_unix.o qlocale_unix.o  qlibraryinfo.o   -Wl,--gc-sections
    /home/tdp0009/Teq_Projects/Aug_2019/HMI/QT/qt_source_hmi/qt-everywhere-src-5.13.1/qtbase/bin/qmake: 1: /home/tdp0009/Teq_Projects/Aug_2019/HMI/QT/qt_source_hmi/qt-everywhere-src-5.13.1/qtbase/bin/qmake: Syntax error: word unexpected (expecting ")")
    
    

    what is the meaning of this error?

    please help me to sort out this error.


  • Moderators

    @Milav said in Cross Compilation error:

    gcc-linaro-7.4.1

    OK, that is modern enough.

    Syntax error: word unexpected (expecting ")")

    I have no idea.



  • @sierdzio

    Okay Thank You. :)