Problem Cross compiling QT for BeagleBone Black running Debian

  • I'm having trouble setting up Qt Creator to Cross compile from an X86 Kubuntu 12.04 system to a Beagle Bone Black running Debian Jessie (testing) with QT4 (qt4.8.2) installed.

    I've set up QtCreator with the sysroot from the debian build, and the cross compiler recommended by the debian build system.

    Where I'm running into trouble is that QtCreator seems to want a cross qmake for the BBB debian build and I don't know how/where to get it. If I point QtCreator at the local qmake, it then says that the cross compiler can't create code for the Qt04.8.1 that I'm building for on my desktop system.

    If I try to add the BBB qmake to get a new QT version the dialog just closes, apparently because the qmake is compiled for the BBB.

    I've got the QtCreator cross compile kit pointing at the mkspec in the debian sysroot but apparently because of the qmake problem, it isn't using the specified cross compiler, but just plain g++.

    If anyone can point me in the proper direction to solve this I would greatly appreciate the help.

  • Hi,

    Have you read these links already:

    I haven't tried with Beaglebone Black, or Qt4.x to be exact, but so far on the embedded devices I have managed to cross-compile Qt5, the cross-compilation setup requires the image for the embedded board to be present.

    Then, when cross-compiling Qt, the host system (your X86 Kubuntu 12.04 for example) will get a qmake binary and support files, x86 arch - and the mounted image for your embedded device will receive the cross-compiled Qt libraries (arm, mips, whatever).

    That same image should be loaded to your embedded board.

    The x86 qmake will always look for the cross-compiled libraries in the host system, in order to help build your embedded apps - along with the embedded gcc which should also be available.

    So in the end, Qt Creator will combine these 3 elements, plus the actual device to which the apps will be deployed:

    • embedded gcc
    • qmake built of the dev host arch
    • cross-compiled Qt libraries accessible where qmake expects them to be, on the mounted embedded image.

    This may not be the only functional method for a cross-compiled development environment on embedded devices, but usually this is how it goes. In any case, maybe the Beaglebone Black specific links above will help you.

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.