BB Black - QT toolchain available?

Hi folks,
recently bought a BeagleBone Black, and started making some interface electronics for a heating controller with touch screen.

Downloaded QTCreator, then went to get the toolchains (following the Derek Molloy book/videos), but found the angstrom-distribution.org site seems to be dead, did a search for angstrom-2011.03-x86_64-linux-armv7a-linux-gnueabi-toolchain-qte-4.6.3.tar.bz2 - all mirrors, uploads, googledrive, archive.org, etc… sites seem to have gone.

Should i switch to GTK+, what toolchain would people recommend (developing on Ubuntu)?
…or is the QT toolchain still available somewhere?

Pete.

1 Like

I would be interested if you can figure this out.

I have never been able to find/get a cross toolchain to work for the BeagleBone Black.

The only solution I have for you right now is to ‘apt get’ the appropriate tools on the BeagleBone Black itself and do the compiling directly on the board.

I do my Qt development on my PC using QtCreator then push the code to a repo. On the BeagleBone I pull the repo and compile there. It’s a PITA but it works.

Hartley

Hello @bigguiness ,

Seth here. Now, although I cannot direct you entirely along the way on this effort. I would like to see more people try it.

some background: I have, if you saw one of my elongated posts, created a rootfs and boot partitions.

Anyway, long story-short here. If you build, via buildroot along w/ the kernel and uboot, there is a particular code for promoting buildroot w/ Qt on the BBB or other variation of boards.

Now, forgive me as my education is lacking b/c, frankly, I have not tried it just yet. But, I have successfully built partitions on the BBB and been able to log in w/ the so-said build tools.

I think it is called make am335x_beagle_defconfig but do not quote me. Please review these ideas:

  1. http://bootlin.com/doc/training/buildroot/buildroot-slides.pdf
  2. http://bootlin.com/doc/training/buildroot/buildroot-labs.pdf
  3. http://bootlin.com/doc/training/buildroot/buildroot-labs.tar.xz

In the latest version (Stable) of buildroot, one can find all sorts of files and building artifacts.

I noticed that w/ the last stable build of buildroot, /board/beaglebone/rootfs_overlay/qt5 has a file in it.

I also noticed that there are ways to build upon what is already compiled w/ just a simple deletion of the rootfs and installing a new rootfs.

Seth

P.S. Also, when you run, make menuconfig , in your respective buildroot dir, one could use the / directive to search Buildroot for the correct Qt5 built which will show up in /buildroot/packages/.

Oh and sir, here: The Buildroot user manual

Although for an end user like me, this is long and drawn out but hints at some good info. for building an entire Linux Distro. Sometimes I grab some ideas around the web and other times I just make it up as I go along, i.e. uboot version, buildroot versioning, and/or what kernel to grab.

Had to get moving on this so i switched to GTK+3 - seems to work very nicely.
Expanded the root partition to 8Gb with gparted, installed libgtk-3-dev, and like you said, i do the compile directly on the BeagleBoard. A little slow but not too bad.

All the QT toolchains disappearing (even from archive sites) makes me wonder if QT Corporation issued a “cease and desist” order…

silver2row - thanks for the buildroot info, could be very handy!

I was installed qtcreator on beaglebone black (ubuntu). It is starting, but welcome screen are black and compile process throw some errors about qmake.

<Error while building/deploying project first (kit:Desktop)
When executing step “qmake”>

Hello @siler2row

I have used Buildroot for other, non-BeagleBone projects. I’m familiar with how it works and yes it is possible to do Qt development going that route. But, you lose the whole advantage of the Debian rootfs.

There should be a simple way to use a prebuilt Linaro or ARM cross toolchain to do this. Unfortunately I don’t know how to set it up or how you install the Qt libraries (or any other libraries) so they work with the cross complier.

Hello,

@bigguiness , no issue here. I must have been mistaken on what exactly I was getting into.

So, w/ Qt Creator, I am assuming it is like Eclipse (IDE) as I have not used it. But! I see in their docs. that they support GCC. This is a start.

Hey, instead of you doing this yourself, maybe we can try, conquer, or fail together on this idea.

I will report back soon on my findings on a toolchain that works w/ Buildroot or another server type OS.

Adding Compilers | Qt Creator Manual is what I found so far. I am sure you already went through this idea. I did not see that they have a set up for armhf yet but who knows what I will find.

Seth

P.S. If I lose power in the next couple of days, I will be vacant but I will keep up on informing on this page.

Hello @silverrow,

My development process my not be the best route but this works for me:

My main Qt code development is done in a Debian 9 VM on my laptop. But, I use SlickEdit for my editor. Then I have a build script that basically does a qmake -project; qmake; make. That builds the code to run in the x86 Linux VM.

I then push the code to a repo and pull it into Windows 10 on my laptop. In Windows 10 I use Qt Creator to build the project by I maintain the .pro file manually. That builds the code to run in Windows.

For the BeagleBone I pull the repo and use the same build script I use in the Debian 9 VM. That builds the code to run on the BeagleBone. On the BeagleBone I run the app using a systemd service to start it when the board is powered on. It also runs from the console (no GUI manager) but has all the Qt GUI support. I will need to dig into the details for that if you want it.

Regards

BTW, the main problem with this is that the Debian 9 VM and Windows 10 builds only take a couple minutes. But the build on the BeagleBone takes a couple hours.

