Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Beaglebone Cross compile setup



  • Hello,

    First of all, I want to mention I've never worked QT and Linux before. I'm quite new to this environment.

    I've been trying to develop a simple application for Beaglebone Black.

    After I've searched quite bit, I've seen there a lot of information on internet but most of them are out-ouf-date. I just need to some guidance to setup the environment if you anyone can help.

    In last 3 days, I've learned that;
    -Get an image for BBB (I've created with Debian 9.5 2018-10-07 4GB SD LXQT which has GCC 6.3.0)
    -Download Linaro Arm Toolchain ( https://releases.linaro.org/components/toolchain/binaries/6.3-2017.05/arm-linux-gnueabihf/)
    -Download QT (I've used binary file again from http://download.qt-project.org/official_releases/qt/5.9/5.9.0/)
    First I've used the online installer (qt-unified-linux-x64-4.0.1-online.run). I was able to build a demo application for linux but I couldnt create a kit for Beaglebone Black. As I understood I need to compile from source code with ./configure to be able to create qmake for BBB.

    I've tried to use this config

    ./configure -device linux-beagleboard-g++ -device-option CROSS_COMPILE=home/grkan/opt/gcc-linaro-6.3.1-2017.05-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf- -sysroot home/grkan/opt/arm-toolchain/sysroot-glibc-linaro-2.23-2017.05-arm-linux-gnueabihf -opensource -confirm-license -optimized-qmake -release -make libs -prefix /usr/local/qt5bbb -hostprefix /usr/local/qt5bbb -qt-zlib -qt-libpng -openssl -v
    

    But I'm getting this output in log file

    Command line: -device linux-beagleboard-g++ -device-option CROSS_COMPILE=home/grkan/opt/gcc-linaro-6.3.1-2017.05-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf- -sysroot home/grkan/opt/arm-toolchain/sysroot-glibc-linaro-2.23-2017.05-arm-linux-gnueabihf -opensource -confirm-license -optimized-qmake -release -make libs -prefix /usr/local/qt5bbb -hostprefix /usr/local/qt5bbb -qt-zlib -qt-libpng -openssl -v
    executing config test verifyspec
    + cd /home/grkan/QtForBBB/qt-everywhere-opensource-src-5.9.0/qtbase/config.tests/common/verifyspec && /home/grkan/QtForBBB/qt-everywhere-opensource-src-5.9.0/qtbase/bin/qmake "CONFIG -= qt debug_and_release app_bundle lib_bundle" "CONFIG += shared console single_arch" "QMAKE_CFLAGS += --sysroot=home/grkan/opt/arm-toolchain/sysroot-glibc-linaro-2.23-2017.05-arm-linux-gnueabihf" "QMAKE_CXXFLAGS += --sysroot=home/grkan/opt/arm-toolchain/sysroot-glibc-linaro-2.23-2017.05-arm-linux-gnueabihf" "QMAKE_LFLAGS += --sysroot=home/grkan/opt/arm-toolchain/sysroot-glibc-linaro-2.23-2017.05-arm-linux-gnueabihf" -early "CONFIG += cross_compile" /home/grkan/QtForBBB/qt-everywhere-opensource-src-5.9.0/qtbase/config.tests/common/verifyspec
    > /home/grkan/QtForBBB/qt-everywhere-opensource-src-5.9.0/qtbase/mkspecs/features/toolchain.prf:129: Variable QMAKE_CXX.COMPILER_MACROS is not defined.
    > Project ERROR: Compiler home/grkan/opt/gcc-linaro-6.3.1-2017.05-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-g++ not found. Check the value of CROSS_COMPILE -device-option
    

    I can confirm that home/grkan/opt/gcc-linaro-6.3.1-2017.05-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-g++ is existing.

    I've tried installing qt5.15.2 (http://download.qt-project.org/official_releases/qt/5.15/5.15.2/single/)
    With ./configure I'm getting following error and nothing in log file

    + cd qtbase
    + /home/grkan/QtForBBB/qt-everywhere-src-5.15.2/qtbase/configure -top-level -device linux-beagleboard-g++ -device-option CROSS_COMPILE=home/grkan/opt/gcc-linaro-6.3.1-2017.05-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf- -sysroot home/grkan/opt/arm-toolchain/sysroot-glibc-linaro-2.23-2017.05-arm-linux-gnueabihf -opensource -confirm-license -optimized-qmake -release -make libs -prefix /usr/local/qt5bbb -hostprefix /usr/local/qt5bbb -qt-zlib -qt-libpng -openssl -v
    Creating qmake...
    make: Nothing to be done for 'first'.
    Command line: -device linux-beagleboard-g++ -device-option CROSS_COMPILE=home/grkan/opt/gcc-linaro-6.3.1-2017.05-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf- -sysroot home/grkan/opt/arm-toolchain/sysroot-glibc-linaro-2.23-2017.05-arm-linux-gnueabihf -opensource -confirm-license -optimized-qmake -release -make libs -prefix /usr/local/qt5bbb -hostprefix /usr/local/qt5bbb -qt-zlib -qt-libpng -openssl -v
    Project ERROR: Cannot run target compiler 'home/grkan/opt/gcc-linaro-6.3.1-2017.05-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-g++'. Output:
    ===================
    ===================
    Maybe you forgot to setup the environment?
    
    

    Can someone please direct in a direction so I can build QT and start developing the application please?

    Thank you.
    Gurkan


  • Lifetime Qt Champion

    @Grkan said in Beaglebone Cross compile setup:

    CROSS_COMPILE=home/grk

    You're missing a / here:

    CROSS_COMPILE=/home/grk
    


  • Thank you @jsulm, I've missed that part. It has been compiled and I'm available to deploy and debug right now.


Log in to reply