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 of Qt 5.9.1 source for beaglebone black
QtWS25 Last Chance

Cross-compile of Qt 5.9.1 source for beaglebone black

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
beaglebonebbb
10 Posts 2 Posters 4.7k 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.
  • K Offline
    K Offline
    koahnig
    wrote on last edited by koahnig
    #1

    I am trying to cross-compile Qt on Ubuntu 64 bit in a VM for beaglebone black using gcc-linaro-6.3.1-2017.05-x86_64_arm-linux-gnueabihf

    The recent Qt code 5.9.1 is downloaded in tar.xz and unzipped. When starting configure and answering a couple of questionsI ran into following issue (config.log):

    Command line: -release -opengl es2 -device linux-beagleboard-g++ -device-option CROSS_COMPILE=/home/me/linaro/gcc-linaro-6.3.1-2017.05-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf- -sysroot ../linaro/gcc-linaro-6.3.1-2017.05-x86_64_arm-linux-gnueabihf -prefix /usr/local/qtcc
    executing config test verifyspec
    + cd /home/me/qt-everywhere-opensource-src-5.9.1/config.tests/common/verifyspec && /home/me/qt-everywhere-opensource-src-5.9.1/qtbase/bin/qmake "CONFIG -= qt debug_and_release app_bundle lib_bundle" "CONFIG += shared use_gold_linker console single_arch" "QMAKE_CFLAGS += --sysroot=../linaro/gcc-linaro-6.3.1-2017.05-x86_64_arm-linux-gnueabihf" "QMAKE_CXXFLAGS += --sysroot=../linaro/gcc-linaro-6.3.1-2017.05-x86_64_arm-linux-gnueabihf" "QMAKE_LFLAGS += --sysroot=../linaro/gcc-linaro-6.3.1-2017.05-x86_64_arm-linux-gnueabihf" -early "CONFIG += cross_compile" /home/me/qt-everywhere-opensource-src-5.9.1/qtbase/config.tests/common/verifyspec
    + cd /home/me/qt-everywhere-opensource-src-5.9.1/config.tests/common/verifyspec && MAKEFLAGS= /usr/bin/make clean && MAKEFLAGS= /usr/bin/make
    > rm -f verifyspec.o
    > rm -f *~ core *.core
    > /home/me/linaro/gcc-linaro-6.3.1-2017.05-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-g++ -c -pipe -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mthumb -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mthumb -mfloat-abi=hard --sysroot=../linaro/gcc-linaro-6.3.1-2017.05-x86_64_arm-linux-gnueabihf -O2 -O3 -Wall -W -fPIC  -I/home/me/qt-everywhere-opensource-src-5.9.1/qtbase/config.tests/common/verifyspec -I. -I/home/me/qt-everywhere-opensource-src-5.9.1/qtbase/mkspecs/devices/linux-beagleboard-g++ -o verifyspec.o /home/me/qt-everywhere-opensource-src-5.9.1/qtbase/config.tests/common/verifyspec/verifyspec.cpp
    > /home/me/linaro/gcc-linaro-6.3.1-2017.05-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-g++ -mfloat-abi=hard --sysroot=../linaro/gcc-linaro-6.3.1-2017.05-x86_64_arm-linux-gnueabihf -Wl,-O1 -fuse-ld=gold -o verifyspec verifyspec.o   -lrt -lpthread -ldl
    > /home/me/linaro/gcc-linaro-6.3.1-2017.05-x86_64_arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/6.3.1/../../../../arm-linux-gnueabihf/bin/ld.gold: error: cannot open crt1.o: No such file or directory
    > /home/me/linaro/gcc-linaro-6.3.1-2017.05-x86_64_arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/6.3.1/../../../../arm-linux-gnueabihf/bin/ld.gold: error: cannot open crti.o: No such file or directory
    > /home/me/linaro/gcc-linaro-6.3.1-2017.05-x86_64_arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/6.3.1/../../../../arm-linux-gnueabihf/bin/ld.gold: error: cannot open crtn.o: No such file or directory
    > /home/me/linaro/gcc-linaro-6.3.1-2017.05-x86_64_arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/6.3.1/../../../../arm-linux-gnueabihf/bin/ld.gold: error: cannot find -lrt
    > /home/me/linaro/gcc-linaro-6.3.1-2017.05-x86_64_arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/6.3.1/../../../../arm-linux-gnueabihf/bin/ld.gold: error: cannot find -lpthread
    > /home/me/linaro/gcc-linaro-6.3.1-2017.05-x86_64_arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/6.3.1/../../../../arm-linux-gnueabihf/bin/ld.gold: error: cannot find -ldl
    > /home/me/linaro/gcc-linaro-6.3.1-2017.05-x86_64_arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/6.3.1/../../../../arm-linux-gnueabihf/bin/ld.gold: error: cannot find -lm
    > /home/me/linaro/gcc-linaro-6.3.1-2017.05-x86_64_arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/6.3.1/../../../../arm-linux-gnueabihf/bin/ld.gold: error: cannot find -lc
    > collect2: error: ld returned 1 exit status
    > Makefile:66: recipe for target 'verifyspec' failed
    > make: *** [verifyspec] Error 1
    

    Some of the flags are not supported,but even object files are missing.

    Any suggestions?

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

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      I've never compiled for BBB, but on raspberry there is a problem with the gold linker and the output looks similar (if I recall well). Maybe it is also better to disable it in your case. You can do it by passing -no-use-gold-linker to configure.

      (Z(:^

      K 1 Reply Last reply
      1
      • sierdzioS sierdzio

        I've never compiled for BBB, but on raspberry there is a problem with the gold linker and the output looks similar (if I recall well). Maybe it is also better to disable it in your case. You can do it by passing -no-use-gold-linker to configure.

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

        @sierdzio

        Thanks for reply.

        Unfortunately, I have a problem with my desktop, which did not boot anymore. I have to wait for it coming back from repair. :(

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

        1 Reply Last reply
        0
        • sierdzioS Offline
          sierdzioS Offline
          sierdzio
          Moderators
          wrote on last edited by
          #4

          Uh, OK. Good luck!

          (Z(:^

          K 1 Reply Last reply
          0
          • sierdzioS sierdzio

            Uh, OK. Good luck!

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

            @sierdzio

            I have activated my old machine even though it is damn slow.

            Also by using the parameter -no-use-gold-linker, I got basically the same problem.

            Command line: -device linux-beagleboard-g++ -device-option CROSS_COMPILE=/home/me/gcc-linaro-6.3.1-2017.05-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf- -sysroot /home/me/gcc-linaro-6.3.1-2017.05-x86_64_arm-linux-gnueabihf -prefix /usr/local/qtcc -no-use-gold-linker
            executing config test machineTuple
            + /home/me/gcc-linaro-6.3.1-2017.05-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-g++ -dumpmachine
            > arm-linux-gnueabihf
            test config.qtbase.tests.machineTuple succeeded
            executing config test verifyspec
            + cd /home/me/qt-everywhere-opensource-src-5.9.1/config.tests/common/verifyspec && /home/me/qt-everywhere-opensource-src-5.9.1/qtbase/bin/qmake "CONFIG -= qt debug_and_release app_bundle lib_bundle" "CONFIG += shared console single_arch" "QMAKE_CFLAGS += --sysroot=/home/me/gcc-linaro-6.3.1-2017.05-x86_64_arm-linux-gnueabihf" "QMAKE_CXXFLAGS += --sysroot=/home/me/gcc-linaro-6.3.1-2017.05-x86_64_arm-linux-gnueabihf" "QMAKE_LFLAGS += --sysroot=/home/me/gcc-linaro-6.3.1-2017.05-x86_64_arm-linux-gnueabihf" -early "CONFIG += cross_compile" /home/me/qt-everywhere-opensource-src-5.9.1/qtbase/config.tests/common/verifyspec
            + cd /home/me/qt-everywhere-opensource-src-5.9.1/config.tests/common/verifyspec && MAKEFLAGS= /usr/bin/make
            > /home/me/gcc-linaro-6.3.1-2017.05-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-g++ -c -pipe -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mthumb -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mthumb -mfloat-abi=hard --sysroot=/home/me/gcc-linaro-6.3.1-2017.05-x86_64_arm-linux-gnueabihf -O2 -O3 -Wall -W -fPIC  -I/home/me/qt-everywhere-opensource-src-5.9.1/qtbase/config.tests/common/verifyspec -I. -I/home/me/qt-everywhere-opensource-src-5.9.1/qtbase/mkspecs/devices/linux-beagleboard-g++ -o verifyspec.o /home/me/qt-everywhere-opensource-src-5.9.1/qtbase/config.tests/common/verifyspec/verifyspec.cpp
            > /home/me/gcc-linaro-6.3.1-2017.05-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-g++ -mfloat-abi=hard --sysroot=/home/me/gcc-linaro-6.3.1-2017.05-x86_64_arm-linux-gnueabihf -Wl,-O1 -o verifyspec verifyspec.o   -lrt -lpthread -ldl 
            > /home/me/gcc-linaro-6.3.1-2017.05-x86_64_arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/6.3.1/../../../../arm-linux-gnueabihf/bin/ld: cannot find crt1.o: No such file or directory
            > /home/me/gcc-linaro-6.3.1-2017.05-x86_64_arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/6.3.1/../../../../arm-linux-gnueabihf/bin/ld: cannot find crti.o: No such file or directory
            > /home/me/gcc-linaro-6.3.1-2017.05-x86_64_arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/6.3.1/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lrt
            > /home/me/gcc-linaro-6.3.1-2017.05-x86_64_arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/6.3.1/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lpthread
            > /home/me/gcc-linaro-6.3.1-2017.05-x86_64_arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/6.3.1/../../../../arm-linux-gnueabihf/bin/ld: cannot find -ldl
            > /home/me/gcc-linaro-6.3.1-2017.05-x86_64_arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/6.3.1/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lm
            > collect2: error: ld returned 1 exit status
            > Makefile:66: recipe for target 'verifyspec' failed
            > make: *** [verifyspec] Error 1
            

            There are problems with the link parameters, but the essential issues are the missing object files crt1.o and crti.o according to the output

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

            1 Reply Last reply
            0
            • K Offline
              K Offline
              koahnig
              wrote on last edited by
              #6

              Just found out that I still used Qt 5.9.1 source which was downloaded a day prior to storing Qt 5.9.2 to the archives.

              However, also Qt 5.9.2 fails in qmake.

              Command line: -device linux-beagleboard-g++ -device-option CROSS_COMPILE=/home/me/gcc-linaro-6.3.1-2017.05-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf- -sysroot /home/me/gcc-linaro-6.3.1-2017.05-x86_64_arm-linux-gnueabihf -prefix /usr/local/qtcc
              executing config test use_gold_linker
              + cd /home/me/qt-everywhere-opensource-src-5.9.2/config.tests && /home/me/gcc-linaro-6.3.1-2017.05-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-g++ -fuse-ld=gold -o conftest-out conftest.cpp
              test config.qtbase.tests.use_gold_linker succeeded
              executing config test machineTuple
              + /home/me/gcc-linaro-6.3.1-2017.05-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-g++ -dumpmachine
              > arm-linux-gnueabihf
              test config.qtbase.tests.machineTuple succeeded
              executing config test verifyspec
              + cd /home/me/qt-everywhere-opensource-src-5.9.2/config.tests/verifyspec && /home/me/qt-everywhere-opensource-src-5.9.2/qtbase/bin/qmake "CONFIG -= qt debug_and_release app_bundle lib_bundle" "CONFIG += shared use_gold_linker warn_off console single_arch" "QMAKE_CFLAGS += --sysroot=/home/me/gcc-linaro-6.3.1-2017.05-x86_64_arm-linux-gnueabihf" "QMAKE_CXXFLAGS += --sysroot=/home/me/gcc-linaro-6.3.1-2017.05-x86_64_arm-linux-gnueabihf" "QMAKE_LFLAGS += --sysroot=/home/me/gcc-linaro-6.3.1-2017.05-x86_64_arm-linux-gnueabihf" -early "CONFIG += cross_compile" /home/me/qt-everywhere-opensource-src-5.9.2/qtbase/config.tests/verifyspec
              + cd /home/me/qt-everywhere-opensource-src-5.9.2/config.tests/verifyspec && MAKEFLAGS= /usr/bin/make
              > /home/me/gcc-linaro-6.3.1-2017.05-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-g++ -c -pipe -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mthumb -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mthumb -mfloat-abi=hard --sysroot=/home/me/gcc-linaro-6.3.1-2017.05-x86_64_arm-linux-gnueabihf -O2 -O3 -w -fPIC  -I/home/me/qt-everywhere-opensource-src-5.9.2/qtbase/config.tests/verifyspec -I. -I/home/me/qt-everywhere-opensource-src-5.9.2/qtbase/mkspecs/devices/linux-beagleboard-g++ -o verifyspec.o /home/me/qt-everywhere-opensource-src-5.9.2/qtbase/config.tests/verifyspec/verifyspec.cpp
              > /home/me/gcc-linaro-6.3.1-2017.05-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-g++ -mfloat-abi=hard --sysroot=/home/me/gcc-linaro-6.3.1-2017.05-x86_64_arm-linux-gnueabihf -Wl,-O1 -fuse-ld=gold -o verifyspec verifyspec.o   -lrt -lpthread -ldl 
              > /home/me/gcc-linaro-6.3.1-2017.05-x86_64_arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/6.3.1/../../../../arm-linux-gnueabihf/bin/ld.gold: error: cannot open crt1.o: No such file or directory
              > /home/me/gcc-linaro-6.3.1-2017.05-x86_64_arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/6.3.1/../../../../arm-linux-gnueabihf/bin/ld.gold: error: cannot open crti.o: No such file or directory
              > /home/me/gcc-linaro-6.3.1-2017.05-x86_64_arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/6.3.1/../../../../arm-linux-gnueabihf/bin/ld.gold: error: cannot open crtn.o: No such file or directory
              > /home/me/gcc-linaro-6.3.1-2017.05-x86_64_arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/6.3.1/../../../../arm-linux-gnueabihf/bin/ld.gold: error: cannot find -lrt
              > /home/me/gcc-linaro-6.3.1-2017.05-x86_64_arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/6.3.1/../../../../arm-linux-gnueabihf/bin/ld.gold: error: cannot find -lpthread
              > /home/me/gcc-linaro-6.3.1-2017.05-x86_64_arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/6.3.1/../../../../arm-linux-gnueabihf/bin/ld.gold: error: cannot find -ldl
              > /home/me/gcc-linaro-6.3.1-2017.05-x86_64_arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/6.3.1/../../../../arm-linux-gnueabihf/bin/ld.gold: error: cannot find -lm
              > /home/me/gcc-linaro-6.3.1-2017.05-x86_64_arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/6.3.1/../../../../arm-linux-gnueabihf/bin/ld.gold: error: cannot find -lc
              > collect2: error: ld returned 1 exit status
              > Makefile:66: recipe for target 'verifyspec' failed
              > make: *** [verifyspec] Error 1
              

              This time a third object crtn.o is missing as well.

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

              1 Reply Last reply
              0
              • sierdzioS Offline
                sierdzioS Offline
                sierdzio
                Moderators
                wrote on last edited by
                #7

                Are you sure your toolchain is valid? It complains about crt, pthread etc. - pretty basic stuff. Try compiling a minimal C++ program with that toolchain to verify whether it works or not.

                (Z(:^

                K 1 Reply Last reply
                0
                • sierdzioS sierdzio

                  Are you sure your toolchain is valid? It complains about crt, pthread etc. - pretty basic stuff. Try compiling a minimal C++ program with that toolchain to verify whether it works or not.

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

                  @sierdzio

                  I did compile a "hello world", because I had the same doubts. The hello world did compile and link.

                  In the mean time I went back to past version of Qt 5.4.2 for checking.

                  • I do not need most recent Qtr anyhow
                  • merely a check if it has an issue with 32 bit in new Qt libs

                  The configure with Qt 5.4.2 shows even more details and I saw complains about stl-headers and the real basic C++ includes such as stdio.h and so on.

                  Apparently the include path setting is wrong. I am not sure how this is handled. Is this set for configure with -sysroot parameter?

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

                  1 Reply Last reply
                  0
                  • sierdzioS Offline
                    sierdzioS Offline
                    sierdzio
                    Moderators
                    wrote on last edited by
                    #9

                    Yes, sysroot tells the compiler where to look for usual paths lke /usr/include, /usr/libs etc. But since your hello world compiles with same sysroot, it should be OK.

                    Check out the mkspecs, maybe it is wrong. You can find mkspecs in the folder of the same name in Qt source tree.

                    (Z(:^

                    1 Reply Last reply
                    0
                    • K Offline
                      K Offline
                      koahnig
                      wrote on last edited by
                      #10

                      I had checked the toolchain with my previous installation which is gone with the crash of my desktop. Therefore, I cannot check anymore.

                      However, the toolchain for cross-compilation on my current installation is broken.

                      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