I would really like a cross compiler/Qt library setup on either the Debian 9 VM or one of my real Linux machines in order to speed up the build.

I realize this is off topic so I won’t say too much. An alternative to Qt is too look at Lazarus as an IDE and cross compiler. The philosophy is write once - compile anywhere. So I did some playing around. And it was painful at times as what worked on the PC was offset on the Pi3 and the Beagle. Eventually we found the bug in the library and fixed it. The advantages of open source.
Anyway the photos are the same code running on a Beagle, Pi3, PC and even compiled with Delphi.

Lazarus can be configured to compile on the PC for the target. Or compiled on the target. And the code is reasonably portable to other architectures.

John Dammeyer

Beagle
Screenshot from 2021-05-04 18-37-28
Win10 Lazarus
WIN10-LED_Clock
Pi3
ClockDisplay
WIN10 Delphi
WIN10_Delphi_LED-Clock

@bigguiness ,

I am at a loss for words. I do not use VMs any longer and building is not easy. I agree.

I think using GCC and cross-compiling, the Qt5 or the versioning of Qt you use, is possible w/out using the built-in Debian Qt libs. and already made versioning.

I am still trying to guess here. So, bear w/ me.

If you conclude steps, 1 through 9 or whatever, I can try to build the cross-compiled versioning of a small script in Qt5 or whatever versioning. Then, I will build the image w/ your Qt5 versioning if it is available online.

See…I still think I am guessing here on what exactly needs to take place.

  1. gets required tools
    a. toolchain (ARM or linaro or whatever)
    b. bootloader (uboot or whatever)
    c. kernel (4.x.x or 5.x.x)
    d. building scripts…like buildroot or another one (Yocto)

  2. Cross-Compile the tools in question and port!
    a. Is it not customary to use sftp or another form of syncing like rsync?
    b. Also, making a Makefile with the qmake or make or gmake can help.
    c. I am sure you are aware b/c of me already reading your qmake query.
    d. So, does qmake not allow for you to use rsync to port? I know I am still missing portions of the facts here. Please forgive me.

So, I know you would still like Debian distros from rcn-ee.com or whatever the site may be currently.

Maybe that fellow, the person responsible for holding the Debian distros on his site, would be kind enough to post your builds on a specific Distro?

Anyway, I just realized that this has already been solved. I am sorry to waste your time.

Seth

P.S. If something comes up and Qt5 gets installed via Buildroot on my end and I get a SDK going, I will then reply once more.

In the Second Edition of the Derek Molloy’s Exploring BeagleBone book, there is a description on how to install Qt 5. on a Debian based image. The older First edition uses the Angstrom images which are a bit out of date.

On the BeagleBone, you would do the following to install Qt 5.x:
NOTE: I am running a 5.4 Kernel version on a BeagleBone Black
debian@beaglebone:~$ sudo apt-get update
debian@beaglebone:~$ apt-cache search qt5
debian@beaglebone:~$ sudo apt install qt5-default

You can verify that Qt is installed by running qmake:
debian@beaglebone:~$ qmake --version
** QMake version 3.1**
** Using Qt version 5.11.3 in /usr/lib/arm-linux-gnueabihf**

You can check this by compiling the simpleQt example from the exploringBB example code from the GitHub repo:

exploringBB/chp13/simpleQt$ make
arm-linux-gnueabihf-g++ -c -pipe -O2 -Wall -W -D_REENTRANT -fPIC -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -I. -isystem /usr/include/arm-linux-gnueabihf/qt5 -isystem /usr/include/arm-linux-gnueabihf/qt5/QtWidgets -isystem /usr/include/arm-linux-gnueabihf/qt5/QtGui -isystem /usr/include/arm-linux-gnueabihf/qt5/QtCore -I. -I/usr/lib/arm-linux-gnueabihf/qt5/mkspecs/linux-g++ -o simpleQt.o simpleQt.cpp
arm-linux-gnueabihf-g++ -Wl,-O1 -o simpleQt simpleQt.o   -lQt5Widgets -lQt5Gui -lQt5Core -lGLESv2 -lpthread

You may need to add the GLES dependencies if you do not already have them installed.

To cross compile this from a Debian or Ubuntu system/VM, you first need the following toolchain:
gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabihf.tar.xz
https://releases.linaro.org/components/toolchain/binaries/latest-7/arm-linux-gnueabihf/

These are some references for setting this up:
For EGLS on the Beaglebone, I found this site to be useful:

https://elinux.org/BeagleBoneBlack/SGX_%2B_Qt_EGLFS_%2B_Weston#QtQuick_.2B_EGLFS

This is older but close:
https://sites.google.com/site/timpicuc/Downhome/beaglebone-black/setting-up-qt-for-bbb-with-debian

This is a long discussion regarding getting EGLFS working from cross compiling:
https://groups.google.com/g/beagleboard/c/_5HBr8MEcaU/m/8lCgo27tBQAJ?utm_medium=email&utm_source=footer&pli=1](https://groups.google.com/g/beagleboard/c/_5HBr8MEcaU/m/8lCgo27tBQAJ?utm_medium=email&utm_source=footer&pli=1

I hope this helps.

Jon

1 Like

Thanks for all the replies - will carry on using GTK+ for the moment, does everything i need and am happy without an IDE - no problems so far.

@jcdammeyer - got a few other projects coming up so will definitely grab a copy of Lazarus - used to love Borland Delphi…