Looking for help cross-compiling Qt 5.1 for embedded ARM Linux
-
Kernel is 2.6.24 (which is what's on my SBC)
Binutils 2.19.1a
GCC 4.2.1
GLibC 2.8 -
Found the "document":http://qt-project.org/doc/qt-5.0/qtdoc/platform-notes.html !
-
Okay, that's useful. Although I wonder about cross compiling on a Mac with the target being Linux. Running configure would seem to be on the Mac side but running the make phase would be on the cross compiler side. Thoughts?
Any notes/comments on versions of GLibc, etc?
-
Well, switching the Mac compiler to GCC with gcc select didn't help. Not looking forward to rebuilding the cross compiler to find out. I didn't have this much trouble building Qt 4.8.5.
-
Indeed, you'll need an arm tool chain to build. If i'm not mistaken macports can provide these.
-
Okay, well switching compiler versions didn't help. I still had the STL problem. Towards the top of the -v output I noticed that even though I had -xplatform set, this was showing up: CFG_ARCH="x86_64" And that shouldn't be if I told it to use the linux-arm-gnueabi-g++
But I explored a bit further in the references to building for Raspberry Pi and those use the -device and -device-option. So I tried making up a bare bones device file. I had to turn off a ton of stuff in the configure line though.
./configure -opensource -confirm-license -xplatform linux-arm-gnueabi-g++ -prefix /mydir/Qt51Test -no-sse2 -no-sse3 -no-ssse3 -no-sse4.1 -no-sse4.2 -no-avx -no-avx2 -no-neon -no-mips_dsp -no-mips_dspr2 -no-c++11 -no-opengl -no-gui -no-widgets -no-cups -no-pch -no-eglfs -no-directfb -no-linuxfb -no-kms -D__ARM_ARCH_4__ -nomake examples -nomake demos -nomake tests -v -device linux-7552-g++ -device-option CROSS_COMPILE=/Volumes/Crosstool/x-tools/arm-unknown-linux-gnu/bin/arm-unknown-linux-gnu-
That got me a bit further. The configure phase completed but the make phase crapped out with this error:
tools/qbytearray.cpp:53:18: fatal error: zlib.h: No such file or directory
I tried adding -qt-zlib to my configure line but that didn't help.
-
Dont forget to cleanup your build directory between two calls to configure
-
I'm assuming that means make clean but that didn't help either. It looks like configure is ignoring the -qt-zlib option. Here's my configure line
./configure -opensource -confirm-license -xplatform linux-arm-gnueabi-g++ -prefix /mydir/Qt51Test -no-sse2 -no-sse3 -no-ssse3 -no-sse4.1 -no-sse4.2 -no-avx -no-avx2 -no-neon -no-mips_dsp -no-mips_dspr2 -no-c++11 -qt-zlib -no-libpng -no-libjpeg -qt-pcre -no-opengl -no-gui -no-widgets -no-cups -no-pch -no-eglfs -no-directfb -no-linuxfb -no-kms -D__ARM_ARCH_4__ -nomake examples -nomake demos -nomake tests -v -device linux-7552-g++ -device-option CROSS_COMPILE=/Volumes/Crosstool/x-tools/arm-unknown-linux-gnu/bin/arm-unknown-linux-gnu-
Configure spits out this:
Build options:
Configuration .......... accessibility audio-backend build_all clock-gettime clock-monotonic concurrent cross_compile debug debug_and_release evdev eventfd freetype full-config getaddrinfo getifaddrs iconv inotify ipv6ifname large-config largefile medium-config minimal-config mremap nis no-gui no-jpeg no-pkg-config no-png no-widgets pcre qpa qpa qt_framework release shared small-config system-zlib v8
Build parts ............ libs
Mode ................... debug and release; default link: debug
Using C++11 ............ no
Using PCH .............. no
Target compiler supports:
iWMMXt/Neon .......... no/noQt modules and options:
Qt D-Bus ............... no
Qt Concurrent .......... yes
Qt GUI ................. no
Qt Widgets ............. no
JavaScriptCore JIT ..... yes (To be decided by JavaScriptCore)
QML debugging .......... yes
Use system proxies ..... noSupport enabled for:
Accessibility .......... yes
ALSA ................... no
CUPS ................... no
FontConfig ............. no
Iconv .................. yes
ICU .................... no
Image formats:
GIF .................. yes (plugin, using system library)
JPEG ................. no
PNG .................. no
Glib ................... no
GStreamer .............. no
GTK theme .............. no
Large File ............. yes
libudev ................ no
Networking:
CoreWlan ............. no
getaddrinfo .......... yes
getifaddrs ........... yes
IPv6 ifname .......... yes
OpenSSL .............. no
NIS .................... yes
OpenGL ................. no
OpenVG ................. no
PCRE ................... yes (bundled copy)
pkg-config ............. no
PulseAudio ............. no
QPA backends:
DirectFB ............. no
EGLFS ................ no
KMS .................. no
LinuxFB .............. no
XCB .................. no
Session management ..... yes
SQL drivers:
DB2 .................. no
InterBase ............ no
MySQL ................ no
OCI .................. no
ODBC ................. no
PostgreSQL ........... no
SQLite 2 ............. no
SQLite ............... yes (plugin, using bundled copy)
TDS .................. no
udev ................... no
xkbcommon .............. no
zlib ................... yes (system library) -
Well, I found this reference:
http://stackoverflow.com/questions/13008951/configure-qt-with-qt-zlib-is-not-recognized
Which tells me that Qt 5 broke cross-compiling on a Mac for an embedded target. Regardless, I hacked the script to use qt instead of system and that got me further.But now make craps out in this line:
tools/qunicodetools.cpp:631:9: error: invalid application of 'sizeof' to incomplete type 'QStaticAssertFailure<false>'I'm rapidly coming to the conclusion that trying to cross-compile Qt 5.1 waste of time.
-
Ouch...
I didn't try yet to cross-compile Qt 5 on mac, I generally do that on Linux...
You could however fill a "bug report":http://bugreports.qt-project.org/issues/ about it, if that's not have already be done