Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. cross compile Qt5 source on DM8168/AM389x
Qt 6.11 is out! See what's new in the release blog

cross compile Qt5 source on DM8168/AM389x

Scheduled Pinned Locked Moved Solved Mobile and Embedded
18 Posts 4 Posters 9.6k Views 2 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.
  • A ambershark

    @Alex_wang Here's from ./configure --help:

    -c++std <edition> .... Select C++ standard <edition> [c++1z/c++14/c++11]

    A Offline
    A Offline
    Alex_wang
    wrote on last edited by
    #7

    @ambershark @jsulm
    Hi,
    c++std error has been solved ,but another error is occurring:

     /home/wangbi/workdir_project/workdir_Qt/ToolChain/arago/bin/arm-arago-linux-gnueabi-g++ -c -pipe -mfloat-abi=softfp --sysroot=/home/wangbi/workdir_project/workdir_Qt/rfs -g -Wall -W -fPIC  -I. -I/home/wangbi/workdir_project/workdir_Qt/rfs/include -I/home/wangbi/workdir_project/workdir_Qt/rfs/usr/include -I/home/wangbi/workdir_project/workdir_Qt/Qt5.8/qt-everywhere-opensource-src-5.8.0/qtbase/mkspecs/devices/linux-arm-gnueabi-ti-g++ -o arch.o arch.cpp
    > In file included from ../../src/corelib/global/archdetect.cpp:41:0,
    >                  from arch.cpp:42:
    > ../../src/corelib/global/qprocessordetection.h:145:6: error: #error "ARM architecture too old"
    > Makefile:221: recipe for target 'arch.o' failed
    > make: *** [arch.o] Error 1
    Project ERROR: Could not determine target architecture. See config.log for details.
    
    jsulmJ 1 Reply Last reply
    0
    • A Alex_wang

      @ambershark @jsulm
      Hi,
      c++std error has been solved ,but another error is occurring:

       /home/wangbi/workdir_project/workdir_Qt/ToolChain/arago/bin/arm-arago-linux-gnueabi-g++ -c -pipe -mfloat-abi=softfp --sysroot=/home/wangbi/workdir_project/workdir_Qt/rfs -g -Wall -W -fPIC  -I. -I/home/wangbi/workdir_project/workdir_Qt/rfs/include -I/home/wangbi/workdir_project/workdir_Qt/rfs/usr/include -I/home/wangbi/workdir_project/workdir_Qt/Qt5.8/qt-everywhere-opensource-src-5.8.0/qtbase/mkspecs/devices/linux-arm-gnueabi-ti-g++ -o arch.o arch.cpp
      > In file included from ../../src/corelib/global/archdetect.cpp:41:0,
      >                  from arch.cpp:42:
      > ../../src/corelib/global/qprocessordetection.h:145:6: error: #error "ARM architecture too old"
      > Makefile:221: recipe for target 'arch.o' failed
      > make: *** [arch.o] Error 1
      Project ERROR: Could not determine target architecture. See config.log for details.
      
      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #8

      @Alex_wang What is your target architecture and its CPU?

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      A 2 Replies Last reply
      0
      • jsulmJ jsulm

        @Alex_wang What is your target architecture and its CPU?

        A Offline
        A Offline
        Alex_wang
        wrote on last edited by
        #9

        @jsulm

        1 ARM Cortex-A8

        1 Reply Last reply
        0
        • jsulmJ jsulm

          @Alex_wang What is your target architecture and its CPU?

          A Offline
          A Offline
          Alex_wang
          wrote on last edited by Alex_wang
          #10

          @jsulm
          8168 arch is ArmV7-a 32bits,

          1 Reply Last reply
          0
          • A ambershark

            @Alex_wang Here's from ./configure --help:

            -c++std <edition> .... Select C++ standard <edition> [c++1z/c++14/c++11]

            A Offline
            A Offline
            Alex_wang
            wrote on last edited by Alex_wang
            #11

            @ambershark
            configure:

            #!/bin/sh
            ./configure \
            -v \
            -opensource \
            -confirm-license \
            -device-option CROSS_COMPILE=/home/wangbi/workdir_project/workdir_Qt/ToolChain/arago-2011.09/armv7a/bin/arm-arago-linux-gnueabi- \
            -device linux-arm-gnueabi-ti-g++  \
            -prefix /usr/local/qt5 \
            -extprefix /home/wangbi/workdir_project/workdir_Qt/Qt5.9.1/qt5  \
            -hostprefix /home/wangbi/workdir_project/workdir_Qt/Qt5.9.1/qt5-host  \
            -nomake examples \
            -nomake tests    \
            -opengl es2       \
            -c++std c++11   \
            -sysroot /home/wangbi/workdir_project/workdir_Qt/rfs
            

            but the error still :

            > cc1plus: error: unrecognized command line option "-std=gnu++11"
            > Makefile:188: recipe for target 'opengles2.o' failed
            > make: *** [opengles2.o] Error 1
             => source failed verification.
            test config.gui.libraries.opengl_es2 FAILED
            

            the c++11 check:

            Checking for compiler defaulting to C++11 or higher... 
            + cd /home/wangbi/workdir_project/workdir_Qt/Qt5.8/qt-everywhere-opensource-src-5.8.0/qtbase/config.tests/common/c++98default && /home/wangbi/workdir_project/workdir_Qt/Qt5.8/qt-everywhere-opensource-src-5.8.0/qtbase/bin/qmake -qtconf /home/wangbi/workdir_project/workdir_Qt/Qt5.8/qt-everywhere-opensource-src-5.8.0/qtbase/bin/qt.conf "CONFIG -= qt debug_and_release app_bundle lib_bundle" "CONFIG += shared console" "QMAKE_CFLAGS += --sysroot=/home/wangbi/workdir_project/workdir_Qt/rfs" "QMAKE_CXXFLAGS += --sysroot=/home/wangbi/workdir_project/workdir_Qt/rfs" "QMAKE_LFLAGS += --sysroot=/home/wangbi/workdir_project/workdir_Qt/rfs" /home/wangbi/workdir_project/workdir_Qt/Qt5.8/qt-everywhere-opensource-src-5.8.0/qtbase/config.tests/common/c++98default
            + cd /home/wangbi/workdir_project/workdir_Qt/Qt5.8/qt-everywhere-opensource-src-5.8.0/qtbase/config.tests/common/c++98default && MAKEFLAGS= /usr/bin/make
            > /home/wangbi/workdir_project/workdir_Qt/ToolChain/arago-2011.09/armv7a/bin/arm-arago-linux-gnueabi-g++ -c -pipe -march=armv7-a -mfloat-abi=softfp --sysroot=/home/wangbi/workdir_project/workdir_Qt/rfs -O2 -Wall -W -fPIC  -I. -I/home/wangbi/workdir_project/workdir_Qt/rfs/include -I/home/wangbi/workdir_project/workdir_Qt/rfs/usr/include -I/home/wangbi/workdir_project/workdir_Qt/rfs/usr/include/EGL -I/home/wangbi/workdir_project/workdir_Qt/rfs/usr/include/EWS -I/home/wangbi/workdir_project/workdir_Qt/rfs/usr/include/GLES -I/home/wangbi/workdir_project/workdir_Qt/rfs/usr/include/GLES2 -I/home/wangbi/workdir_project/workdir_Qt/rfs/usr/include/KHR -I/home/wangbi/workdir_project/workdir_Qt/Qt5.8/qt-everywhere-opensource-src-5.8.0/qtbase/mkspecs/devices/linux-arm-gnueabi-ti-g++ -o c++98default.o c++98default.cpp
            > c++98default.cpp:41:2: error: #error "compiler does not use c++11 or higher by default"
            > Makefile:176: recipe for target 'c++98default.o' failed
            > make: *** [c++98default.o] Error 1
            test config.qtbase.tests.cxx11default FAILED
            
            A jsulmJ 2 Replies Last reply
            0
            • A Alex_wang

              @ambershark
              configure:

              #!/bin/sh
              ./configure \
              -v \
              -opensource \
              -confirm-license \
              -device-option CROSS_COMPILE=/home/wangbi/workdir_project/workdir_Qt/ToolChain/arago-2011.09/armv7a/bin/arm-arago-linux-gnueabi- \
              -device linux-arm-gnueabi-ti-g++  \
              -prefix /usr/local/qt5 \
              -extprefix /home/wangbi/workdir_project/workdir_Qt/Qt5.9.1/qt5  \
              -hostprefix /home/wangbi/workdir_project/workdir_Qt/Qt5.9.1/qt5-host  \
              -nomake examples \
              -nomake tests    \
              -opengl es2       \
              -c++std c++11   \
              -sysroot /home/wangbi/workdir_project/workdir_Qt/rfs
              

              but the error still :

              > cc1plus: error: unrecognized command line option "-std=gnu++11"
              > Makefile:188: recipe for target 'opengles2.o' failed
              > make: *** [opengles2.o] Error 1
               => source failed verification.
              test config.gui.libraries.opengl_es2 FAILED
              

              the c++11 check:

              Checking for compiler defaulting to C++11 or higher... 
              + cd /home/wangbi/workdir_project/workdir_Qt/Qt5.8/qt-everywhere-opensource-src-5.8.0/qtbase/config.tests/common/c++98default && /home/wangbi/workdir_project/workdir_Qt/Qt5.8/qt-everywhere-opensource-src-5.8.0/qtbase/bin/qmake -qtconf /home/wangbi/workdir_project/workdir_Qt/Qt5.8/qt-everywhere-opensource-src-5.8.0/qtbase/bin/qt.conf "CONFIG -= qt debug_and_release app_bundle lib_bundle" "CONFIG += shared console" "QMAKE_CFLAGS += --sysroot=/home/wangbi/workdir_project/workdir_Qt/rfs" "QMAKE_CXXFLAGS += --sysroot=/home/wangbi/workdir_project/workdir_Qt/rfs" "QMAKE_LFLAGS += --sysroot=/home/wangbi/workdir_project/workdir_Qt/rfs" /home/wangbi/workdir_project/workdir_Qt/Qt5.8/qt-everywhere-opensource-src-5.8.0/qtbase/config.tests/common/c++98default
              + cd /home/wangbi/workdir_project/workdir_Qt/Qt5.8/qt-everywhere-opensource-src-5.8.0/qtbase/config.tests/common/c++98default && MAKEFLAGS= /usr/bin/make
              > /home/wangbi/workdir_project/workdir_Qt/ToolChain/arago-2011.09/armv7a/bin/arm-arago-linux-gnueabi-g++ -c -pipe -march=armv7-a -mfloat-abi=softfp --sysroot=/home/wangbi/workdir_project/workdir_Qt/rfs -O2 -Wall -W -fPIC  -I. -I/home/wangbi/workdir_project/workdir_Qt/rfs/include -I/home/wangbi/workdir_project/workdir_Qt/rfs/usr/include -I/home/wangbi/workdir_project/workdir_Qt/rfs/usr/include/EGL -I/home/wangbi/workdir_project/workdir_Qt/rfs/usr/include/EWS -I/home/wangbi/workdir_project/workdir_Qt/rfs/usr/include/GLES -I/home/wangbi/workdir_project/workdir_Qt/rfs/usr/include/GLES2 -I/home/wangbi/workdir_project/workdir_Qt/rfs/usr/include/KHR -I/home/wangbi/workdir_project/workdir_Qt/Qt5.8/qt-everywhere-opensource-src-5.8.0/qtbase/mkspecs/devices/linux-arm-gnueabi-ti-g++ -o c++98default.o c++98default.cpp
              > c++98default.cpp:41:2: error: #error "compiler does not use c++11 or higher by default"
              > Makefile:176: recipe for target 'c++98default.o' failed
              > make: *** [c++98default.o] Error 1
              test config.qtbase.tests.cxx11default FAILED
              
              A Offline
              A Offline
              ambershark
              wrote on last edited by ambershark
              #12

              @Alex_wang Looks like your compiler doesn't support c++11 or higher. You will need a more modern compiler to use Qt newer than 5.6.

              My L-GPL'd C++ Logger github.com/ambershark-mike/sharklog

              1 Reply Last reply
              2
              • aha_1980A Offline
                aha_1980A Offline
                aha_1980
                Lifetime Qt Champion
                wrote on last edited by aha_1980
                #13

                @jsulm said in cross compile Qt5 source on DM8168/AM389x:

                @ambershark @Alex_wang Qt itself requires C++11 since (I think) 5.6, so without C++11 5.9.1 will for sure not build.

                Actually, Qt 5.6 was the last Qt version that didn't need a C++11 compiler [1][2]. Version 5.7 was the first one with that requirement.

                [1] Except if you want to use QtSerialBus, which is a Technology Preview in Qt 5.6 and already required C++11.
                [2] And it is the last version supporting Windows XP.

                Qt has to stay free or it will die.

                1 Reply Last reply
                2
                • A Alex_wang

                  @ambershark
                  configure:

                  #!/bin/sh
                  ./configure \
                  -v \
                  -opensource \
                  -confirm-license \
                  -device-option CROSS_COMPILE=/home/wangbi/workdir_project/workdir_Qt/ToolChain/arago-2011.09/armv7a/bin/arm-arago-linux-gnueabi- \
                  -device linux-arm-gnueabi-ti-g++  \
                  -prefix /usr/local/qt5 \
                  -extprefix /home/wangbi/workdir_project/workdir_Qt/Qt5.9.1/qt5  \
                  -hostprefix /home/wangbi/workdir_project/workdir_Qt/Qt5.9.1/qt5-host  \
                  -nomake examples \
                  -nomake tests    \
                  -opengl es2       \
                  -c++std c++11   \
                  -sysroot /home/wangbi/workdir_project/workdir_Qt/rfs
                  

                  but the error still :

                  > cc1plus: error: unrecognized command line option "-std=gnu++11"
                  > Makefile:188: recipe for target 'opengles2.o' failed
                  > make: *** [opengles2.o] Error 1
                   => source failed verification.
                  test config.gui.libraries.opengl_es2 FAILED
                  

                  the c++11 check:

                  Checking for compiler defaulting to C++11 or higher... 
                  + cd /home/wangbi/workdir_project/workdir_Qt/Qt5.8/qt-everywhere-opensource-src-5.8.0/qtbase/config.tests/common/c++98default && /home/wangbi/workdir_project/workdir_Qt/Qt5.8/qt-everywhere-opensource-src-5.8.0/qtbase/bin/qmake -qtconf /home/wangbi/workdir_project/workdir_Qt/Qt5.8/qt-everywhere-opensource-src-5.8.0/qtbase/bin/qt.conf "CONFIG -= qt debug_and_release app_bundle lib_bundle" "CONFIG += shared console" "QMAKE_CFLAGS += --sysroot=/home/wangbi/workdir_project/workdir_Qt/rfs" "QMAKE_CXXFLAGS += --sysroot=/home/wangbi/workdir_project/workdir_Qt/rfs" "QMAKE_LFLAGS += --sysroot=/home/wangbi/workdir_project/workdir_Qt/rfs" /home/wangbi/workdir_project/workdir_Qt/Qt5.8/qt-everywhere-opensource-src-5.8.0/qtbase/config.tests/common/c++98default
                  + cd /home/wangbi/workdir_project/workdir_Qt/Qt5.8/qt-everywhere-opensource-src-5.8.0/qtbase/config.tests/common/c++98default && MAKEFLAGS= /usr/bin/make
                  > /home/wangbi/workdir_project/workdir_Qt/ToolChain/arago-2011.09/armv7a/bin/arm-arago-linux-gnueabi-g++ -c -pipe -march=armv7-a -mfloat-abi=softfp --sysroot=/home/wangbi/workdir_project/workdir_Qt/rfs -O2 -Wall -W -fPIC  -I. -I/home/wangbi/workdir_project/workdir_Qt/rfs/include -I/home/wangbi/workdir_project/workdir_Qt/rfs/usr/include -I/home/wangbi/workdir_project/workdir_Qt/rfs/usr/include/EGL -I/home/wangbi/workdir_project/workdir_Qt/rfs/usr/include/EWS -I/home/wangbi/workdir_project/workdir_Qt/rfs/usr/include/GLES -I/home/wangbi/workdir_project/workdir_Qt/rfs/usr/include/GLES2 -I/home/wangbi/workdir_project/workdir_Qt/rfs/usr/include/KHR -I/home/wangbi/workdir_project/workdir_Qt/Qt5.8/qt-everywhere-opensource-src-5.8.0/qtbase/mkspecs/devices/linux-arm-gnueabi-ti-g++ -o c++98default.o c++98default.cpp
                  > c++98default.cpp:41:2: error: #error "compiler does not use c++11 or higher by default"
                  > Makefile:176: recipe for target 'c++98default.o' failed
                  > make: *** [c++98default.o] Error 1
                  test config.qtbase.tests.cxx11default FAILED
                  
                  jsulmJ Offline
                  jsulmJ Offline
                  jsulm
                  Lifetime Qt Champion
                  wrote on last edited by
                  #14

                  @Alex_wang said in cross compile Qt5 source on DM8168/AM389x:

                  arago-2011.09/armv7a/bin/arm-arago-linux-gnueabi

                  Looks quite old. Can you get a newer one?

                  https://forum.qt.io/topic/113070/qt-code-of-conduct

                  1 Reply Last reply
                  1
                  • A Offline
                    A Offline
                    Alex_wang
                    wrote on last edited by
                    #15

                    @aha_1980 @jsulm

                    Thanks for your reply!

                    using the gcc-linaro-6.3.1-2017.05-i686_arm-linux-gnueabi tool chain , then solve the error!

                    but new error occur:

                    home/wangbi/workdir_project/workdir_Qt/rfs/lib -lgthread-2.0 -lrt -lglib-2.0 
                    .obj/qlogging.o:qlogging.cpp:function QMessagePattern::setPattern(QString const&): error: undefined reference to '__cxa_throw_bad_array_new_length'
                    .obj/qlogging.o:qlogging.cpp:function QMessagePattern::setPattern(QString const&): error: undefined reference to '__cxa_throw_bad_array_new_length'
                    .obj/qhash.o:qhash.cpp:function QHashData::detach_helper(void (*)(QHashData::Node*, void*), void (*)(QHashData::Node*), int, int): error: undefined reference to '__cxa_throw_bad_array_new_length'
                    .obj/qhash.o:qhash.cpp:function QHashData::rehash(int): error: undefined reference to '__cxa_throw_bad_array_new_length'
                    collect2: error: ld returned 1 exit status
                    Makefile:1247: recipe for target '../../lib/libQt5Core.so.5.8.0' failed
                    
                    jsulmJ A 2 Replies Last reply
                    0
                    • A Alex_wang

                      @aha_1980 @jsulm

                      Thanks for your reply!

                      using the gcc-linaro-6.3.1-2017.05-i686_arm-linux-gnueabi tool chain , then solve the error!

                      but new error occur:

                      home/wangbi/workdir_project/workdir_Qt/rfs/lib -lgthread-2.0 -lrt -lglib-2.0 
                      .obj/qlogging.o:qlogging.cpp:function QMessagePattern::setPattern(QString const&): error: undefined reference to '__cxa_throw_bad_array_new_length'
                      .obj/qlogging.o:qlogging.cpp:function QMessagePattern::setPattern(QString const&): error: undefined reference to '__cxa_throw_bad_array_new_length'
                      .obj/qhash.o:qhash.cpp:function QHashData::detach_helper(void (*)(QHashData::Node*, void*), void (*)(QHashData::Node*), int, int): error: undefined reference to '__cxa_throw_bad_array_new_length'
                      .obj/qhash.o:qhash.cpp:function QHashData::rehash(int): error: undefined reference to '__cxa_throw_bad_array_new_length'
                      collect2: error: ld returned 1 exit status
                      Makefile:1247: recipe for target '../../lib/libQt5Core.so.5.8.0' failed
                      
                      jsulmJ Offline
                      jsulmJ Offline
                      jsulm
                      Lifetime Qt Champion
                      wrote on last edited by
                      #16

                      @Alex_wang Did you start from a clean state?

                      https://forum.qt.io/topic/113070/qt-code-of-conduct

                      A 1 Reply Last reply
                      1
                      • A Alex_wang

                        @aha_1980 @jsulm

                        Thanks for your reply!

                        using the gcc-linaro-6.3.1-2017.05-i686_arm-linux-gnueabi tool chain , then solve the error!

                        but new error occur:

                        home/wangbi/workdir_project/workdir_Qt/rfs/lib -lgthread-2.0 -lrt -lglib-2.0 
                        .obj/qlogging.o:qlogging.cpp:function QMessagePattern::setPattern(QString const&): error: undefined reference to '__cxa_throw_bad_array_new_length'
                        .obj/qlogging.o:qlogging.cpp:function QMessagePattern::setPattern(QString const&): error: undefined reference to '__cxa_throw_bad_array_new_length'
                        .obj/qhash.o:qhash.cpp:function QHashData::detach_helper(void (*)(QHashData::Node*, void*), void (*)(QHashData::Node*), int, int): error: undefined reference to '__cxa_throw_bad_array_new_length'
                        .obj/qhash.o:qhash.cpp:function QHashData::rehash(int): error: undefined reference to '__cxa_throw_bad_array_new_length'
                        collect2: error: ld returned 1 exit status
                        Makefile:1247: recipe for target '../../lib/libQt5Core.so.5.8.0' failed
                        
                        A Offline
                        A Offline
                        ambershark
                        wrote on last edited by
                        #17

                        @Alex_wang Does your new compiler support exceptions and have exception handling enabled?

                        My L-GPL'd C++ Logger github.com/ambershark-mike/sharklog

                        1 Reply Last reply
                        0
                        • jsulmJ jsulm

                          @Alex_wang Did you start from a clean state?

                          A Offline
                          A Offline
                          Alex_wang
                          wrote on last edited by
                          #18

                          @jsulm

                          yes

                          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