Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Cross compiling Qt 5.2.1 for ARMv6 Platform
Forum Updated to NodeBB v4.3 + New Features

Cross compiling Qt 5.2.1 for ARMv6 Platform

Scheduled Pinned Locked Moved Mobile and Embedded
3 Posts 1 Posters 3.4k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    lutzhell
    wrote on last edited by
    #1

    Hi,

    i'm trying to elevate Qt for my embedded device from version 4.8.5 to 5.2.1 (see build environment information at the bottom of my post).

    What i (probably) understand is that the problem has to do with the qpa mechanism for QtGui. QtGui is included in my system because i have two applications that write to the framebuffer but no actual GUI is displayed.

    At the moment i'm trying to build qtbase only:

    @make module-qtbase@

    Unfortunately after about 5 minutes the build grinds to a halt with the following output:

    @
    arm-none-linux-gnueabi-g++ -c -include .pch/Qt5Gui -pipe -O2 -fvisibility=hidden -fvisibility-inlines-hidden -fno-exceptions -Wall -W -D_REENTRANT -fPIC -DQT_NO_MTDEV -DQT_NO_LIBUDEV -DQT_NO_XCB -DQT_NO_XKBCOMMON -DQT_NO_USING_NAMESPACE -DQT_BUILD_GUI_LIB -DQT_BUILDING_QT -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x050000 -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_CORE_LIB -I../../mkspecs/linux-arm-gnueabi-g++ -I. -I./qtbase/include -I../../include -I../../include/QtGui -I../../include/QtGui/5.2.1 -I../../include/QtGui/5.2.1/QtGui -Iimage -I../../include/QtCore/5.2.1 -I../../include/QtCore/5.2.1/QtCore -I../../include/QtCore -I.moc -o .obj/qplatformintegration.o kernel/qplatformintegration.cpp
    In file included from ../../include/QtGui/5.2.1/QtGui/qpa/qplatformtheme.h:1,
    from kernel/qplatformintegration.cpp:47:
    ../../include/QtGui/5.2.1/QtGui/qpa/../../../../../src/gui/kernel/qplatformtheme.h:296: error: 'QKeySequence::StandardKey' has not been declared
    make[4]: *** [.obj/qplatformintegration.o] Error 1
    make[4]: Leaving directory /home/lh1/Artista/common_code/external/qt/PL_AMEDIA_II_DDG/qt/qtbase/src/gui' make[3]: *** [sub-gui-make_first] Error 2 make[3]: Leaving directory /home/lh1/Artista/common_code/external/qt/PL_AMEDIA_II_DDG/qt/qtbase/src'
    make[2]: *** [sub-src-make_first] Error 2
    make[2]: Leaving directory /home/lh1/Artista/common_code/external/qt/PL_AMEDIA_II_DDG/qt/qtbase' make[1]: *** [module-qtbase] Error 2 make[1]: Leaving directory /home/lh1/Artista/common_code/external/qt/PL_AMEDIA_II_DDG/qt'
    make: *** [buildtargets/qt_latest_built] Error 2@

    I have to confess that i do not have the slightest idea, what this means.
    There exists an include file qkeysequence.h in qtbase/src/gui/kernel/ in which a class QKeySequence is declared which includes an enum StandardKey.

    I would be really happy if someone could help me out with this issue.

    Thanks a lot in advance!

    Cheers,
    Lutz

    ============ Information about my environment ============

    For the build to run i have to patch linux-arm-gnueabi-g++/qmake.conf to use my toolchain's compile prefix:

    @QMAKE_CC = arm-none-linux-gnueabi-gcc
    QMAKE_CXX = arm-none-linux-gnueabi-g++
    QMAKE_LINK = arm-none-linux-gnueabi-g++
    QMAKE_LINK_SHLIB = arm-none-linux-gnueabi-g++

    modifications to linux.conf

    QMAKE_AR = arm-none-linux-gnueabi-ar cqs
    QMAKE_OBJCOPY = arm-none-linux-gnueabi-objcopy
    QMAKE_NM = arm-none-linux-gnueabi-nm -P
    QMAKE_STRIP = arm-none-linux-gnueabi-strip@

    here is some information about my environment:

    Host: Debian Linux 7.5 64 Bit
    Target: Custom Linux running on ARMv6-compatible processor

    Host GCC version: 4.7.2
    Cross Toolchain: arm-2010q1
    Toolchain GCC version: 4.4.1

    Configure invocation:
    @ ./configure
    -prefix $(ROOTFS_DIR) -dbus
    -release
    -confirm-license
    -qconfig small
    -no-c++11
    -no-accessibility
    -no-sql-db2
    -no-sql-ibase
    -no-sql-mysql
    -no-sql-oci
    -no-sql-odbc
    -no-sql-psql
    -no-sql-sqlite
    -no-sql-sqlite2
    -no-sql-tds
    -no-javascript-jit
    -no-qml-debug
    -no-sse2
    -no-sse3
    -no-ssse3
    -no-sse4.1
    -no-sse4.2
    -no-avx
    -no-avx2
    -no-neon
    -no-mips_dsp
    -no-mips_dspr2
    -xplatform linux-arm-gnueabi-g++
    -no-sse2
    -no-openssl
    -nomake tools
    -nomake examples
    -nomake tests
    -no-gtkstyle
    -no-opengl
    -no-openvg
    -no-iconv
    -no-icu
    -no-fontconfig
    -opensource
    -no-widgets
    -v
    -no-nis
    -no-cups
    -no-eglfs
    -no-kms
    -no-xcb
    -no-eglfs
    -no-directfb
    -linuxfb
    -qpa linuxfb@

    1 Reply Last reply
    0
    • L Offline
      L Offline
      lutzhell
      wrote on last edited by
      #2

      I've found a solution (how much i wish i could work on LEGO mindstorms in my job ;) ):

      What actually helped was changing to the qtbase directory and start the build here since qtbass includes all i need.

      The final hint came from here (thank you very much):

      http://broija.blogspot.de/2013/11/compile-qt-5-qtbase-for-lego-mindstorms.html

      I hope this could be helpful to someone here

      Cheers,
      Lutz

      =======================================

      Now my qmake.conf looks like this:

      @

      qmake configuration for building with arm-none-linux-gnueabi-g++

      MAKEFILE_GENERATOR = UNIX
      CONFIG += incremental gdb_dwarf_index
      QMAKE_INCREMENTAL_STYLE = sublib

      include(../common/linux.conf)
      include(../common/gcc-base-unix.conf)
      include(../common/g++-unix.conf)

      #Compilers, they are in the directory you've just added to PATH
      QMAKE_CC = arm-none-linux-gnueabi-gcc
      QMAKE_CXX = arm-none-linux-gnueabi-g++
      QMAKE_LINK = arm-none-linux-gnueabi-g++
      QMAKE_LINK_SHLIB = arm-none-linux-gnueabi-g++

      #Very important! These options tell the compiler that the target processor is an arm1176jzf-s which architecture is armv6j.
      QMAKE_CXXFLAGS += -mtune=arm1176jzf-s -march=armv6j
      QMAKE_LFLAGS += -mtune=arm1176jzf-s -march=armv6j

      QMAKE_LFLAGS += -Wl,-rpath=$$ROOTFS_DIR/lib:$$ROOTFS_DIR/usr/lib:$$TARGET_LIBPATH

      #Mandatory for dynamic linking on the target
      QMAKE_LFLAGS += -Wl,--dynamic-linker=$$ROOTFS_DIR/lib/ld-linux.so.3

      modifications to linux.conf

      QMAKE_AR = arm-none-linux-gnueabi-ar cqs
      QMAKE_OBJCOPY = arm-none-linux-gnueabi-objcopy
      QMAKE_NM = arm-none-linux-gnueabi-nm -P
      QMAKE_STRIP = arm-none-linux-gnueabi-strip
      load(qt_config)
      @

      My configure line now looks like this:
      @
      ./configure
      -opensource
      -confirm-license
      -release
      -prefix $(ROOTFS_DIR)
      -plugindir $(ROOTFS_DIR)/opt/mediaplayer
      -xplatform linux-arm-gnueabi-g++
      -qpa offscreen
      -no-accessibility
      -no-c++11
      -no-widgets
      -no-nis
      -no-opengl
      -no-openvg
      -no-qml-debug
      -no-compile-examples
      -no-glib
      -no-javascript-jit
      -no-sql-sqlite
      -no-sql-sqlite2
      -no-iconv
      -dbus
      -nomake tests
      -nomake examples
      -nomake tools
      @

      1 Reply Last reply
      0
      • L Offline
        L Offline
        lutzhell
        wrote on last edited by
        #3

        Oh i forgot to mention that this worked for Qt 5.1.1. I was not able to build Qt 5.2 or 5.3 for my device.

        The message was: "Add the datastream version for this Qt version" which could be a hint that my compiler is too old, i'm not sure about that and version 5.1.1 is sufficient for now.

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved