Building Qt 5.2 for Beaglebone Black fails
-
Hi.
I try to setup an environment to cross compile for Beaglebone Black (Angstrom).
I read many tutorials but they don't work for me.
I tryed in Debian 7 (64 Bit) and Ubuntu 13.10 (32 Bit).
My steps:
1.) Got Qt5.2-everywhere (from "here":http://download.qt-project.org/official_releases/qt/5.2/5.2.0/single/qt-everywhere-opensource-src-5.2.0.tar.gz.mirrorlist)
2.) Got angstrom-2011.03-x86_64-linux-armv7a-linux-gnueabi-toolchain.tar.bz2 via wayback machine (from "here":http://web.archive.org/web/20130823131954/http://www.angstrom-distribution.org/toolchains/)
3.) To untar the toolchain I used "sudo tar -C / -xjf angstrom-2011.03-x86_64-linux-armv7a-linux-gnueabi-toolchain.tar.bz2"
4.) Sourced toolchain env file with "source /usr/local/angstrom/arm/environment-setup"
5.) Changed in /qt-everywhere/qtbase/mkspecs/linux-arm-gnueabi-g++/qmake.conf the eight "arm-linux-gnueabi-" to "arm-angstrom-linux-gnueabi-"
6.) Configured Qt with "./configure -v -opensource -confirm-license -opengl es2 -eglfs -no-xcb -no-cups -no-dbus -nomake examples -nomake tests -prefix /opt/qt5.2.0-arm -xplatform linux-arm-gnueabi-g++"Debian needs a sudo to configure Qt. Without sudo it runs until "Running configuration tests..." and then it response "Segmentation fault" and "Failed to process makespec for platform 'linux-arm-gnueabi-g++'"
On Debian (./configure with sudo) and on Ubuntu it runs with a bunch of errors until the OpenGL Es 2.0 test. Then the output says:
"The OpenGL ES 2.0 functionality test failed!
You might need to modify the include and library search paths by editing
QMAKE_INCDIR_OPENGL_ES2, QMAKE_LIBDIR_OPENGL_ES2 and QMAKE_LIBS_OPENGL_ES2 in
qt5.2-everywhere/qtbase/mkspecs/linux-arm-gnueabi-g++."I also tried to use the latest linaro toolchain and on my 64 Bit system i tried 32 Bit toolchains.
There i am stuck and i need OpenGL. Disableing is not an option.My (main) sources:
"http://qt-project.org/forums/viewthread/21082/":http://qt-project.org/forums/viewthread/21082/
"http://qt-project.org/forums/viewthread/27076":http://qt-project.org/forums/viewthread/27076
"http://www.cloud-rocket.com/2013/07/building-qt-for-beaglebone/":http://www.cloud-rocket.com/2013/07/building-qt-for-beaglebone/
"http://armsdr.blogspot.de/2014/01/bare-metal-qt-52-on-beaglebone-black_10.html":http://armsdr.blogspot.de/2014/01/bare-metal-qt-52-on-beaglebone-black_10.html
"http://www.qtcentre.org/threads/17926-configure-Qt-with-opengl-on-Ubuntu-8-10":http://www.qtcentre.org/threads/17926-configure-Qt-with-opengl-on-Ubuntu-8-10 -
Hello kDohmen,
- you have to configure Qt with "-sysroot <PATH TO SD CARD>". this is the default option for cross compiling. It tells Qt to not search for the needed libs on your local system, but on your target system (Beaglebone). Try to mount the SD card and set the sysroot path to this directory.
2a. check if you have the OpenGLESv2 libs installed on your BeagleBone (go to /usr/lib and search for libGLESv2.so or something like that). Otherwise, the "-opengl es2" option does not work.
2b. if you want the OpenGLESv2 support, install the SGX drivers for Bealgebone
https://code.google.com/p/beagleboard/wiki/HowtoUseSGXunderAngstrom
After compiling this driver, the OpenGLESv2 libs should be present on your system and the "-opengl es2" option works! - if it does not find the OpenGLESv2 lib during configure, set this variables in /mkspecs/linux-arm-gnueabi-g++:
QMAKE_INCDIR_OPENGL_ES2 = /usr/include
QMAKE_LIBDIR_OPENGL_ES2 = /usr/lib
QMAKE_LIBS_OPENGL_ES2 = -lGLESv2
- you have to configure Qt with "-sysroot <PATH TO SD CARD>". this is the default option for cross compiling. It tells Qt to not search for the needed libs on your local system, but on your target system (Beaglebone). Try to mount the SD card and set the sysroot path to this directory.