Important: Please read the Qt Code of Conduct -

I need a qmake for the BeagleBone Black

  • Hi, all -

    I've recently been playing with the Beaglebone Black device. I'm to the point where I'm trying to do some cross-development for it. I want to use Creator (since Eclipse sucks). I think I have it mostly set up, but evidently I need a special version of qmake.

    This is my first effort at cross-development using Creator. I'm a little confused, because I thought that qmake built the makefile, using the qmake.conf file, and I'm not sure why you'd need a different version for every platform (seems like that's what the .conf file is for). But, the real issue is: where do I get such a qmake? My google efforts have been mostly red herrings.

    I'm running the latest and greatest of Qt Creator, and my toolchain is the GNU for ARM.

    Thanks for any help.

  • Lifetime Qt Champion


    You get that qmake when you cross-compile Qt for your target.

  • Thank you, SGaist. At this time, I'm not trying to get Qt running on the BBB; I'd like to begin with just using Creator as a cross-development IDE for generic C/C++ applications.

    So, is there no pre-existing qmake that I can use for this?

  • Lifetime Qt Champion

    In that case, create you own mkspec that will fit your needs and you should be able to start building stuff. Take for example the linux-beagleboard-g++ mkspec.

  • I will try this. I looked for a page on creating my own mkspec, and didn't find anything that seemed quite right. Can you point me to a resource?

  • Another option is to download tisdk for beaglebone black from Texas Instruments. It contains all what you need. Here you have nice tutorial how to get started with Qt and QtCreator with beaglebone.

  • Hi, There are some useful videos here that could be of some help for cross-compiling qt on Beaglebone black.

  • Thank you, Tomas and Sush. I'm downloading the TI SDK right now. I've used Dr. Molloy's resources in the past, and will continue to do so, but they're something of an exercise in frustration, given that they're a couple years old and so much has changed. The link to the Angstrom distribution, for example, is gone. (This isn't especially important to me as I'm kind of committed to Debian.)

    All I want to do (for now) is just cross compile and debug code running on the BBB using Creator. I'm a little surprised at how much effort seems to be necessary to do this, but maybe it's just my lack of expertise in this area.

    Thanks again for the suggestions...

  • Lifetime Qt Champion

    @mzimmers As alternative you could use a make or CMake project.

  • You can check if it helps:

  • Thanks for the suggestions, everyone. After reviewing the alternatives, I think maybe it's best that I just go ahead and build Qt for the BBB. As SGaist suggested in his first post, that should give me the qmake I'm having so much trouble finding.

    I found this tutorial on how to do this:

    Cross-compiling Qt

    It's a bit old, and I know there have been some changes to Qt of late. Can anyone comment on whether it's still valid?

    Thank you.

  • Well, I answered my own question above: the instructions on that page call for copying from a directory mkspecs/qws, but no such directory exists. Has qws (whatever it is) been deprecated?

    luca: thank you for the information on the blog. I already have my toolchain (downloaded from linaro) and can download files via scp since my BBB has Internet connectivity. I still don't see where in your steps I'm going to get a qmake. Does this happen when I build Qt (as SGaist) said?

    Also, Luca: it appears that linaro has changed the structure of their download directories; you might want to update your blog to reflect that.

  • With a lot of help from SGaist, I was able to successfully build Qt for the BBB, thereby getting the qmake that I needed. Here's a little information on how we got this working:

    • the build command that finally worked is this:
    ~/Qt/5.8/Src/qtbase/configure -platform linux-g++ -xplatform linux-arm-gnueabi-g++ -release -device linux-beagleboard-g++ \
      -sysroot /opt/arm-toolchain/sysroot-glibc-linaro-2.23-2016.11-arm-linux-gnueabihf/ \
     -prefix ~/QtForBBB \
    -device-option CROSS_COMPILE=/opt/arm-toolchain/gcc-linaro-6.2.1-2016.11-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf- \
     -qt-xcb \
     -nomake tests -nomake examples -no-opengl 
    • I needed to download the sysroot as well as the toolchain. This wasn't explicit from the directions. Make sure that the two downloads are for the same platform.

    • it's a good idea to run the configure on an empty directory.

    • when the configure runs successfully to completion, it will tell you to run make but not make install. My experience was that I had to run make, then run make install, in order to get everything I needed.

    • I never did find out why that trailing dash ("-") is needed on the pathname for CROSS_COMPILE, but it is indeed necessary.

    • after you get Qt configured and made, you'll go into Creator (assuming you're using Creator) and create new entries for the compilers (C and C++) and debugger. You'll then use these new entries for a new kit you'll make for the BBB.

    Hopefully, this information will help other people who are doing this as their first build. Feel free to ask questions, as I'm sure I missed some things. Thanks again to everyone who assisted.

  • Lifetime Qt Champion

    That's because the CROSS_COMPILE value will be used as prefix to call all tools.

    Something a bit like:

    CC = $${CROSS_COMPILE}gcc

  • Hi all,

    I am new to both Qt and Beaglebone Black.
    I am trying to make qmake for Beaglebone black.

    Mzimmers wrote here: "I needed to download the sysroot as well as toolchain"

    Can anybody tell me where from I can download the sysroot.
    I have downloaded and installed the the linaro toolchain

    Thanks in advance for the help.


  • Hi, Sajeevan -

    Where did you get your cross-development toolchain? If possible, it's probably a good idea to get them from the same location. As the code in my command indicates, I got both from Linaro's site.


    The toolchain is the 2nd item from the bottom in the list.

  • Hi Mzimmers,

    Thank You very much. I have been searching for sysroot everywhere except in Linaro sight!!


  • @mzimmers
    Hi, maybe can you send me the procedure that you follow to set-up it?


  • Hi, Dario -

    What exactly are you looking for? Post 14 in this topic outlines the steps to get a qmake you can use with the Beaglebone. Let me know if you need more detail on a particular step.

  • @mzimmers I am really new in this.
    I trying to configure Qt to use with the Beaglebone by Cross-compile
    I followed some step from several tutorials, but some links are down or are so old, and I get some errors.
    I want to compile QT 5.8 because I need to use the Modbus library, But I dont know how to start to set up
    1.- I have a computer where I have installed Ubuntu 16.04 on a virtual machine using virtualbox.
    2.- I downloaded the lasted toolchain and the sysroot from linaro
    What are the next step in detail?
    My Beaglebone has the lasted image from the oficial page Debian 8.7 2017-03-19 4GB SD LXQT

    I'm sorry for my English, I'm a Spanish speaker.

  • Hi, Dario -

    Unfortunately, I had to rebuild my system this weekend, so I don't have an active BBB configuration right now. If you have the toolchain and sysroot, the next step is to build qmake for BBB. Use the configure command I listed in post #13 in this thread, and then make and make install.

    When I get to rebuilding my BBB configuration, I'll be happy to help you more, but it's not a high priority, so it may take me some time.

  • @mzimmers Hi, would you be able to share the changes you made to qmake.conf? I'm trying to build 5.8 using your instructions above.

  • @sxr3455 I'd like to help, but I haven't touched my BBB in over 3 years, and I can't even find my old work, so I'm afraid I can't help much.

    Did you look at this page?

    It's out of date, but I recall it being helpful. Good luck.

  • @mzimmers I am not able to access the link. Do you have a proper working link?

  • Lifetime Qt Champion

    @sxr3455 If you take a closer look at the link @mzimmers posted you will see that there is a typo. Here is correct and working link:

  • @jsulm doh...that's what happens when I'm rushing. Link is fixed in my post; thanks for catching it, jsulm.

Log in to reply