Cross compile the Qt5.9.2 to Cortex-A8



  • hi, my desktop is Ubnutu 16.04 x64, and my target is ti AM3358, a cortex-A8 platform.
    my compiler is arm-linux-gnueabihf, ver 6.2.1 20161016 (Linaro GCC 6.2-2016-11),
    i am configure the qt5.9.2 as below:

    ./configure -v
    -debug
    -opensource
    -confirm-license
    -make libs
    -optimized-qmake
    -c++std c++11
    -strip
    -platform linux-g++
    -xplatform linux-arm-gnueabi-g++
    -prefix /home/jerry/Qt592am3358
    -qt-libjpeg
    -qt-libpng
    -qt-zlib
    -qt-sqlite
    -tslib
    -qreal float
    -alsa
    -openssl
    -icu
    -linuxfb
    -pch
    -no-opengl
    -no-egl
    -no-eglfs
    -no-evdev
    -no-directfb
    -no-sql-db2
    -no-sql-ibase
    -no-sql-oci
    -no-sql-mysql
    -no-sql-odbc
    -no-sql-psql
    -no-sql-sqlite2
    -no-sql-tds
    -no-xcb
    -no-xcb-xlib
    -no-cups
    -no-iconv
    -no-glib
    -no-android-style-assets
    -nomake examples
    -nomake tests

    the result as below:
    Configure summary:

    Building on: linux-g++ (x86_64, CPU features: mmx sse sse2)
    Building for: linux-arm-gnueabi-g++ (arm, CPU features: <none>)
    Configuration: cross_compile use_gold_linker compile_examples enable_new_dtags largefile optimize_debug precompile_header shared rpath debug c++11 concurrent dbus no-pkg-config reduce_exports release_tools stl
    Build options:
    Mode ................................... debug; optimized tools
    Optimize debug build ................... yes
    Building shared libraries .............. yes
    Using C++ standard ..................... C++11
    Using ccache ........................... no
    Using gold linker ...................... yes
    Using new DTAGS ........................ yes
    Using precompiled headers .............. yes
    Using LTCG ............................. no
    Target compiler supports:
    NEON ................................. no
    Build parts ............................ libs
    Qt modules and options:
    Qt Concurrent .......................... yes
    Qt D-Bus ............................... yes
    Qt D-Bus directly linked to libdbus .... no
    Qt Gui ................................. yes
    Qt Network ............................. yes
    Qt Sql ................................. yes
    Qt Testlib ............................. yes
    Qt Widgets ............................. yes
    Qt Xml ................................. yes
    Support enabled for:
    Using pkg-config ....................... no
    QML debugging .......................... yes
    udev ................................... no
    Using system zlib ...................... no
    Qt Core:
    DoubleConversion ....................... yes
    Using system DoubleConversion ........ no
    GLib ................................... no
    iconv .................................. no
    ICU .................................... yes
    Logging backends:
    journald ............................. no
    syslog ............................... no
    slog2 ................................ no
    Using system PCRE2 ..................... no
    Qt Network:
    getaddrinfo() .......................... yes
    getifaddrs() ........................... yes
    IPv6 ifname ............................ yes
    libproxy ............................... no
    OpenSSL ................................ yes
    Qt directly linked to OpenSSL ........ no
    SCTP ................................... no
    Use system proxies ..................... yes
    Qt Gui:
    Accessibility .......................... yes
    FreeType ............................... yes
    Using system FreeType ................ no
    HarfBuzz ............................... yes
    Using system HarfBuzz ................ no
    Fontconfig ............................. no
    Image formats:
    GIF .................................. yes
    ICO .................................. yes
    JPEG ................................. yes
    Using system libjpeg ............... no
    PNG .................................. yes
    Using system libpng ................ no
    EGL .................................... no
    OpenVG ................................. no
    OpenGL:
    Desktop OpenGL ....................... no
    OpenGL ES 2.0 ........................ no
    OpenGL ES 3.0 ........................ no
    OpenGL ES 3.1 ........................ no
    Session Management ..................... yes
    Features used by QPA backends:
    evdev .................................. no
    libinput ............................... no
    INTEGRITY HID .......................... no
    mtdev .................................. no
    tslib .................................. yes
    xkbcommon-evdev ........................ no
    QPA backends:
    DirectFB ............................... no
    EGLFS .................................. no
    LinuxFB ................................ yes
    VNC .................................... yes
    Mir client ............................. no
    Qt Widgets:
    GTK+ ................................... no
    Styles ................................. Fusion Windows
    Qt PrintSupport:
    CUPS ................................... no
    Qt Sql:
    DB2 (IBM) .............................. no
    InterBase .............................. no
    MySql .................................. no
    OCI (Oracle) ........................... no
    ODBC ................................... no
    PostgreSQL ............................. no
    SQLite2 ................................ no
    SQLite ................................. yes
    Using system provided SQLite ......... no
    TDS (Sybase) ........................... no
    Qt SerialBus:
    Socket CAN ............................. yes
    Socket CAN FD .......................... yes
    QtXmlPatterns:
    XML schema support ..................... yes
    Qt QML:
    QML interpreter ........................ yes
    QML network support .................... yes
    Qt Quick:
    Direct3D 12 ............................ no
    AnimatedImage item ..................... yes
    Canvas item ............................ yes
    Support for Qt Quick Designer .......... yes
    Flipable item .......................... yes
    GridView item .......................... yes
    ListView item .......................... yes
    Path support ........................... yes
    PathView item .......................... yes
    Positioner items ....................... yes
    ShaderEffect item ...................... yes
    Sprite item ............................ yes
    Qt Gamepad:
    SDL2 ................................... no
    Qt 3D:
    Assimp ................................. yes
    System Assimp .......................... no
    Output Qt3D Job traces ................. no
    Output Qt3D GL traces .................. no
    Qt 3D GeometryLoaders:
    Autodesk FBX ........................... no
    Qt Wayland Client ........................ no
    Qt Wayland Compositor .................... no
    Qt Bluetooth:
    BlueZ .................................. no
    BlueZ Low Energy ....................... no
    Linux Crypto API ....................... no
    Qt Sensors:
    sensorfw ............................... no
    Qt Quick Controls 2:
    Styles ................................. Default Material Universal
    Qt Quick Templates 2:
    Hover support .......................... yes
    Multi-touch support .................... yes
    Qt Positioning:
    Gypsy GPS Daemon ....................... no
    WinRT Geolocation API .................. no
    Qt Location:
    Geoservice plugins:
    OpenStreetMap ........................ yes
    HERE ................................. yes
    Esri ................................. yes
    Mapbox ............................... yes
    MapboxGL ............................. no
    Itemsoverlay ......................... yes
    Qt Multimedia:
    ALSA ................................... yes
    GStreamer 1.0 .......................... no
    GStreamer 0.10 ......................... no
    Video for Linux ........................ yes
    OpenAL ................................. no
    PulseAudio ............................. no
    Resource Policy (libresourceqt5) ....... no
    Windows Audio Services ................. no
    DirectShow ............................. no
    Windows Media Foundation ............... no
    Qt WebEngine:
    Embedded build ......................... yes
    Pepper Plugins ......................... no
    Printing and PDF ....................... no
    Proprietary Codecs ..................... no
    Spellchecker ........................... yes
    WebRTC ................................. no
    Using system ninja ..................... no
    ALSA ................................... yes
    PulseAudio ............................. no
    System libraries:
    re2 .................................. no
    ICU .................................. no
    libwebp and libwebpdemux ............. no
    Opus ................................. no
    ffmpeg ............................... no

    Note: No wayland-egl support detected. Cross-toolkit compatibility disabled.

    WARNING: Feature xcb-xlib is insignificant in this configuration, ignoring related command line option(s).

    Qt is now configured for building. Just run 'make'.
    Once everything is built, you must run 'make install'.
    Qt will be installed into '/home/jerry/Qt592am3358'.

    Prior to reconfiguration, make sure you remove any leftovers from
    the previous build.

    i do compile at first time, many warning like as below:
    In file included from ../../include/QtCore/qdebug.h:1:0,
    from tools/qcommandlineparser.cpp:46:
    ../../include/QtCore/../../src/corelib/io/qdebug.h: In member function 'void QDebug::Stream::setVerbosity(int)':
    ../../include/QtCore/../../src/corelib/io/qdebug.h:99:42: warning: result of '(7 << 29)' requires 33 bits to represent, but 'int' only has 32 bits [-Wshift-overflow=]
    flags &= ~(VerbosityMask << VerbosityShift);
    ^~~

    and i do compile at second time, many error like as below:
    cc1plus: error: one or more PCH files were found, but they were invalid
    cc1plus: error: use -Winvalid-pch for more information
    cc1plus: fatal error: .pch/Qt5Bluetooth: No such file or directory
    compilation terminated.

    i am make a qtdemo app, it is a dialog only, it run on ubuntu well, cross compile it to my AN3358 board, it is run with "segment fault" as below:
    QFactoryLoader::QFactoryLoader() checking directory path "/opt/qt592/plugins/platforms/accessiblebridge" ...
    QFactoryLoader::QFactoryLoader() checking directory path "/usr/demo/accessiblebridge" ...
    Segmentation fault

    have any body meet this problem, how to solve this problem.
    thanks very much


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    Something's not clear, why do you need to build several times ?

    What did you do between these two builds ?



  • hi, thank you for your reply, SGaist.
    the first time is 'make ARCH=arm -j4', it is a multi-thread compile, i think may be some error information are not display on my screen.
    so the second time is 'make ARCH=arm', just check the compile output information on the screen.
    today, this problem was solved, i did deleted the '-qreal float', the qt5.9.2 compile successfully for AM3358.

    but now the big problem as below:
    1, the Qt Console Application running well on my AM3358 board.
    2, the Qt Widgets Application running fault on my AM3358 board, the information as below:
    QFactoryLoader::QFactoryLoader() checking directory path "/opt/qt592/plugins/platforms" ...
    QFactoryLoader::QFactoryLoader() looking at "/opt/qt592/plugins/platforms/libqlinuxfb.so"
    Found metadata in lib /opt/qt592/plugins/platforms/libqlinuxfb.so, metadata=
    {
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
    "Keys": [
    "linuxfb"
    ]
    },
    "className": "QLinuxFbIntegrationPlugin",
    "debug": false,
    "version": 329986
    }

    Got keys from plugin meta data ("linuxfb")
    QFactoryLoader::QFactoryLoader() looking at "/opt/qt592/plugins/platforms/libqminimal.so"
    Found metadata in lib /opt/qt592/plugins/platforms/libqminimal.so, metadata=
    {
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
    "Keys": [
    "minimal"
    ]
    },
    "className": "QMinimalIntegrationPlugin",
    "debug": false,
    "version": 329986
    }

    Got keys from plugin meta data ("minimal")
    QFactoryLoader::QFactoryLoader() looking at "/opt/qt592/plugins/platforms/libqoffscreen.so"
    Found metadata in lib /opt/qt592/plugins/platforms/libqoffscreen.so, metadata=
    {
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
    "Keys": [
    "offscreen"
    ]
    },
    "className": "QOffscreenIntegrationPlugin",
    "debug": false,
    "version": 329986
    }

    Got keys from plugin meta data ("offscreen")
    QFactoryLoader::QFactoryLoader() looking at "/opt/qt592/plugins/platforms/libqvnc.so"
    Found metadata in lib /opt/qt592/plugins/platforms/libqvnc.so, metadata=
    {
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
    "Keys": [
    "vnc"
    ]
    },
    "className": "QVncIntegrationPlugin",
    "debug": false,
    "version": 329986
    }

    Got keys from plugin meta data ("vnc")
    QFactoryLoader::QFactoryLoader() checking directory path "/usr/demo" ...
    QFactoryLoader::QFactoryLoader() looking at "/usr/demo/bk.sh"
    QElfParser: '/usr/demo/bk.sh' is not an ELF object
    "'/usr/demo/bk.sh' is not an ELF object"
    not a plugin
    QFactoryLoader::QFactoryLoader() looking at "/usr/demo/getipbyname"
    "Failed to extract plugin meta data from '/usr/demo/getipbyname'"
    not a plugin
    QFactoryLoader::QFactoryLoader() looking at "/usr/demo/getweather"
    "Failed to extract plugin meta data from '/usr/demo/getweather'"
    not a plugin
    QFactoryLoader::QFactoryLoader() looking at "/usr/demo/kotest"
    "Failed to extract plugin meta data from '/usr/demo/kotest'"
    not a plugin
    QFactoryLoader::QFactoryLoader() looking at "/usr/demo/lcd"
    "Failed to extract plugin meta data from '/usr/demo/lcd'"
    not a plugin
    QFactoryLoader::QFactoryLoader() looking at "/usr/demo/led.sh"
    QElfParser: '/usr/demo/led.sh' is not an ELF object
    "'/usr/demo/led.sh' is not an ELF object"
    not a plugin
    QFactoryLoader::QFactoryLoader() looking at "/usr/demo/lsusb"
    "Failed to extract plugin meta data from '/usr/demo/lsusb'"
    not a plugin
    QFactoryLoader::QFactoryLoader() looking at "/usr/demo/qcmd"
    "Failed to extract plugin meta data from '/usr/demo/qcmd'"
    not a plugin
    QFactoryLoader::QFactoryLoader() looking at "/usr/demo/socket"
    "Failed to extract plugin meta data from '/usr/demo/socket'"
    not a plugin
    QFactoryLoader::QFactoryLoader() looking at "/usr/demo/tty"
    "Failed to extract plugin meta data from '/usr/demo/tty'"
    not a plugin
    loaded library "/opt/qt592/plugins/platforms/libqlinuxfb.so"
    QFactoryLoader::QFactoryLoader() checking directory path "/opt/qt592/plugins/platforms/../platforminputcontexts" ...
    QFactoryLoader::QFactoryLoader() looking at "/opt/qt592/plugins/platforminputcontexts/libibusplatforminputcontextplugin.so"
    Found metadata in lib /opt/qt592/plugins/platforminputcontexts/libibusplatforminputcontextplugin.so, metadata=
    {
    "IID": "org.qt-project.Qt.QPlatformInputContextFactoryInterface.5.1",
    "MetaData": {
    "Keys": [
    "ibus"
    ]
    },
    "className": "QIbusPlatformInputContextPlugin",
    "debug": false,
    "version": 329986
    }

    Got keys from plugin meta data ("ibus")
    QFactoryLoader::QFactoryLoader() looking at "/opt/qt592/plugins/platforminputcontexts/libqtvirtualkeyboardplugin.so"
    Found metadata in lib /opt/qt592/plugins/platforminputcontexts/libqtvirtualkeyboardplugin.so, metadata=
    {
    "IID": "org.qt-project.Qt.QPlatformInputContextFactoryInterface.5.1",
    "MetaData": {
    "Keys": [
    "qtvirtualkeyboard"
    ]
    },
    "className": "QVirtualKeyboardPlugin",
    "debug": false,
    "version": 329986
    }

    Got keys from plugin meta data ("qtvirtualkeyboard")
    QFactoryLoader::QFactoryLoader() checking directory path "/usr/demo/../platforminputcontexts" ...
    QFactoryLoader::QFactoryLoader() checking directory path "/opt/qt592/plugins/platforms/../generic" ...
    QFactoryLoader::QFactoryLoader() looking at "/opt/qt592/plugins/generic/libqtslibplugin.so"
    Found metadata in lib /opt/qt592/plugins/generic/libqtslibplugin.so, metadata=
    {
    "IID": "org.qt-project.Qt.QGenericPluginFactoryInterface",
    "MetaData": {
    "Keys": [
    "Tslib",
    "TslibRaw"
    ]
    },
    "className": "QTsLibPlugin",
    "debug": false,
    "version": 329986
    }

    Got keys from plugin meta data ("tslib", "tslibraw")
    QFactoryLoader::QFactoryLoader() looking at "/opt/qt592/plugins/generic/libqtuiotouchplugin.so"
    Found metadata in lib /opt/qt592/plugins/generic/libqtuiotouchplugin.so, metadata=
    {
    "IID": "org.qt-project.Qt.QGenericPluginFactoryInterface",
    "MetaData": {
    "Keys": [
    "TuioTouch"
    ]
    },
    "className": "QTuioTouchPlugin",
    "debug": false,
    "version": 329986
    }

    Got keys from plugin meta data ("tuiotouch")
    QFactoryLoader::QFactoryLoader() checking directory path "/usr/demo/../generic" ...
    loaded library "/opt/qt592/plugins/generic/libqtslibplugin.so"
    QFactoryLoader::QFactoryLoader() checking directory path "/opt/qt592/plugins/platforms/styles" ...
    QFactoryLoader::QFactoryLoader() checking directory path "/usr/demo/styles" ...
    Segmentation fault



  • maybe u need change ur croos compiler ,i complie ok on IMX6 platform with arm-none-linux-gnueabi-linux-4.8.1



  • PS :ubuntu12.04 and qt5.9.2



  • problem were solved.
    just set the QT_QPA_FB_HIDECURSOR=0.

    if set the QT_QPA_FB_HIDECURSOR=1, a NULL point will occur in qtbase/src/gui/kernel/qplatformcursor.cpp:
    void QPlatformCursorImage::set(Qt::CursorShape id)
    {
    QPlatformCursorImage *cursor = 0;

    if (id >= 0 && id <= Qt::LastCursor) {
        if (!systemCursorTable[id]){
            createSystemCursor(id);
    	}
        cursor = systemCursorTable[id];
    }
    if (cursor == 0) {
        if (!systemCursorTable[Qt::ArrowCursor]){
            createSystemCursor(Qt::ArrowCursor);
    	}
        cursor = systemCursorTable[Qt::ArrowCursor];
    }
       //will be NULL point as below if QT_QPA_FB_HIDECURSOR=1
    cursorImage = cursor->cursorImage;   
    hot = cursor->hot;
    

    }


  • Lifetime Qt Champion

    That looks like a bug. You should check the bug report system to see if it's something known.


Log in to reply
 

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