There are too few information available on how to easily setup QT environment for building Beaglebone applications (command line or GUI). In this tutorial we will compile QT and setup the environment from scratch.
1. My environment
- Host: Ubuntu 12.10 32bit (VMplayer)
- Target: BeagleBone Black running Angstrom
- QT: 4.8.5
2. Setup Angstrom cross-compile toolchain for Linux
Download angstrom-2011.03-x86_64-linux-armv7a-linux-gnueabi-toolchain-qte-4.6.3.tar.bz2 for 64bit host or angstrom-2011.03-i686-linux-armv7a-linux-gnueabi-toolchain-qte-4.6.3.tar.bz2 for x86 (or download more recent version at http://www.angstrom-distribution.org/toolchains/). (The Angstrom website is down for 3 weeks – meanwhile you can download the required toolchains from my gdrive – https://googledrive.com/host/0B3Z340LOBulvMG5NRmNlZEppSEE)- Run
1$ tar -C / -xjf angstrom-2011.03-i686-linux-armv7a-linux-gnueabi-toolchain-qte-4.6.3.tar.bz2
3. Download and un-tar QT
1 2 3 |
$ wget http://download.qt-project.org/official_releases/qt/4.8/4.8.5/qt-everywhere-opensource-src-4.8.5.tar.gz $ tar -xzf qt-everywhere-opensource-src-4.8.5.tar.gz $ mv qt-everywhere-opensource-src-4.8.5 qt-4.8.5-beagle |
4. Create qmake.conf
1 2 3 4 |
$ cd qt-4.8.5-beagle $ mkdir ./mkspecs/qws/linux-am335x-g++ $ cp ./mkspecs/qws/linux-arm-g++/qplatformdefs.h ./mkspecs/qws/linux-am335x-g++ $ touch ./mkspecs/qws/linux-am335x-g++/qmake.conf |
Add the following to qmake.conf with your favorite editor:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# # qmake configuration for building with arm-linux-g++ # include(../../common/linux.conf) include(../../common/gcc-base-unix.conf) include(../../common/g++-unix.conf) include(../../common/qws.conf) # modifications to g++.conf #Toolchain #Compiler Flags to take advantage of the ARM architecture QMAKE_CFLAGS_RELEASE = -O3 -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp QMAKE_CXXFLAGS_RELEASE = -O3 -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp QMAKE_CC = /usr/local/angstrom/arm/arm-angstrom-linux-gnueabi/bin/gcc QMAKE_CXX = /usr/local/angstrom/arm/arm-angstrom-linux-gnueabi/bin/g++ QMAKE_LINK = /usr/local/angstrom/arm/arm-angstrom-linux-gnueabi/bin/g++ QMAKE_LINK_SHLIB = /usr/local/angstrom/arm/arm-angstrom-linux-gnueabi/bin/g++ # modifications to linux.conf QMAKE_AR = /usr/local/angstrom/arm/arm-angstrom-linux-gnueabi/bin/ar cqs QMAKE_OBJCOPY = /usr/local/angstrom/arm/arm-angstrom-linux-gnueabi/bin/objcopy QMAKE_STRIP = /usr/local/angstrom/arm/arm-angstrom-linux-gnueabi/bin/strip load(qt_config) |
5. Configure QT embedded
1 |
./configure -v -opensource -confirm-license -prefix /opt/qt -embedded arm -platform qws/linux-x86-g++ -xplatform qws/linux-am335x-g++ -depths 16,24,32 -no-mmx -no-3dnow -no-sse -no-sse2 -no-glib -no-cups -no-largefile -no-accessibility -no-openssl -no-gtkstyle -qt-mouse-pc -qt-mouse-linuxtp -qt-mouse-linuxinput -plugin-mouse-linuxtp -plugin-mouse-pc -fast -little-endian -host-big-endian -no-pch -no-sql-ibase -no-sql-mysql -no-sql-odbc -no-sql-psql -no-sql-sqlite -no-sql-sqlite2 -no-webkit -no-qt3support -nomake examples -nomake demos -nomake docs -nomake translations |
6. Build and install
1 2 |
$ make -j 4 $ sudo make install |
“-j 4” will run the long build process reusing 4 CPU cores, you can change to your own CPU cores amount.
7. Install Qt SDK (lib) we built previously on your board
- Make sure you beaglebone is connected to your host
- ssh to your beagle (ssh root@192.168.7.2)
- Create dir structure from your prefix:
12root@beaglebone:/# mkdir /optroot@beaglebone:/# mkdir /opt/qt - Copy lib from your host to beagle:
1$ scp -r /opt/qt/lib root@192.168.7.2:"/opt/qt" - Add the lib directory to path by editing /etc/profile and adding:
1PATH="...:/opt/qt/lib"
8. Download, install and configure QT Creator
- I suggest installing QT Creator using regular installer:
- Download qt-creator-linux-x86-opensource-2.8.0.run for x86 or qt-creator-linux-x86_64-opensource-2.8.0.run for 64bit
-
12chmod +x qt-creator-linux-x86_64-opensource-2.8.0.run./qt-creator-linux-x86_64-opensource-2.8.0.run
- Follow installation Wizard
- Run Angstrom toolchain environment setup:
1$ . /usr/local/angstrom/arm/environment-setup - Open Qt Creator and
- Configure Qt version
- Go to Tools->Options->Build & Run->Qt Versions and click Add
- Select qmake.conf from /opt/qt/bin
- Click Ok
- Configure target device connection
- Go to Tools->Options->Devices
- Click Add and select Generic Linux Device
- Add IP 192.168.7.2, User: root
- Set name to “Beaglebone”
- Click Ok
- Configure Compiler
- Go to Tools->Options->Build & Run->Compilers and click Add->GCC
- Select compiler path: /usr/local/angstrom/arm/bin/arm-angstrom-linux-gnueabi-g++
- Click Ok
- Configure Kit
- Go to Tools->Options->Build & Run->Kits and click Add
- Call new kit Beaglebone
- Select device type: “Generic Linux Device”
- Select the device you previously created
- Select compiler you created
- Select Qt version you created
- Select GDK path as /usr/local/angstrom/arm/bin/arm-angstrom-linux-gnueabi-gdk
- Click Ok
9. Build Qt application
- Create new project (File->New project->Qt Project->Qt Console application)
- Edit your project (.pro) file
- Add the following after “TARGET=…” line:
123target.files = <YOUR EXECUTABLE NAME>target.path = /home/rootINSTALLS = target - Go to Projects -> Run, you should see on “Files to deploy” table your “target” settings
- Now you are ready to build and deploy you project on your target board
- The following example application should print Hello world inside your console:
1234567891011#include <QCoreApplication>#include <iostream>int main(int argc, char *argv[]){QCoreApplication a(argc, argv);std::cout << "hello world" << std::endl;return a.exec();}
Good luck!
Meir Tseitlin
Hi Meir,
Thanks a lot for your detailed description. I tried to follow the instruction, however I got error when configure QT embedded which shows “syntax error near unexpected token ‘&’ “, then I removed ‘ ‘ part, however I still got error as follows:
“g++ -c -o project.o -pipe -DQMAKE_OPENSOURCE_EDITION -g -I. -Igenerators -Igenerators/unix -Igenerators/win32 -Igenerators/mac -Igenerators/symbian -Igenerators/integrity -I/home/lirui/Downloads/qt-4.8.5-beagle/include -I/home/lirui/Downloads/qt-4.8.5-beagle/include/QtCore -I/home/lirui/Downloads/qt-4.8.5-beagle/src/corelib/global -I/home/lirui/Downloads/qt-4.8.5-beagle/src/corelib/xml -I/home/lirui/Downloads/qt-4.8.5-beagle/tools/shared -DQT_NO_PCRE -DQT_BUILD_QMAKE -DQT_BOOTSTRAPPED -DQLIBRARYINFO_EPOCROOT -DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT_NO_COMPONENT -DQT_NO_STL -DQT_NO_COMPRESS -I/home/lirui/Downloads/qt-4.8.5-beagle/mkspecs/qws/linux-x86-g++ -DHAVE_QCONFIG_CPP -DQT_NO_THREAD -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT -DQT_NO_DEPRECATED project.cpp
make: g++: Command not found
make: *** [project.o] Error 127”
This indicates that g++ is not installed, however, I guess when run “$ tar -C / -xjf angstrom-2011.03-i686-linux-armv7a-linux-gnueabi-toolchain-qte-4.6.3.tar.bz2”, the g++ should be installed, right?
Can you help on this issue?
Thanks a lot,
Ray
Hi,
You were right some irrelevant HTML symbols somehow appeared in configuration parameters…. I removed them, should work now
Regarding missing g++ – please check you have “/usr/local/angstrom” folder available (you need root permissions to run ” tar -C / -xjf angstrom-2011.03-i686-linux-armv7a-linux-gnueabi-toolchain-qte-4.6.3.tar.bz2″)
Hi Mier,
I got the same result as Ray when trying to run ./configure:
g++ -c project…etc.
make: g++: Command not found
make: *** [project.o] Error 127
I have root permissions and acess to the “/usr/local/angstrom” folder.
Any suggestions would be appreciated,
Thanks,
Kim
Hi,
I tried to figure out the root cause, by reading your configure option again, I found actually the g++ needed is the one for x86, after install it, the configure can run. Thanks anyway
Best regards,
Ray
You need Angstrom g++ for cross compile (I don’t see any place x86 version is needed). Angstrom g++ path is mentioned in qmake.conf you created in step 4
I am facing the same problem, can you please tell me what stuff you did for configuring x86 g++.
Hi Meir,
Many thanks for the tutorial. I am looking over it and do not quite understand if you are upgrading QT to latest 4.8.5 only on the target BBB or also in the cross-toolchain on your PC? The Angstrom cross toolchains are unfortunately very old from March 2011 and offer QT 4.6.3 only as far as I understand…
Thanks,
Anguel
You are actually recompiling QT 4.8.5 from source code using Angstrom toolchain. Toolchain is a cross compiler and its version is not important as long as architecture (armv7a) didn’t changed and additional features was not added to the compiler itself.
I assume you can compile any C++ code with this toolchain, even if it is not QT (don’t catch me on this – I didn’t checked it).
I hope I answered your question clearly.
Many thanks for your answer, so you are rebuilding the complete Qt. I was a bit confused, because Derek Molloy actually uses the same premade Angstrom 2011.03 toolchain which already contains an old Qt 4.6 to build for the Beaglebone which on the other hand seems to have a newer Qt Embedded 4.8, so I think there are some library incompatibilites to expect with his setup: http://derekmolloy.ie/beaglebone/qt-with-embedded-linux-on-the-beaglebone/
I also noticed that there is a newer Angstrom toolchain which does not have Qt in its name:
angstrom-eglibc-x86_64-armv7a-vfp-neon-v2012.12-toolchain.gz
Just wondering if one can use that toolchain. Probably not, as the environment setup script will be missing…
Anguel
Looks like the newer file is no toolchain archive like the one you use but some single 71 MB text file…
Many thanks for the great work. I was able to reproduce it with very little problems.
Now I would like to compile it with *hf compiler so I can use it on Ubuntu or Debian distros for BBB.
Do you know if there is a recipe around to do it?
Unfortunately I didn’t tried it…
Hi,
First off thanks for the article. I found it very helpful and it did get be going.
I do have one question in the configure kit section you say:
“◾Select GDK path as /usr/local/angstrom/arm/bin/arm-angstrom-linux-gnueabi-gdk”
It not clear to me where I do this on the kit setup page.
Thanks again.
Jack
I had the same problem, this option is also not available on Qt3.0.0. I assume it should be GDB . I configured it as DGB .. /usr/local/angstrom/arm/bin/arm-angstrom-linux-gnueabi-gdb and it seems to be working.. limited testing but both console and gui apps was tested
I tried to install qt-creator on beaglebone directly.
so I downloaded qt-create on qt-web site, and typed ”
chmod +x qt-creator-linux-opensource-2.8.1.run
./qt-creator-linux-opensource-2.8.1.run
”
but beagle bone answered
‘./qt-creator-linux-x86-opensource-2.8.0.run: cannot execute binary file’
what’s problem?
I am currently working throught this guide and I had a problem at step 6 during the make. I got an error ‘undefined reference to clock_gettime()’. to solve it I added -lrt at the end of the LFLAGS in the file /src/corelib/Makefile
Hello,
I am currently on step 8 and I was wondering how I can set the path for GDK, I can’t find the option anywhere.
Thanks
Hi Meir,
Thank you for the great work with this guide. However I now have a problem with displaying my applications. As long as I keep it on the console everything is working as expected, but when I try a Frame the programm freezes. For testing I created a new Qt-GUI-application, left everything as it were, modified the .pro file, built the application, copied it to the BBB, but when I try to run it nothing happens.
Can someone please tell me what I am missing?
Best regards
Rafael
Maybe you have forgotten the -qws.. just run ./your_app -qws on the beaglebone.
Really very good documentation. But, I am little bit intrested to build qt-everywhere5.0.0 or qt-everywhere5.0.1. Do you have any idea? How will i build qt5.0.1 or qt5.0.0 for beaglebone or AM335x ARM SitaraKit
Very nice documentation but have you tried for qt-everywhere.5.0.1?
Great tutorial, very usefull as Angstrom is not working that much to work with qt from ground up, and #beagle is not more helpful, so thanks.
Anyway, even if I’ve follow all the steps the file on the target seems to miss libs : “-bash: ./TestQtapp: No such file or directory”
ldd gives “not a dynamic executable” while prints :
“ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.16, not stripped”
Even I’ve installed Qt 5.1 I’ve checked that the app was created with the compiled 4.8.5 as said here.
May you please tell me what I did wrong ?
Hi thanks for this,
Nevertheless, when I try to start my Qtapp via ssh I have “stdin : is not a tty bash :no such file or directory” , ldd :”no shared Library” even if readelf gives correct detail. What did I missed please ?
Sorry, delete my previous comment during moderation
Thanks, That is very great work.
Can you help me , i can run QT application with window als with -qws flags. no window shown up. do you know what is the problem?
Thank you for sharing! I have just followed you, but when I run “./configure” with parameters that you showed, I received a notice that is
“The specified system/compiler is not supported:
/home/khatkhuong/qt-4.8.5-beagle/mkspecs/qws/linux-am335x-g++
Please see the README file for a complete list.”.
I don’t know why I received that notice, and I don’t know what I should be continuos.
Thanks!
Hello,
After performing step no 5. i get following error, please help
Determining system architecture…
(Linux:3.2.0-29-generic-pae:i686)
32-bit Intel 80×86 (i386)
‘arm’ is supported
‘i386’ is supported
System architecture: ‘arm’
Host architecture: ‘i386’
ERROR: Cannot set the compiler for the configuration tests
Thanks in Advance !!!!!!
I figured it out myself, the problem was with the qmake.conf, it was blank.
When i filled it with above said info the error was fixed. But at next step i had same problem as that if Ray.
Hello
i am facing the same problem as that of Ray
make:*** (project.o) Error 127
I can see g++ file at
usr/ local/ angstrom /arm /arm-angstrom – linux-gnueabi /bin/g++
I had run the tar command and config command using sudo
can you please help….
Its bit urgent….
Guys, sorry this stupid question, but, where to download all this stuff? In which directory? To the root? To Downloads? In which directory all installation should reside? Or may be possible to obtain image with QT?
As per my knowledge it should be in Download directory.
People, who use LCD capes with touchscreens (4DCape) should suggest make/install TSLIB before QT and add -qt-mouse-tslib in the .configure parameters. And google TSLIB with QT for set lib PATHes correctly.
make/install TSLIB before QT ??
How is that
and add -qt-mouse-tslib not sufficinet ??
the angstrom-distribution site seems to be down. Do you know of a mirror from which to download angstrom-2011.03-i686-linux-armv7a-linux-gnueabi-toolchain-qte-4.6.3.tar.bz2 ?
Thanks
I can´t download the toolchains the website is down, is there another website to download the toolchains?
Great Tutorial
Thankyou
Hello,
I am trying to find the toolchain you mentioned, but the website has been doen for some time now. Could you please email it to me or post on the website?
Thank you!!!
Cannot find http://www.angstrom-distribution.org/toolchains/angstrom-2011.03-i686-linux-armv7a-linux-gnueabi-toolchain-qte-4.6.3.tar.bz2
Do you have a copy for me?
Thanks
Errol
Better late than never – I shared the toolchain on my gdrive:
https://googledrive.com/host/0B3Z340LOBulvMG5NRmNlZEppSEE
Enjoy
Would anyone happen to have a copy of :
http://www.angstrom-distribution.org/toolchains/angstrom-2011.03-i686-linux-armv7a-linux-gnueabi-toolchain-qte-4.6.3.tar.bz2
angstrom-distribution.org is down and no timetable for its return has been published.
Thanks !
Better late than never – I shared the toolchain on my gdrive:
https://googledrive.com/host/0B3Z340LOBulvMG5NRmNlZEppSEE
Enjoy
Pingback: Qt cross compiler for Raspberry Pi (+cam) and Beagle bone with OpenCV and v4l | aplacetogeek
A 64bit toolchain can be found on here
aplacetogeek.wordpress.com/qt-opencv-v4l-cross-compiling-raspberry-pi-beagle-bone/
in the first section you’ll find an alternative link to mega.co.nz
can’t find the 32 bit one right now.
I hope it helps!
Better late than never – I shared the toolchain on my gdrive:
https://googledrive.com/host/0B3Z340LOBulvMG5NRmNlZEppSEE
Enjoy
Hello,
I build up my Qt 4.8.5 exactly with this tutorial. I can perfectly build, run and debug Qt console applications on my Beaglebone Black. But as soon as I create a GUI application I get the error “cannot connect to X server” even I give it the -qws option:
root@beaglebone:/opt/TestApp/bin# ./TestApp -qws
QIconvCodec::convertFromUnicode: using Latin-1 for conversion, iconv_open failed
Qml debugging is enabled. Only use this in a safe environment!
QIconvCodec::convertToUnicode: using Latin-1 for conversion, iconv_open failed
TestApp: cannot connect to X server
*** glibc detected *** ./TestApp: munmap_chunk(): invalid pointer: 0xb5f89d88 ***
Aborted
I’ve got other applications with GUI which are working fine with -qws option, but don’t know how they are build.
Has someone an idea what is missing?
Has someone tried to build a GUI application with this tutorial, too?
Thanks in advance!
I don’t have the i686 version, but here is a link to the x86_64 version :
http://www.mediafire.com/download/y36tdnkw3cagjwb/angstrom-2011.03-x86_64-linux-armv7a-linux-gnueabi-toolchain-qte-4.6.3.tar.bz2
Better late than never – I shared the toolchain on my gdrive:
https://googledrive.com/host/0B3Z340LOBulvMG5NRmNlZEppSEE
Enjoy
Cannot find http://www.angstrom-distribution.org/toolchains/angstrom-2011.03-i686-linux-armv7a-linux-gnueabi-toolchain-qte-4.6.3.tar.bz2
Do you have a copy for me?
Thanks
Errol
Better late than never – I shared the toolchain on my gdrive:
https://googledrive.com/host/0B3Z340LOBulvMG5NRmNlZEppSEE
Enjoy
Where can I get http://www.angstrom-distribution.org/toolchains/angstrom-2011.03-i686-linux-armv7a-linux-gnueabi-toolchain-qte-4.6.3.tar.bz2?
Better late than never – I shared the toolchain on my gdrive:
https://googledrive.com/host/0B3Z340LOBulvMG5NRmNlZEppSEE
Enjoy
Yessssssss!, It finally works!
The angstrom web site is down but using the linaro cross toolchain (Ubuntu default), Qt can compile fine!.
Thanks for the tutorial Meir
Daniel : what is the “Ubuntu default” Linaro version you used please ?
And over all : when you say “it works” does it means it compiled on your PC or it ran into the BBB ?
Sorry for the answer delay… the Linaro toolchain for arm can be instaled from Ubuntu repositories with apt-get install arm-linux-gnueabi-gcc command.
It works! = compiled on my PC and running into the BBB
Sorry for my english.
Ups!… the command for Linaro arm is apt-get install gcc-arm-linux-gnueabi
Sorry.
hii,
I can’t find that “angstrom-2011.03-x86_64-linux-armv7a-linux-gnueabi-toolchain-qte-4.6.3.tar.bz2” file. i build new file with narcissus but make -j 4 error
./configure -v -opensource -confirm-license -prefix /opt/qt -embedded arm -platform qws/linux-x86-g++ -xplatform qws/linux-am335x-g++ -depths 16,24,32 -no-mmx -no-3dnow -no-sse -no-sse2 -no-glib -no-cups -no-largefile -no-accessibility -no-openssl -no-gtkstyle -qt-mouse-pc -qt-mouse-linuxtp -qt-mouse-linuxinput -plugin-mouse-linuxtp -plugin-mouse-pc -fast -little-endian -host-big-endian -no-pch -no-sql-ibase -no-sql-mysql -no-sql-odbc -no-sql-psql -no-sql-sqlite -no-sql-sqlite2 -no-webkit -no-qt3support -nomake examples -nomake demos -nomake docs -nomake translations
exc. message is
” /usr/local/angstrom/arm/libexec/gcc/arm-angstrom-linux-gnueabi/4.4.2/cc1plus: error while loading shared libraries: libmpfr.so.1: cannot open shared object file: No such file or directory
make[1]: *** [.obj/release-shared-emb-arm/qabstractanimation.o] Error 1
make[1]: Leaving directory `/home/bulent/Downloads/qt-4.8.5-beagle/src/corelib’
make: *** [sub-corelib-make_default-ordered] Error 2
“
Better late than never – I shared the toolchain on my gdrive:
https://googledrive.com/host/0B3Z340LOBulvMG5NRmNlZEppSEE
Enjoy
Hi Miro,
I’ve followed the instructions. After “make” command I got the following errors.
qtconcurrentiteratekernel.cpp:(.text+0x418): undefined reference to
clock_gettime'
QtConcurrent::BlockSizeManager::timeAfterUser()’:.obj/release-shared-emb-arm/qtconcurrentiteratekernel.o: In function
qtconcurrentiteratekernel.cpp:(.text+0x5c8): undefined reference to
clock_gettime'
/home/anisul/qt-4.8.5-beagle/src/corelib’make[1]: *** [../../lib/libQtCore.so.4.8.5] Error 1
make[1]: Leaving directory
make: *** [sub-corelib-make_default-ordered] Error 2
Could you or somebody pls help me.
Thanks in advance.
Hi,
Having a problem setting the qt version. I see you create a qmake.conf if your working tool directory, but set the qt version to /opt/qt/bin. My opt/qt/bin is empty. I had this working once before following Molloy but have not been able to get it back for awhile. When I try to add a qt version to the beaglebone kit, I do not get a prompt for the name just a file open dialog. No matter what qmake.conf I try to add, no config is selected i.e. no affect on the qt versions listed. Can anyone tell me what I am doing wrong? Thanks.
Sorry for the trouble but I was point to qmake.conf NOT qmake. Problem solved.
regards
It seems I have things set up per the above instructions; however, when I create the test app in QT Creator, it builds and deploys (the file is on the Beaglebone) but I get an error saying the file does not exist. If I go to the Beaglebone and try to run the file with ./Testapp -qws, I get the error that the file does not exist (though it does show up with an ls command). Any ideas what I am doing wrong?
I think it does not find its dependencies. Check that you copied qt libs. If not you can find whats missing with readelf.
Thanks so much for your quick response and direction. I re-copied the libraries to /opt/qt as per step 7 and still get the same error. I have a “readelf -a ” output but don’t know enough about it to really understand what is missing. I don’t want to copy the whole thing here – what am I looking for exactly?
A big Thank you! for this detailed tutorial. Everything worked fine.
Just two comments:
– on step 4, run a sudo chmod -R 777 qt-4.8.5-beagle
– on step 8, I haven’t found the GDK path as /usr/local/angstrom/arm/bin/arm-angstrom-linux-gnueabi-gdk
…and one question:
– how to set remote debugging?
Answering my own question after visiting the well written http://processors.wiki.ti.com/index.php/Sitara_Linux_Training:_Hands_on_with_QT#Supported_Platforms_and_revisions
Call the menu Tools > Options > Build & Run, set Debugger > Edit to /usr/local/angstrom/arm/bin/arm-angstrom-linux-gnueabi-gdb
Breakpoints and step-by-step execution work fine.
The only limitation is about shared libraries.
Debugging starts
Process /home/root/FirstTest created; pid = 380
Listening on port 10001
Remote debugging from host 192.168.1.19
Unable to find dynamic linker breakpoint function.
GDB will be unable to debug shared library initializers
and track explicitly loaded dynamic code.Could not load shared library symbols for 9 libraries, e.g. /lib/libpthread.so.0.
Use the “info sharedlibrary” command to see the complete listing.
Do you need “set solib-search-path” or “set sysroot”?argc=1
hello world
Iam using Visual GDB for cross compilation for my BeagleBone. For that i need to have Beaglebone toolchain installed. when i downloaded .bz2 file listed in your drive, i coudnt find a .exe file as specified in the steps given in http://visualgdb.com/tutorials/beaglebone/crosscompiler/ ….what shall i do to proceed furthur?
Thank You in advance
Is there anyone else having a problem with 4D LCD 7′ touchscreen ??
Sa me problema here…any news? Qt apps do not start with gdm…am I missing something? Id i kill gdm i can start the application but touch is not working
I seem to be having a problem with the corelib compile:
make[1]: Leaving directory
/home/beaglebone/qt-4.8.5-beagle/src/tools/uic'
/home/beaglebone/qt-4.8.5-beagle/src/corelib’cd src/corelib/ && make -f Makefile check
make[1]: Entering directory
/usr/local/angstrom/arm/arm-angstrom-linux-gnueabi/bin/g++ -c -pipe -fno-exceptions -O3 -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp -Wall -W -D_REENTRANT -fPIC -DQT_SHARED -DQT_BUILD_CORE_LIB -DQT_NO_USING_NAMESPACE -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DELF_INTERPRETER=\”/lib64/ld-linux-x86-64.so.2\” -DHB_EXPORT=Q_CORE_EXPORT -DQT_NO_DEBUG -I../../mkspecs/qws/linux-am335x-g++ -I. -I../../include -I../../include/QtCore -I.rcc/release-shared-emb-arm -Iglobal -I../3rdparty/zlib -I../3rdparty/harfbuzz/src -I../3rdparty/md5 -I../3rdparty/md4 -I.moc/release-shared-emb-arm -o .obj/release-shared-emb-arm/qabstractanimation.o animation/qabstractanimation.cpp
make[1]: /usr/local/angstrom/arm/arm-angstrom-linux-gnueabi/bin/g++: Command not found
make[1]: *** [.obj/release-shared-emb-arm/qabstractanimation.o] Error 127
make[1]: Leaving directory `/home/beaglebone/qt-4.8.5-beagle/src/corelib’
make: *** [sub-corelib-check_ordered] Error 2
I have managed to get QT applications running on my Beaglebone. I would like to take it one step further and make use of QT’s VNC capabilities. I have configured QT with the -qt-gfx-vnc option and everything seemed to configure and make smoothly. My programs still work just fine on the LinuxFb however whenever I enable the VNC by running ./qt_gui_test -qws -display “Multi: VNC:0 LinuxFb” the program starts fine (appears on local display and informs me a VNC server is running on port 5900) but crashes with a segmentation fault as soon as I connect using a VNC client. Does anyone have experience with this? Ideas?
Thanks!
PS: Great article, helped me out quite a bit.
Hi all,
My opt/qt/bin is empty. Did i change this command :
./configure -v -opensource -confirm-license -prefix /opt/qt -embedded arm -platform qws/linux-x86-g++ -xplatform qws/linux-am335x-g++ -depths 16,24,32 -no-mmx -no-3dnow -no-sse -no-sse2 -no-glib -no-cups -no-largefile -no-accessibility -no-openssl -no-gtkstyle -qt-mouse-pc -qt-mouse-linuxtp -qt-mouse-linuxinput -plugin-mouse-linuxtp -plugin-mouse-pc -fast -little-endian -host-big-endian -no-pch -no-sql-ibase -no-sql-mysql -no-sql-odbc -no-sql-psql -no-sql-sqlite -no-sql-sqlite2 -no-webkit -no-qt3support -nomake examples -nomake demos -nomake docs -nomake translations
with
./configure -v -opensource -confirm-license -prefix /usr/local/ -embedded arm -platform qws/linux-x86-g++ -xplatform qws/linux-am335x-g++ -depths 16,24,32 -no-mmx -no-3dnow -no-sse -no-sse2 -no-glib -no-cups -no-largefile -no-accessibility -no-openssl -no-gtkstyle -qt-mouse-pc -qt-mouse-linuxtp -qt-mouse-linuxinput -plugin-mouse-linuxtp -plugin-mouse-pc -fast -little-endian -host-big-endian -no-pch -no-sql-ibase -no-sql-mysql -no-sql-odbc -no-sql-psql -no-sql-sqlite -no-sql-sqlite2 -no-webkit -no-qt3support -nomake examples -nomake demos -nomake docs -nomake translations
My libs are in in /usr/local/lib, not in /opt/qt.
How can i do?
thanks
Thanks a lot … Good job
Before starting the procedure, make sure the following packages are installed, otherwise compilation will fail: GNU GCC, GNU G++ and OpenJDK.
Hi,
I could run successfully. But after that, I couldn’t access the regular shell anymore. The Linux starts in other kind of shell without the busybox commands.
root@beaglebone:~# help
GNU bash, version 4.2.10(1)-release (arm-angstrom-linux-gnueabi)
These shell commands are defined internally. Type
help' to see this list.
help name’ to find out more about the functionType
name'.
info bash’ to find out more about the shell in general.Use
Use
man -k' or
info’ to find out more about commands not in this list.How can I avoid it?
Thanks
Thankyou for this, i found it very difficult to setup but I cracked it in the end.
Well I managed to remote deploy a simple hello world program. I had a go at this 3 or 4 times with no luck. In the end I installed GCC onto my ubunto host and carried out all of the command line stuff after using sudo -s. Worked for me.
Great tutorial.
Just need to learn do a simple GUI program then I can start re writing my app in c++.
Thanks Thanks Thanks
Andy
sudo ./configure -v -opensource -confirm-license -prefix /usr/local/Qt/ -embedded arm -platform qws/linux-x86-g++ -xplatform qws/linux-am335x-g++ -depths 16,24,32 -no-mmx -no-3dnow -no-sse -no-sse2 -no-glib -no-cups -no-largefile -no-accessibility -no-openssl -no-gtkstyle -qt-mouse-pc -qt-mouse-linuxtp -qt-mouse-linuxinput -plugin-mouse-linuxtp -plugin-mouse-pc -fast -little-endian -host-big-endian -no-pch -no-sql-ibase -no-sql-mysql -no-sql-odbc -no-sql-psql -no-sql-sqlite -no-sql-sqlite2 -no-webkit -no-qt3support -nomake examples -nomake demos -nomake docs -nomake translations
The specified system/compiler is not supported:
/usr/local/qt-everywhere-opensource-src-4.8.5/mkspecs/qws/linux-am335x-g++
Please see the README file for a complete list.
how to cross compile it for RANA board
and my qmake.conf file is
#
# qmake configuration for building with arm-none-linux-gnueabi-g++
#
include(../../common/linux.conf)
include(../../common/gcc-base-unix.conf)
include(../../common/g++-unix.conf)
include(../../common/qws.conf)
#Compiler Flags to take advantage of the ARM architecture
QMAKE_CFLAGS_RELEASE = -O3 -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp
QMAKE_CXXFLAGS_RELEASE = -O3 -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp
# modifications to g++.conf
QMAKE_CC = /usr/local/arm-cortexa8-linux-gnueabihf/gcc-4.7.3-glibc-2.16.0-binutils-2.22-kernel-3.6-sanitized/bin/arm-cortexa8-linux-gnueabihf-gcc
QMAKE_CXX = /usr/local/arm-cortexa8-linux-gnueabihf/gcc-4.7.3-glibc-2.16.0-binutils-2.22-kernel-3.6-sanitized/bin/arm-cortexa8-linux-gnueabihf-g++
QMAKE_LINK = /usr/local/arm-cortexa8-linux-gnueabihf/gcc-4.7.3-glibc-2.16.0-binutils-2.22-kernel-3.6-sanitized/bin/arm-cortexa8-linux-gnueabihf-g++
QMAKE_LINK_SHLIB = /usr/local/arm-cortexa8-linux-gnueabihf/gcc-4.7.3-glibc-2.16.0-binutils-2.22-kernel-3.6-sanitized/bin/arm-cortexa8-linux-gnueabihf-g++
# modifications to linux.conf
QMAKE_AR = /usr/local/arm-cortexa8-linux-gnueabihf/gcc-4.7.3-glibc-2.16.0-binutils-2.22-kernel-3.6-sanitized/bin/arm-cortexa8-linux-gnueabihf-ar cqs
QMAKE_OBJCOPY = /usr/local/arm-cortexa8-linux-gnueabihf/gcc-4.7.3-glibc-2.16.0-binutils-2.22-kernel-3.6-sanitized/bin/arm-cortexa8-linux-gnueabihf-objcopy
QMAKE_STRIP = /usr/local/arm-cortexa8-linux-gnueabihf/gcc-4.7.3-glibc-2.16.0-binutils-2.22-kernel-3.6-sanitized/bin/arm-cortexa8-linux-gnueabihf-strip
load(qt_config)
can you please help me
thanks in advance bro
hi
i wanted to cross compile it for RANA board can you please help me,my configure option and details of everything i have given below
my qmake file is
#
# qmake configuration for building with arm-none-linux-gnueabi-g++
#
include(../../common/linux.conf)
include(../../common/gcc-base-unix.conf)
include(../../common/g++-unix.conf)
include(../../common/qws.conf)
#Compiler Flags to take advantage of the ARM architecture
QMAKE_CFLAGS_RELEASE = -O3 -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp
QMAKE_CXXFLAGS_RELEASE = -O3 -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp
# modifications to g++.conf
QMAKE_CC = /usr/local/arm-cortexa8-linux-gnueabihf/gcc-4.7.3-glibc-2.16.0-binutils-2.22-kernel-3.6-sanitized/bin/arm-cortexa8-linux-gnueabihf-gcc
QMAKE_CXX = /usr/local/arm-cortexa8-linux-gnueabihf/gcc-4.7.3-glibc-2.16.0-binutils-2.22-kernel-3.6-sanitized/bin/arm-cortexa8-linux-gnueabihf-g++
QMAKE_LINK = /usr/local/arm-cortexa8-linux-gnueabihf/gcc-4.7.3-glibc-2.16.0-binutils-2.22-kernel-3.6-sanitized/bin/arm-cortexa8-linux-gnueabihf-g++
QMAKE_LINK_SHLIB = /usr/local/arm-cortexa8-linux-gnueabihf/gcc-4.7.3-glibc-2.16.0-binutils-2.22-kernel-3.6-sanitized/bin/arm-cortexa8-linux-gnueabihf-g++
# modifications to linux.conf
QMAKE_AR = /usr/local/arm-cortexa8-linux-gnueabihf/gcc-4.7.3-glibc-2.16.0-binutils-2.22-kernel-3.6-sanitized/bin/arm-cortexa8-linux-gnueabihf-ar cqs
QMAKE_OBJCOPY = /usr/local/arm-cortexa8-linux-gnueabihf/gcc-4.7.3-glibc-2.16.0-binutils-2.22-kernel-3.6-sanitized/bin/arm-cortexa8-linux-gnueabihf-objcopy
QMAKE_STRIP = /usr/local/arm-cortexa8-linux-gnueabihf/gcc-4.7.3-glibc-2.16.0-binutils-2.22-kernel-3.6-sanitized/bin/arm-cortexa8-linux-gnueabihf-strip
load(qt_config)
And when i given configure
sudo ./configure -v -opensource -confirm-license -prefix /usr/local/Qt/ -embedded arm -platform qws/linux-x86-g++ -xplatform qws/linux-am335x-g++ -depths 16,24,32 -no-mmx -no-3dnow -no-sse -no-sse2 -no-glib -no-cups -no-largefile -no-accessibility -no-openssl -no-gtkstyle -qt-mouse-pc -qt-mouse-linuxtp -qt-mouse-linuxinput -plugin-mouse-linuxtp -plugin-mouse-pc -fast -little-endian -host-big-endian -no-pch -no-sql-ibase -no-sql-mysql -no-sql-odbc -no-sql-psql -no-sql-sqlite -no-sql-sqlite2 -no-webkit -no-qt3support -nomake examples -nomake demos -nomake docs -nomake translations
The specified system/compiler is not supported:
/usr/local/qt-everywhere-opensource-src-4.8.5/mkspecs/qws/linux-am335x-g++
Please see the README file for a complete list.
and gcc version is “gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5)”
What does “./configure -depths 16,24,32” do? I can’t find anything on this in the QT documentation.
Thanks
Pingback: Building Qt for Embedded Linux | Technology
I am using Beagle bone balck and Ubuntu 14.04 and when configuring the Qt everwhere 4.8.6 I am facong this error
./configure -v -opensource -confirm-license -prefix /opt/qt -embedded arm -platform qws/linux-x86-g++ -xplatform qws/linux-am335x-g++ -depths 16,24,32 -no-mmx -no-3dnow -no-sse -no-sse2 -no-glib -no-cups -no-largefile -no-accessibility -no-openssl -no-gtkstyle -qt-mouse-pc -qt-mouse-linuxtp -qt-mouse-linuxinput -plugin-mouse-linuxtp -plugin-mouse-pc -fast -little-endian -host-big-endian -no-pch -no-sql-ibase -no-sql-mysql -no-sql-odbc -no-sql-psql -no-sql-sqlite -no-sql-sqlite2 -no-webkit -no-qt3support -nomake examples -nomake demos -nomake docs -nomake translations
You don’t seem to have ‘make’ or ‘gmake’ in your PATH.
Cannot proceed
What is the problem?
Will GUI application run in this method??
Hello,
To make it work perfectly on BeagleBone Black with the latest Angstrom version (2013.09.12 http://downloads.angstrom-distribution.org/demo/beaglebone/) and the LCD from 4D with GUI, follow this changes:
1) Really take qt 4.8.5 (tried with 4.8.6 several times without good results, it certainly is possible to make it work but I couldn’t figure out how), it can be found here: http://download.qt-project.org/archive/qt/4.8/4.8.5/qt-everywhere-opensource-src-4.8.5.tar.gz
2) Configure qt-embedded with the options given and add this one: -qt-mouse-tslib
3) optional: it totaly works with the latest version of Qt Creator (3.2.0 today) so maybe you want to install that insted of the 2.8.0
4) Don’t forget to export the mouse variable before executing some code, it can be done with:
export QWS_MOUSE_PROTO=”LinuxInput:/dev/input/touchscreen0 MouseMan:/dev/input/mouse1″
5) Once you have configured Qt Creator and created a project, you have to add -qws execution option, it is done by:
Go to “Projects” on the left panel, then go to the “Run” option of the kit you created for the beagle bone, and then, in the “Run” paragraphe, add “-qws” in the arguments.
So thanks again for this tutorial, it helped very much and I hope my contribution will help someone.
Bye
EDIT:
2bis) When adding the path in /etc/profile, doing as shown in the tutorial result of losing access to all the command of the beaglebone during ssh. So to be able to call command don’t add the path as it is told to but like that:
PATH=$PATH:/opt/qt/lib
(I put it the line before “export PATH …”)
Hello Many thanks for the Awesome Sharing !
I’m facing a error message while building the code, my machine is Ubuntu 14.04 and remote device is BBB with Debian
error message is
“stdin: is not a tty
/home/debian/testi: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory
Application finished with exit code 127.”
i tried google but didnt get anything usefulness
please suggest the necessary steps for removing the error,
feel free to ask anything about the setup
regards:
Sonu Verma
Same do I.
Has anybody some ideas?
I am trying since 30h and have no clues…
Kind Regards
I am also facing a problem similar to sonu verma
my virtual machine is Ubuntu and remote device is BBB with Debian
when iam running the application i am getting an error
“stdin: is not a tty”
and i have to forcefully quit the application
Please help me to get my GUI
I am facing the same issue as Sonu Verma above me,
Im running Ubuntu 13.10 on my PC and Debian 7.5 on my beagle (image from beagle site) off an SD card.
I’ve done as the tutorial said and finished all steps.
It compiles and creates an executable file on my beaglebone, however when I run it it gives me:
stdin: is not a tty
/home/root/test3: error while loading shared libraries: libQtNetwork.so.4: cannot open shared object file: No such file or directory
Application finished with exit code 127.
my executable is in /home/root/
the libs are in opt/qt/
I need some assistance 🙁
Hi Poeh.
I have a BBB that want to programming this with QT and have the same problem.
where can i found a suitable toolchain for debian dist.
thanks.
Hi.
Is it possible to install addtional library to Qt 4.8.6 from Qt5 submodule. I mean qtconnectivity from
http://download.qt-project.org/official_releases/qt/5.3/5.3.2/submodules/
I found that following command should be run:
1) wget http://download.qt-project.org/development_releases/qt/5.3/5.3.0-rc/submodules/qtconnectivity-opensource-src-5.3.0-RC.tar.xz
2) tar xvpf qtconnectivity-opensource-src-5.3.0-RC.tar.xz
3) cd qtconnectivity-opensource-src-5.3.0-RC
4) qmake -r
5) make
6) sudo make install
However after running qmake, following error appears:
WARNING: ~/QT/qtconnectivity-opensource-src-5.3.2/qtconnectivity.pro:1: Unable to find file for inclusion configure
Does anyone managed? Or full compilation of QT5 with such library is needed?
Pingback: Fix Qt Display Error Dialog Windows XP, Vista, 7, 8 [Solved]
Can you please tell me which Makefile to use ? There are many Makefiles in beaglebone-4.8.6 directory ? Thanks.
Pingback: Fix Qt Creator Build Error 127 Windows XP, Vista, 7, 8 [Solved]
Pingback: Fix Qt Creator Error 127 Windows XP, Vista, 7, 8 [Solved]
Pingback: Fix Qt Creator Error While Loading Shared Libraries Windows XP, Vista, 7, 8 [Solved]
I’m getting this error when i try to compile with given parameters.
Determining system architecture… (Linux:3.16.0-31-generic:x86_64)
64-bit AMD 80×86 (x86_64)
‘arm’ is supported
‘x86_64’ is supported
System architecture: ‘arm’
Host architecture: ‘x86_64’
ERROR: Cannot set the compiler for the configuration tests
Which is confusing because my host processor is intel, not AMD. Can’t configure qt, and been struggling with this for a really long time.
Same problem here. I digged some websites, but nothing. Have you found out anything about the solution?
Pingback: Unable to run QTGUI application on Angstrom Linux BeagleBone Black « news-Knowlage FeeD