Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Qt with ARM Cross compiler propblem
Forum Updated to NodeBB v4.3 + New Features

Qt with ARM Cross compiler propblem

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
6 Posts 2 Posters 2.1k Views 1 Watching
  • 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.
  • B Offline
    B Offline
    b108463
    wrote on last edited by
    #1

    Dear all,
    I use the Qt to build a simple project. my environment is listed as below

    1. ubuntu version: 14.04 (ubuntu-14.04.5-desktop-amd64.iso)
    2. cross-compiler toolchain : arm-linux-gnueabihf-g++-4.8
    3. Qt creator: 4.0.2 based on Qt 5.7.0
    4. Qt library : 5.6
      my purpose is to build this project and run the executable file on Nvidia TK1.

    The Qt reports the error message as below, It looks likes the syntax probelms,But I don't know why.
    Is anyone able to give me some suggestions? Thanks a lot.

    Note:
    arm-linux-gnueabihf-g++ -c -pipe -g -std=gnu++0x -Wall -W -D_REENTRANT -fPIC -D__ARM__ -DDEBUG_MODE -DQT_QML_DEBUG -DQT_MULTIMEDIA_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I../SMPCodeReader1 -I. -I/usr/local/jetsonTK1_qt56/armlibTK/usr/include -I/usr/local/jetsonTK1_qt56/armlibTK/usr/include/qt5/QtCore -I../SMPCodeReader1/src/barcodeLib/softek -I../SMPCodeReader1/src/uEye/armhf -I/usr/local/jetsonTK1_qt56/include -I/usr/local/jetsonTK1_qt56/include/QtMultimedia -I/usr/local/jetsonTK1_qt56/include/QtWidgets -I/usr/local/jetsonTK1_qt56/include/QtGui -I/usr/local/jetsonTK1_qt56/include/QtNetwork -I/usr/local/jetsonTK1_qt56/include/QtCore -I. -I. -I/usr/local/jetsonTK1_qt56/mkspecs/linux-arm-gnueabi-g++ -o cammgr.o ../SMPCodeReader1/cammgr.cpp
    In file included from /usr/local/jetsonTK1_qt56/include/QtGui/qcolor.h:39:0,
    from /usr/local/jetsonTK1_qt56/include/QtGui/qimage.h:37,
    from /usr/local/jetsonTK1_qt56/include/QtGui/QImage:1,
    from ../SMPCodeReader1/abstractcamdev.h:6,
    from ../SMPCodeReader1/cammgr.h:5,
    from ../SMPCodeReader1/cammgr.cpp:1:
    /usr/local/jetsonTK1_qt56/include/QtCore/qstringlist.h:57:20: error: 'QListSpecialMethods' is not a class template
    template <> struct QListSpecialMethods<QString>
    ^
    /usr/local/jetsonTK1_qt56/include/QtCore/qstringlist.h:59:1: error: explicit specialization of non-template 'QListSpecialMethods'
    {
    ^
    In file included from /usr/local/jetsonTK1_qt56/include/QtGui/qcolor.h:39:0,
    from /usr/local/jetsonTK1_qt56/include/QtGui/qimage.h:37,
    from /usr/local/jetsonTK1_qt56/include/QtGui/QImage:1,
    from ../SMPCodeReader1/abstractcamdev.h:6,
    from ../SMPCodeReader1/cammgr.h:5,
    from ../SMPCodeReader1/cammgr.cpp:1:
    /usr/local/jetsonTK1_qt56/include/QtCore/qstringlist.h:145:40: error: expected initializer before '<' token
    inline QStringList *QListSpecialMethods<QString>::self()
    ^
    /usr/local/jetsonTK1_qt56/include/QtCore/qstringlist.h:147:46: error: expected initializer before '<' token
    inline const QStringList *QListSpecialMethods<QString>::self() const
    ^
    /usr/local/jetsonTK1_qt56/include/QtCore/qstringlist.h:180:32: error: expected initializer before '<' token
    inline void QListSpecialMethods<QString>::sort(Qt::CaseSensitivity cs)
    ^
    /usr/local/jetsonTK1_qt56/include/QtCore/qstringlist.h:185:31: error: expected initializer before '<' token
    inline int QListSpecialMethods<QString>::removeDuplicates()
    ^
    /usr/local/jetsonTK1_qt56/include/QtCore/qstringlist.h:190:35: error: expected initializer before '<' token
    inline QString QListSpecialMethods<QString>::join(const QString &sep) const
    ^
    /usr/local/jetsonTK1_qt56/include/QtCore/qstringlist.h:195:35: error: expected initializer before '<' token
    inline QString QListSpecialMethods<QString>::join(QChar sep) const
    ^
    /usr/local/jetsonTK1_qt56/include/QtCore/qstringlist.h:200:39: error: expected initializer before '<' token
    inline QStringList QListSpecialMethods<QString>::filter(const QString &str, Qt::CaseSensitivity cs) const
    ^
    /usr/local/jetsonTK1_qt56/include/QtCore/qstringlist.h:210:40: error: expected initializer before '<' token
    inline QStringList &QListSpecialMethods<QString>::replaceInStrings(const QString &before, const QString &after, Qt::CaseSensitivity cs)
    ^
    /usr/local/jetsonTK1_qt56/include/QtCore/qstringlist.h:224:40: error: expected initializer before '<' token
    inline QStringList &QListSpecialMethods<QString>::replaceInStrings(const QRegExp &rx, const QString &after)
    ^
    /usr/local/jetsonTK1_qt56/include/QtCore/qstringlist.h:230:39: error: expected initializer before '<' token
    inline QStringList QListSpecialMethods<QString>::filter(const QRegExp &rx) const
    ^
    /usr/local/jetsonTK1_qt56/include/QtCore/qstringlist.h:258:40: error: expected initializer before '<' token
    inline QStringList &QListSpecialMethods<QString>::replaceInStrings(const QRegularExpression &rx, const QString &after)
    ^
    /usr/local/jetsonTK1_qt56/include/QtCore/qstringlist.h:264:39: error: expected initializer before '<' token
    inline QStringList QListSpecialMethods<QString>::filter(const QRegularExpression &rx) const
    ^
    In file included from /usr/local/jetsonTK1_qt56/include/QtCore/qvariant.h:47:0,
    from /usr/local/jetsonTK1_qt56/include/QtMultimedia/qvideoframe.h:41,
    from /usr/local/jetsonTK1_qt56/include/QtMultimedia/QVideoFrame:1,
    from ../SMPCodeReader1/abstractcamdev.h:7,
    from ../SMPCodeReader1/cammgr.h:5,
    from ../SMPCodeReader1/cammgr.cpp:1:
    /usr/local/jetsonTK1_qt56/include/QtCore/qbytearraylist.h:55:20: error: 'QListSpecialMethods' is not a class template
    template <> struct QListSpecialMethods<QByteArray>
    ^
    /usr/local/jetsonTK1_qt56/include/QtCore/qbytearraylist.h:55:50: error: 'QListSpecialMethods' is not a template type
    template <> struct QListSpecialMethods<QByteArray>
    ^
    make: *** [cammgr.o] Error 1

    K 1 Reply Last reply
    0
    • B b108463

      Dear all,
      I use the Qt to build a simple project. my environment is listed as below

      1. ubuntu version: 14.04 (ubuntu-14.04.5-desktop-amd64.iso)
      2. cross-compiler toolchain : arm-linux-gnueabihf-g++-4.8
      3. Qt creator: 4.0.2 based on Qt 5.7.0
      4. Qt library : 5.6
        my purpose is to build this project and run the executable file on Nvidia TK1.

      The Qt reports the error message as below, It looks likes the syntax probelms,But I don't know why.
      Is anyone able to give me some suggestions? Thanks a lot.

      Note:
      arm-linux-gnueabihf-g++ -c -pipe -g -std=gnu++0x -Wall -W -D_REENTRANT -fPIC -D__ARM__ -DDEBUG_MODE -DQT_QML_DEBUG -DQT_MULTIMEDIA_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I../SMPCodeReader1 -I. -I/usr/local/jetsonTK1_qt56/armlibTK/usr/include -I/usr/local/jetsonTK1_qt56/armlibTK/usr/include/qt5/QtCore -I../SMPCodeReader1/src/barcodeLib/softek -I../SMPCodeReader1/src/uEye/armhf -I/usr/local/jetsonTK1_qt56/include -I/usr/local/jetsonTK1_qt56/include/QtMultimedia -I/usr/local/jetsonTK1_qt56/include/QtWidgets -I/usr/local/jetsonTK1_qt56/include/QtGui -I/usr/local/jetsonTK1_qt56/include/QtNetwork -I/usr/local/jetsonTK1_qt56/include/QtCore -I. -I. -I/usr/local/jetsonTK1_qt56/mkspecs/linux-arm-gnueabi-g++ -o cammgr.o ../SMPCodeReader1/cammgr.cpp
      In file included from /usr/local/jetsonTK1_qt56/include/QtGui/qcolor.h:39:0,
      from /usr/local/jetsonTK1_qt56/include/QtGui/qimage.h:37,
      from /usr/local/jetsonTK1_qt56/include/QtGui/QImage:1,
      from ../SMPCodeReader1/abstractcamdev.h:6,
      from ../SMPCodeReader1/cammgr.h:5,
      from ../SMPCodeReader1/cammgr.cpp:1:
      /usr/local/jetsonTK1_qt56/include/QtCore/qstringlist.h:57:20: error: 'QListSpecialMethods' is not a class template
      template <> struct QListSpecialMethods<QString>
      ^
      /usr/local/jetsonTK1_qt56/include/QtCore/qstringlist.h:59:1: error: explicit specialization of non-template 'QListSpecialMethods'
      {
      ^
      In file included from /usr/local/jetsonTK1_qt56/include/QtGui/qcolor.h:39:0,
      from /usr/local/jetsonTK1_qt56/include/QtGui/qimage.h:37,
      from /usr/local/jetsonTK1_qt56/include/QtGui/QImage:1,
      from ../SMPCodeReader1/abstractcamdev.h:6,
      from ../SMPCodeReader1/cammgr.h:5,
      from ../SMPCodeReader1/cammgr.cpp:1:
      /usr/local/jetsonTK1_qt56/include/QtCore/qstringlist.h:145:40: error: expected initializer before '<' token
      inline QStringList *QListSpecialMethods<QString>::self()
      ^
      /usr/local/jetsonTK1_qt56/include/QtCore/qstringlist.h:147:46: error: expected initializer before '<' token
      inline const QStringList *QListSpecialMethods<QString>::self() const
      ^
      /usr/local/jetsonTK1_qt56/include/QtCore/qstringlist.h:180:32: error: expected initializer before '<' token
      inline void QListSpecialMethods<QString>::sort(Qt::CaseSensitivity cs)
      ^
      /usr/local/jetsonTK1_qt56/include/QtCore/qstringlist.h:185:31: error: expected initializer before '<' token
      inline int QListSpecialMethods<QString>::removeDuplicates()
      ^
      /usr/local/jetsonTK1_qt56/include/QtCore/qstringlist.h:190:35: error: expected initializer before '<' token
      inline QString QListSpecialMethods<QString>::join(const QString &sep) const
      ^
      /usr/local/jetsonTK1_qt56/include/QtCore/qstringlist.h:195:35: error: expected initializer before '<' token
      inline QString QListSpecialMethods<QString>::join(QChar sep) const
      ^
      /usr/local/jetsonTK1_qt56/include/QtCore/qstringlist.h:200:39: error: expected initializer before '<' token
      inline QStringList QListSpecialMethods<QString>::filter(const QString &str, Qt::CaseSensitivity cs) const
      ^
      /usr/local/jetsonTK1_qt56/include/QtCore/qstringlist.h:210:40: error: expected initializer before '<' token
      inline QStringList &QListSpecialMethods<QString>::replaceInStrings(const QString &before, const QString &after, Qt::CaseSensitivity cs)
      ^
      /usr/local/jetsonTK1_qt56/include/QtCore/qstringlist.h:224:40: error: expected initializer before '<' token
      inline QStringList &QListSpecialMethods<QString>::replaceInStrings(const QRegExp &rx, const QString &after)
      ^
      /usr/local/jetsonTK1_qt56/include/QtCore/qstringlist.h:230:39: error: expected initializer before '<' token
      inline QStringList QListSpecialMethods<QString>::filter(const QRegExp &rx) const
      ^
      /usr/local/jetsonTK1_qt56/include/QtCore/qstringlist.h:258:40: error: expected initializer before '<' token
      inline QStringList &QListSpecialMethods<QString>::replaceInStrings(const QRegularExpression &rx, const QString &after)
      ^
      /usr/local/jetsonTK1_qt56/include/QtCore/qstringlist.h:264:39: error: expected initializer before '<' token
      inline QStringList QListSpecialMethods<QString>::filter(const QRegularExpression &rx) const
      ^
      In file included from /usr/local/jetsonTK1_qt56/include/QtCore/qvariant.h:47:0,
      from /usr/local/jetsonTK1_qt56/include/QtMultimedia/qvideoframe.h:41,
      from /usr/local/jetsonTK1_qt56/include/QtMultimedia/QVideoFrame:1,
      from ../SMPCodeReader1/abstractcamdev.h:7,
      from ../SMPCodeReader1/cammgr.h:5,
      from ../SMPCodeReader1/cammgr.cpp:1:
      /usr/local/jetsonTK1_qt56/include/QtCore/qbytearraylist.h:55:20: error: 'QListSpecialMethods' is not a class template
      template <> struct QListSpecialMethods<QByteArray>
      ^
      /usr/local/jetsonTK1_qt56/include/QtCore/qbytearraylist.h:55:50: error: 'QListSpecialMethods' is not a template type
      template <> struct QListSpecialMethods<QByteArray>
      ^
      make: *** [cammgr.o] Error 1

      K Offline
      K Offline
      koahnig
      wrote on last edited by
      #2

      @b108463

      Presumably the compiler you are using is too old. AFAIK you would need a gcc version 4.9 or higher for the newer Qt versions. Qt 5.6 and already Qt 5.4 has been shipped with MinGW (gcc) 4.9 already.

      You are using a cross-compiler based on gcc 4.8. I suspect that there might be the reason for your problems. I would go back to earlier Qt version and see if you compile it through then.

      Hope that helps.

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

      B 1 Reply Last reply
      0
      • K koahnig

        @b108463

        Presumably the compiler you are using is too old. AFAIK you would need a gcc version 4.9 or higher for the newer Qt versions. Qt 5.6 and already Qt 5.4 has been shipped with MinGW (gcc) 4.9 already.

        You are using a cross-compiler based on gcc 4.8. I suspect that there might be the reason for your problems. I would go back to earlier Qt version and see if you compile it through then.

        Hope that helps.

        B Offline
        B Offline
        b108463
        wrote on last edited by
        #3

        update information:

        1. I could use the linux x86 g++ (gcc version is 4.8.4) to compile this project successfully.

        2. I have installed another Qt version (5.6.2), it is still fail with arm-linux-gnueabihf-g++-4.8

        B 1 Reply Last reply
        0
        • B b108463

          update information:

          1. I could use the linux x86 g++ (gcc version is 4.8.4) to compile this project successfully.

          2. I have installed another Qt version (5.6.2), it is still fail with arm-linux-gnueabihf-g++-4.8

          B Offline
          B Offline
          b108463
          wrote on last edited by
          #4

          update information :

          1. Qt 5.7.0 (qt-opensource-linux-x64-5.7.0.run, Qt creator 4.0.2) with Qt 5.6.0 package is built for ARM platform (use it's qmake) and arm-linux-gnueabihf-g++-4.9 on ubuntu 15.04
            =>Fail ,the same problem

          2. Qt 5.6.0 (qt-opensource-linux-x64-5.6.0.run, Qt creator 3.6.1) with Qt 5.6.0 package is built for ARM platform (use it's qmake) and arm-linux-gnueabihf-g++-4.8 on ubuntu 14.04.5 =>Fail, the same problem

          K 2 Replies Last reply
          0
          • B b108463

            update information :

            1. Qt 5.7.0 (qt-opensource-linux-x64-5.7.0.run, Qt creator 4.0.2) with Qt 5.6.0 package is built for ARM platform (use it's qmake) and arm-linux-gnueabihf-g++-4.9 on ubuntu 15.04
              =>Fail ,the same problem

            2. Qt 5.6.0 (qt-opensource-linux-x64-5.6.0.run, Qt creator 3.6.1) with Qt 5.6.0 package is built for ARM platform (use it's qmake) and arm-linux-gnueabihf-g++-4.8 on ubuntu 14.04.5 =>Fail, the same problem

            K Offline
            K Offline
            koahnig
            wrote on last edited by
            #5

            @b108463

            Just for clarification, there is no need to install a complete version of Qt libs and a creator version for your task.

            Qt creator is "simply" an IDE and is managing the qmake, make, and compilation stuff for you. You can use the newest version Qt creator with any Qt lib version on your desktop without problem. Qt creator is an IDE based on Qt libs and you have to ensure that the proper version of Qt libs are installed together with creator.

            Qt libs and the compiler, it was created, with are building a kit (or sometiem referred as tool chain) which may be chosen within Qt creator for building projects. You can install a couple of different kits in parallel and switch between them within Qt creator. You can download different versions from the archives and install them in parallel.

            When Qt creator and Qt libs are released closely together they refere to the version number for Qt libs, but these is no need. The Qt libs for operation of creator are installed separately. This may leed to some duplication, but should impose a problem nowadays.

            When you are cross-compiling you have simply another kit. You could simply download an archive and a config batch was associated with it. After starting the config the configuration was handled and only the make process was started in addition.
            You can download the code from git here for different versions. I was trying to find the older style with the zip- and tar-files, but those are apparently no longer supported.

            At least in the past it was always recommended to download a fresh code archive for compilation with different (cross-)compilers. Especially the sources delivered with pre-compiled Qt libs were not fit for another compilation run. I need to check on this.

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

            1 Reply Last reply
            0
            • B b108463

              update information :

              1. Qt 5.7.0 (qt-opensource-linux-x64-5.7.0.run, Qt creator 4.0.2) with Qt 5.6.0 package is built for ARM platform (use it's qmake) and arm-linux-gnueabihf-g++-4.9 on ubuntu 15.04
                =>Fail ,the same problem

              2. Qt 5.6.0 (qt-opensource-linux-x64-5.6.0.run, Qt creator 3.6.1) with Qt 5.6.0 package is built for ARM platform (use it's qmake) and arm-linux-gnueabihf-g++-4.8 on ubuntu 14.04.5 =>Fail, the same problem

              K Offline
              K Offline
              koahnig
              wrote on last edited by
              #6

              @b108463

              All the source archives may be found still in the archive download section. However there is new seapration structure.
              Here are for example the sources for Qt 5.2.1. You need to be careful to choose the proper archive. .zip is for compilation on/for windows and .tar on/for linux.

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

              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