Looking for help cross-compiling Qt 5.1 for embedded ARM Linux



  • I have successfully built Qt 4.8.5 with my toolchain but 5.1 has a lot of differences in the configure tool and it's failing to configure. I'm trying to build the core, network, serial port, and sensors. I'm also trying to turn off all of the GUI stuff because my target hardware doesn't have a display, keyboard, or mouse.

    So, here's the last configure line I tried:

    ./configure -opensource -confirm-license -xplatform linux-arm-gnueabi-g++ -prefix /myQtDir -no-c++11 -little-endian -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

    This craps out with the following error:
    "STL functionality check failed! Cannot build Qt with this STL library."
    I get this even though I have qmake.conf with CONFIG += incremental gdb_dwarf_index stl_off

    Using the -v option is showing my a whole lot of other problems in what appear to be things I would have thought would be turned off such as freetype.

    I tried watching the video about porting Qt5 to embedded systems but that doesn't help. I noticed that 4.8.5 had a specific tarball for embedded Linux but 5.1 doesn't.

    Anyone have any ideas?


  • Lifetime Qt Champion

    Hi,

    Did you check that your tool chain is recent enough to build Qt 5 ?



  • What are the required toolchain component versions?


  • Lifetime Qt Champion

    From the top of my head I can't remember, sorry.

    What version are you using ?



  • Kernel is 2.6.24 (which is what's on my SBC)
    Binutils 2.19.1a
    GCC 4.2.1
    GLibC 2.8


  • Lifetime Qt Champion



  • 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.


  • Lifetime Qt Champion

    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.


  • Lifetime Qt Champion

    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/no

    Qt 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 ..... no

    Support 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.


  • Lifetime Qt Champion

    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


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.