Configuring Qt for iMX6 Sabre Solox board
-
I am having a lot of trouble trying to configure Qt to compile to the imx6 Sabre Solox board. I've downloaded Qt 5.6.0 Everywhere from http://download.qt.io/official_releases/qt/5.6/5.6.0/single/ and the file I downloaded was qt-everywhere-opensource-src-5.6.0.tar.gz. I unzipped and decompressed it twice, once for my Ubuntu 14.04 VMware Workstation, and another for imx6. I've built the Ubuntu version fine. The configure options were easy enough and it works in QtCreator.
But when I try and configure the imx6 build, I have trouble doing it. http://doc.qt.io/qt-5/embedded-linux.html is the thing I've been following so far. I've done:
./configure -release -opengl -device imx6 -device-option CROSS_COMPILE=/usr/bin/arm-linux-gnueabihf- -sysroot /usr -qt-xcb -nomake tests -nomake examples
Then 'o' and 'yes' for the edition and license. It makes the qmake fine, but once it finishes with that, it fails with the configuration tests:
Warning: Disabling pkg-config since PKG_CONFIG_LIBDIR is not set and
the host's .pc files would be used (even if you set PKG_CONFIG_PATH).
Set this variable to the directory that contains target .pc files
for pkg-config to function correctly when cross-compiling or
use -pkg-config to override this test.
Note: PKG_CONFIG_SYSROOT_DIR automatically set to /usrCould not determine the target architecture!
Turn on verbose messaging (-v) to see the final report.
All the OpenGL functionality tests failed!
You might need to modify the include and library search paths by editing
QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in
/qtDownload/qt-everywhere-opensource-imx6-src-5.6.0/qt-everywhere-opensource-src-5.6.0/qtbase/mkspecs/devices/linux-imx6-g++.Here is my qmake.conf file:
include(../common/linux_device_pre.conf)QMAKE_LIBS_EGL += -lEGL
QMAKE_LIBS_OPENGL_ES2 += -lGLESv2 -lEGL -lGAL
QMAKE_LIBS_OPENVG += -lOpenVG -lEGL -lGALIMX6_CFLAGS = -march=armv7-a -mfpu=neon -DLINUX=1 -DEGL_API_FB=1
QMAKE_CFLAGS += $$IMX6_CFLAGS
QMAKE_CXXFLAGS += $$IMX6_CFLAGSDISTRO_OPTS += hard-float
EGLFS_DEVICE_INTEGRATION = eglfs_viv
include(../common/linux_arm_device_post.conf)
load(qt_config)
I'm just really confused as to what I am supposed to do to build this version of Qt.
-
I've also tried to follow the configuration steps for this guide https://community.nxp.com/docs/DOC-94066. I did the command:
./configure -v -opensource -confirm-license -no-pch -no-xcb -no-opengl -opengl es2 -make libs -device imx6 -compile-examples -device-option CROSS_COMPILE=/usr/bin/arm-linux-gnueabihf- -sysroot / -no-gcc-sysroot -prefix /usr/
I'm a little confused as what it means by sysroot and the prefix. On the imx6 board, the directories containing the qt5 libraries and other files can be found in /usr, so I think the prefix is correct, but I'm not sure about sysroot.
There was a lot of output, it made the qmake and this output was the configuration testing.
compilation terminated.
Makefile:190: recipe for target 'icu.o' failed
make: *** [icu.o] Error 1
ICU disabled.
PulseAudio auto-detection... ()
/usr/bin/arm-linux-gnueabihf-g++ -c -pipe -march=armv7-a -mfpu=neon -DLINUX=1 -DEGL_API_FB=1 -mfloat-abi=hard -O2 -Wall -W -fPIC -I. -I../../../mkspecs/devices/linux-imx6-g++ -o pulseaudio.o pulseaudio.cpp
In file included from pulseaudio.cpp:35:0:
/usr/include/pulse/glib-mainloop.h:26:18: fatal error: glib.h: No such file or directory
#include <glib.h>
^
compilation terminated.
Makefile:187: recipe for target 'pulseaudio.o' failed
make: *** [pulseaudio.o] Error 1
PulseAudio disabled.
OpenGL ES 2.0 auto-detection... ()
/usr/bin/arm-linux-gnueabihf-g++ -c -pipe -march=armv7-a -mfpu=neon -DLINUX=1 -DEGL_API_FB=1 -mfloat-abi=hard -O2 -Wall -W -fPIC -I. -I../../../mkspecs/devices/linux-imx6-g++ -o opengles2.o opengles2.cpp
/usr/bin/arm-linux-gnueabihf-g++ -mfloat-abi=hard -Wl,-O1 -o opengles2 opengles2.o -lGLESv2 -lEGL -lGAL
/usr/lib/gcc-cross/arm-linux-gnueabihf/4.8/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lGLESv2
/usr/lib/gcc-cross/arm-linux-gnueabihf/4.8/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lEGL
/usr/lib/gcc-cross/arm-linux-gnueabihf/4.8/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lGAL
collect2: error: ld returned 1 exit status
Makefile:89: recipe for target 'opengles2' failed
make: *** [opengles2] Error 1
OpenGL ES 2.0 disabled.
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
/qtDownload/qt-everywhere-opensource-imx6-src-5.6.0/qt-everywhere-opensource-src-5.6.0/qtbase/mkspecs/devices/linux-imx6-g++. -
So a couple hours after I posted this topic, I appear to have figured it out. https://forum.qt.io/topic/67155/qtuitools-compiling-for-uclinux/2 showed up shortly after making this topic.
./configure -device linux-imx6-g++ -confirm-license -opensource -device-option CROSS_COMPILE=arm-linux-gnueabihf- -static -no-compile-examples -no-xcb -no-qml-debug -no-sql-sqlite -no-tslib -qreal float -prefix /usr
This was the command that made it work. We currently don't have the hdmi working on the board, so I only tested it with a simple "Hello world" console program on Qt (qDebug() << "Testing" << endl;) Something like that.
I did get some weird Warning/Error messages when I ran it. Here is the resulting output from running my QtConsole program
./QtConsoleTest2
QIconvCodec::convertToUnicode: using Latin-1 for conversion, iconv_open failed
QIconvCodec::convertFromUnicode: using Latin-1 for conversion, iconv_open failed
Testing!I have no clue if this will work with a Qt Gui program. I'll see if I can write something that can verify there's at least some functionality. Sorry I kind of answered my own question.
-
So a couple hours after I posted this topic, I appear to have figured it out. https://forum.qt.io/topic/67155/qtuitools-compiling-for-uclinux/2 showed up shortly after making this topic.
./configure -device linux-imx6-g++ -confirm-license -opensource -device-option CROSS_COMPILE=arm-linux-gnueabihf- -static -no-compile-examples -no-xcb -no-qml-debug -no-sql-sqlite -no-tslib -qreal float -prefix /usr
This was the command that made it work. We currently don't have the hdmi working on the board, so I only tested it with a simple "Hello world" console program on Qt (qDebug() << "Testing" << endl;) Something like that.
I did get some weird Warning/Error messages when I ran it. Here is the resulting output from running my QtConsole program
./QtConsoleTest2
QIconvCodec::convertToUnicode: using Latin-1 for conversion, iconv_open failed
QIconvCodec::convertFromUnicode: using Latin-1 for conversion, iconv_open failed
Testing!I have no clue if this will work with a Qt Gui program. I'll see if I can write something that can verify there's at least some functionality. Sorry I kind of answered my own question.
@cKol1313 Hi, I know that if you configure like this: "./configure -device linux-imx6-g++ -confirm-license -opensource -device-option CROSS_COMPILE=arm-linux-gnueabihf- -static -no-compile-examples -no-xcb -no-qml-debug -no-sql-sqlite -no-tslib -qreal float -prefix /usr", it works. However, it has no opengl es at all. If I want to hold the opengl feature, how should I do? Thanks in advance!