Qt5 on i.MX6 (Nitrogen6X)
-
wrote on 24 Sept 2014, 20:05 last edited by
Hi all,
I am trying to build the latest Qt5.3.2 for my i.MX6 board. On the Freescale community website there is an article that makes this appear to be very straightforward (https://community.freescale.com/docs/DOC-94066). I currently have the configuration portion working, but it is failing in the make. Which tells me something is still wrong with my configuration or environment.
@../qt5/qtbase/configure -v -opensource -confirm-license -no-pch -no-xcb -no-opengl -opengl es2 -make libs -device imx6 -compile-examples -no-sql-mysql -no-sql-psql -no-sql-oci -no-sql-odbc -no-sql-tds -no-sql-db2 -no-sql-sqlite -no-sql-sqlite2 -no-sql-ibase -sysroot /opt/fsl-community-bsp/nitro-build/tmp/sysroots/nitrogen6x -prefix /opt/qt5-imx6 -no-icu -device-option CROSS_COMPILE=/opt/freescale/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux/bin/arm-linux-gnueabihf- -device-option DISTRO_OPTS=hard-float -qreal float -qt-zlib@
- I followed the instructions on the Freescale doc for cloning the latest git of Qt.
- The sysroot I got from the nitrogen6x build of Yocto (daisy- the latest from Freescale: https://community.freescale.com/docs/DOC-93844). I added the meta-qt5 layer to Yocto for building Qt5. That actually built Qt 5.2.1 in the image, but I don't want to use Yocto to build Qt- I want to build it from the source on my own. What this did was provide me a rootfs that contained all of the dependencies for Qt that I needed for my build of whatever version of Qt I wanted.
- The toolchain I downloaded direct from Linaro (https://launchpad.net/linaro-toolchain-binaries).
- The configuration was modified based on what I believe is needed. I don't care about SQL, XCB (using EGLFS), etc so rather than working out the missing headers I just disabled them from the build.
The configuration completes:
@Build options:
Configuration .......... accessibility alsa audio-backend c++11 clock-gettime clock-monotonic compile_examples concurrent cross_compile dbus egl eglfs evdev eventfd fontconfig full-config getaddrinfo getifaddrs glib gtk2 gtkstyle iconv inotify ipv6ifname kms large-config largefile libudev linuxfb medium-config minimal-config mremap nis no-harfbuzz opengl opengles2 openssl openvg pcre png posix_fallocate pulseaudio qpa qpa reduce_exports release rpath shared small-config system-freetype system-jpeg system-png xinput2 xlib xrender zlib
Build parts ............ libs
Mode ................... release
Using C++11 ............ yes
Using PCH .............. no
Target compiler supports:
iWMMXt/Neon .......... no/autoQt modules and options:
Qt D-Bus ............... yes (loading dbus-1 at runtime)
Qt Concurrent .......... yes
Qt GUI ................. yes
Qt Widgets ............. yes
Large File ............. yes
QML debugging .......... yes
Use system proxies ..... noSupport enabled for:
Accessibility .......... yes
ALSA ................... yes
CUPS ................... no
Evdev .................. yes
FontConfig ............. yes
FreeType ............... yes (system library)
Glib ................... yes
GTK theme .............. yes
HarfBuzz ............... no
Iconv .................. yes
ICU .................... no
Image formats:
GIF .................. yes (plugin, using bundled copy)
JPEG ................. yes (plugin, using system library)
PNG .................. yes (in QtGui, using system library)
journald ............... no
mtdev .................. no
Networking:
getaddrinfo .......... yes
getifaddrs ........... yes
IPv6 ifname .......... yes
OpenSSL .............. yes (loading libraries at run-time)
NIS .................... yes
OpenGL / OpenVG:
EGL .................. yes
OpenGL ............... yes (OpenGL ES 2.x)
OpenVG ............... yes-auto
PCRE ................... yes (bundled copy)
pkg-config ............. yes
PulseAudio ............. yes
QPA backends:
DirectFB ............. no
EGLFS ................ yes
KMS .................. yes
LinuxFB .............. yes
XCB .................. no
Session management ..... yes
SQL drivers:
DB2 .................. no
InterBase ............ no
MySQL ................ no
OCI .................. no
ODBC ................. no
PostgreSQL ........... no
SQLite 2 ............. no
SQLite ............... no
TDS .................. no
udev ................... yes
xkbcommon .............. no
zlib ................... yes (bundled copy)@But my make fails after some time of running...
@
user@ubuntu:/opt/qt5-x86$ make
...
.obj/qhttpthreaddelegate.o: In functionmakeCacheKey(QUrl&, QNetworkProxy*)': qhttpthreaddelegate.cpp:(.text+0x1ce): undefined reference to
QString::toLatin1_helper(QString const&)'
.obj/qhttpthreaddelegate.o: In functionstatusCodeFromHttp(int, QUrl const&)': qhttpthreaddelegate.cpp:(.text+0x51c): undefined reference to
QString::toLocal8Bit_helper(QChar const*, int)'
.obj/qftp.o: In functionQFtpPI::startNextCmd()': qftp.cpp:(.text+0x18f6): undefined reference to
QString::toLatin1_helper(QString const&)'
.obj/qftp.o: In functionQFtpPrivate::_q_startNextCommand()': ... .obj/qsslcontext.o: In function
QSslContext::fromConfiguration(QSslSocket::SslMode, QSslConfiguration const&, bool)':
qsslcontext.cpp:(.text+0x506): undefined reference toQString::toLatin1_helper_inplace(QString&)' collect2: error: ld returned 1 exit status make[3]: *** [../../lib/libQt5Network.so.5.3.1] Error 1 make[3]: Leaving directory
/opt/qt-5.3.1-x86/qtbase/src/network'
make[2]: *** [sub-network-make_first] Error 2
make[2]: Leaving directory/opt/qt-5.3.1-x86/qtbase/src' make[1]: *** [sub-src-make_first] Error 2 make[1]: Leaving directory
/opt/qt-5.3.1-x86/qtbase'
make: *** [module-qtbase-make_first] Error 2
user@ubuntu:/opt/qt5-x86$
@I don't understand the undefined reference errors at all. Can anyone shed some light on what's going wrong here?
Thanks
-
wrote on 4 Jul 2015, 15:29 last edited by
I had similar issue recently with my Raspberry PI. I fixed that by temporarily moving all libQt*.so and libq*.so files from SYSROOT (in your case opt/fsl-community-bsp/nitro-build/tmp/sysroots/nitrogen6x/usr/lib). If it does not help you need to check if correct libQt5Core.so is linked to build qhttpthreaddelegate.