Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. QT5.12.x Raspberry Pi Zero Cross Compilation on Ubuntu 18.04.2 LTS

QT5.12.x Raspberry Pi Zero Cross Compilation on Ubuntu 18.04.2 LTS

Scheduled Pinned Locked Moved Solved Qt Creator and other tools
cross compilatiraspberry pi zeqt5.12.x
5 Posts 2 Posters 2.0k Views
  • 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.
  • A Offline
    A Offline
    andyDT
    wrote on last edited by andyDT
    #1

    Hi Fellow Qt Guys,

    Can you help me? For days I've been trying to get a cross compilation toolchain working for a Raspberry Pi Zero project. Obviously developing on a Pi Zero isn't really practical. I managed to get a cross compilation working using MinGW32 on Windows for Qt 5.5.0 using this tutorial

    https://visualgdb.com/tutorials/raspberry/qt/embedded/

    However, my project on the zero will use QT Quick QML so I needed a later cross compilation version so I set up a VM (VMware) running Ubuntu 18.04.2 LTS. Installed QT, all is well running the project under Ubuntu 18.04.2 LTS. I then followed this tutorial ( https://mechatronicsblog.com/cross-compile-and-deploy-qt-5-12-for-raspberry-pi ) to the letter only changing the device target for pi Zero to:

    /configure -release -opengl es2 -device linux-rasp-pi-g++ -device-option CROSS_COMPILE=~/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf- -sysroot ~/raspi/sysroot -opensource -confirm-license -skip qtwayland -skip qtlocation -skip qtscript -make libs -prefix /usr/local/qt5pi -extprefix ~/raspi/qt5pi -hostprefix ~/raspi/qt5 -no-use-gold-linker -v -no-gbm

    Installed the dependency packages amongst which is Clang version:

    clang version 6.0.0-1ubuntu2 (tags/RELEASE_600/final)
    Target: x86_64-pc-linux-gnu
    Thread model: posix
    InstalledDir: /usr/bin

    and I set tLLVM_INSTALL_DIR to /usr/bin
    and confirmed with echo

    However I still get a waring at the end of the summary:

    Configure summary:

    Building on: linux-g++ (x86_64, CPU features: mmx sse sse2)
    Building for: devices/linux-rasp-pi-g++ (arm, CPU features: <none>)
    Target compiler: gcc 4.8.3
    Configuration: cross_compile compile_examples enable_new_dtags largefile precompile_header shared rpath release c++11 concurrent dbus reduce_exports stl
    Build options:
    Mode ................................... release
    Optimize release build for size ........ no
    Building shared libraries .............. yes
    Using C standard ....................... C11
    Using C++ standard ..................... C++11
    Using ccache ........................... no
    Using gold linker ...................... no
    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 .... yes
    Qt Gui ................................. yes
    Qt Network ............................. yes
    Qt Sql ................................. yes
    Qt Testlib ............................. yes
    Qt Widgets ............................. yes
    Qt Xml ................................. yes
    Support enabled for:
    Using pkg-config ....................... yes
    udev ................................... no
    Using system zlib ...................... no
    Qt Core:
    DoubleConversion ....................... yes
    Using system DoubleConversion ........ no
    GLib ................................... yes
    iconv .................................. yes
    ICU .................................... no
    Tracing backend ........................ <none>
    Logging backends:
    journald ............................. no
    syslog ............................... no
    slog2 ................................ no
    Using system PCRE2 ..................... no
    Qt Network:
    getifaddrs() ........................... yes
    IPv6 ifname ............................ yes
    libproxy ............................... no
    Linux AF_NETLINK ....................... yes
    OpenSSL ................................ no
    Qt directly linked to OpenSSL ........ no
    OpenSSL 1.1 ............................ no
    DTLS ................................... no
    SCTP ................................... no
    Use system proxies ..................... yes
    Qt Gui:
    Accessibility .......................... yes
    FreeType ............................... yes
    Using system FreeType ................ yes
    HarfBuzz ............................... yes
    Using system HarfBuzz ................ no
    Fontconfig ............................. yes
    Image formats:
    GIF .................................. yes
    ICO .................................. yes
    JPEG ................................. yes
    Using system libjpeg ............... no
    PNG .................................. yes
    Using system libpng ................ no
    EGL .................................... yes
    OpenVG ................................. yes
    OpenGL:
    Desktop OpenGL ....................... no
    OpenGL ES 2.0 ........................ yes
    OpenGL ES 3.0 ........................ no
    OpenGL ES 3.1 ........................ no
    OpenGL ES 3.2 ........................ no
    Vulkan ................................. no
    Session Management ..................... yes
    Features used by QPA backends:
    evdev .................................. yes
    libinput ............................... no
    INTEGRITY HID .......................... no
    mtdev .................................. no
    tslib .................................. no
    xkbcommon .............................. no
    X11 specific:
    XLib ................................. no
    XCB Xlib ............................. no
    EGL on X11 ........................... no
    QPA backends:
    DirectFB ............................... no
    EGLFS .................................. yes
    EGLFS details:
    EGLFS OpenWFD ........................ no
    EGLFS i.Mx6 .......................... no
    EGLFS i.Mx6 Wayland .................. no
    EGLFS RCAR ........................... no
    EGLFS EGLDevice ...................... no
    EGLFS GBM ............................ no
    EGLFS VSP2 ........................... no
    EGLFS Mali ........................... no
    EGLFS Raspberry Pi ................... yes
    EGLFS X11 ............................ no
    LinuxFB ................................ yes
    VNC .................................... yes
    Mir client ............................. no
    Qt Sql:
    SQL item models ........................ yes
    Qt Widgets:
    GTK+ ................................... no
    Styles ................................. Fusion Windows
    Qt PrintSupport:
    CUPS ................................... no
    Qt Sql Drivers:
    DB2 (IBM) .............................. no
    InterBase .............................. no
    MySql .................................. no
    OCI (Oracle) ........................... no
    ODBC ................................... no
    PostgreSQL ............................. yes
    SQLite2 ................................ no
    SQLite ................................. yes
    Using system provided SQLite ......... no
    TDS (Sybase) ........................... no
    Qt Testlib:
    Tester for item models ................. yes
    Qt SerialBus:
    Socket CAN ............................. yes
    Socket CAN FD .......................... yes
    Qt QML:
    QML network support .................... yes
    QML debugging and profiling support .... yes
    QML sequence object .................... yes
    QML list model ......................... yes
    QML XML http request ................... yes
    QML Locale ............................. yes
    QML delegate model ..................... 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
    TableView item ......................... yes
    Path support ........................... yes
    PathView item .......................... yes
    Positioner items ....................... yes
    Repeater item .......................... yes
    ShaderEffect item ...................... yes
    Sprite item ............................ yes
    Qt Scxml:
    ECMAScript data model for QtScxml ...... yes
    Qt Gamepad:
    SDL2 ................................... no
    Qt 3D:
    Assimp ................................. yes
    System Assimp .......................... no
    Output Qt3D Job traces ................. no
    Output Qt3D GL traces .................. no
    Use SSE2 instructions .................. no
    Use AVX2 instructions .................. no
    Aspects:
    Render aspect ........................ yes
    Input aspect ......................... yes
    Logic aspect ......................... yes
    Animation aspect ..................... yes
    Extras aspect ........................ yes
    Qt 3D Renderers:
    OpenGL Renderer ........................ yes
    Qt 3D GeometryLoaders:
    Autodesk FBX ........................... no
    Qt Bluetooth:
    BlueZ .................................. no
    BlueZ Low Energy ....................... no
    Linux Crypto API ....................... no
    WinRT Bluetooth API (desktop & UWP) .... no
    Qt Sensors:
    sensorfw ............................... no
    Qt Quick Controls 2:
    Styles ................................. Default Fusion Imagine Material Universal
    Qt Quick Templates 2:
    Hover support .......................... yes
    Multi-touch support .................... yes
    QtXmlPatterns:
    XML schema support ..................... yes
    Qt Multimedia:
    ALSA ................................... no
    GStreamer 1.0 .......................... yes
    GStreamer 0.10 ......................... no
    Video for Linux ........................ yes
    OpenAL ................................. no
    PulseAudio ............................. yes
    Resource Policy (libresourceqt5) ....... no
    Windows Audio Services ................. no
    DirectShow ............................. no
    Windows Media Foundation ............... no
    Qt Tools:
    QDoc ................................... no

    Note: Also available for Linux: linux-clang linux-icc

    WARNING: QDoc will not be compiled, probably because libclang could not be located. This means that you cannot build the Qt documentation.

    Either ensure that llvm-config is in your PATH environment variable, or set LLVM_INSTALL_DIR to the location of your llvm installation.
    On Linux systems, you may be able to install libclang by installing the libclang-dev or libclang-devel package, depending on your distribution.
    On macOS, you can use Homebrew's llvm package.
    On Windows, you must set LLVM_INSTALL_DIR to the installation path.

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

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

    This is the final output on make install:

    cd doc/ && ( test -e Makefile || /home/ubuntuvm/raspi/qt-everywhere-src-5.12.2/qtbase/bin/qmake -o Makefile /home/ubuntuvm/raspi/qt-everywhere-src-5.12.2/qtdoc/doc/doc.pro ) && make -f Makefile install
    make[2]: Entering directory '/home/ubuntuvm/raspi/qt-everywhere-src-5.12.2/qtdoc/doc'
    make[2]: Nothing to be done for 'install'.
    make[2]: Leaving directory '/home/ubuntuvm/raspi/qt-everywhere-src-5.12.2/qtdoc/doc'
    make[1]: Leaving directory '/home/ubuntuvm/raspi/qt-everywhere-src-5.12.2/qtdoc'

    So why is qtDoc still not working?

    When I go to create a kit in QT creator, Qmake is invalid and thus is not selectable.

    0_1552927712063_7f01b452-4320-4755-b570-85d8e02a218b-image.png

    Qmake is 24.6 MB in size

    Any help appreciated

    Thanks

    jsulmJ 1 Reply Last reply
    0
    • A Offline
      A Offline
      andyDT
      wrote on last edited by
      #4
      This post is deleted!
      1 Reply Last reply
      0
      • A andyDT

        Hi Fellow Qt Guys,

        Can you help me? For days I've been trying to get a cross compilation toolchain working for a Raspberry Pi Zero project. Obviously developing on a Pi Zero isn't really practical. I managed to get a cross compilation working using MinGW32 on Windows for Qt 5.5.0 using this tutorial

        https://visualgdb.com/tutorials/raspberry/qt/embedded/

        However, my project on the zero will use QT Quick QML so I needed a later cross compilation version so I set up a VM (VMware) running Ubuntu 18.04.2 LTS. Installed QT, all is well running the project under Ubuntu 18.04.2 LTS. I then followed this tutorial ( https://mechatronicsblog.com/cross-compile-and-deploy-qt-5-12-for-raspberry-pi ) to the letter only changing the device target for pi Zero to:

        /configure -release -opengl es2 -device linux-rasp-pi-g++ -device-option CROSS_COMPILE=~/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf- -sysroot ~/raspi/sysroot -opensource -confirm-license -skip qtwayland -skip qtlocation -skip qtscript -make libs -prefix /usr/local/qt5pi -extprefix ~/raspi/qt5pi -hostprefix ~/raspi/qt5 -no-use-gold-linker -v -no-gbm

        Installed the dependency packages amongst which is Clang version:

        clang version 6.0.0-1ubuntu2 (tags/RELEASE_600/final)
        Target: x86_64-pc-linux-gnu
        Thread model: posix
        InstalledDir: /usr/bin

        and I set tLLVM_INSTALL_DIR to /usr/bin
        and confirmed with echo

        However I still get a waring at the end of the summary:

        Configure summary:

        Building on: linux-g++ (x86_64, CPU features: mmx sse sse2)
        Building for: devices/linux-rasp-pi-g++ (arm, CPU features: <none>)
        Target compiler: gcc 4.8.3
        Configuration: cross_compile compile_examples enable_new_dtags largefile precompile_header shared rpath release c++11 concurrent dbus reduce_exports stl
        Build options:
        Mode ................................... release
        Optimize release build for size ........ no
        Building shared libraries .............. yes
        Using C standard ....................... C11
        Using C++ standard ..................... C++11
        Using ccache ........................... no
        Using gold linker ...................... no
        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 .... yes
        Qt Gui ................................. yes
        Qt Network ............................. yes
        Qt Sql ................................. yes
        Qt Testlib ............................. yes
        Qt Widgets ............................. yes
        Qt Xml ................................. yes
        Support enabled for:
        Using pkg-config ....................... yes
        udev ................................... no
        Using system zlib ...................... no
        Qt Core:
        DoubleConversion ....................... yes
        Using system DoubleConversion ........ no
        GLib ................................... yes
        iconv .................................. yes
        ICU .................................... no
        Tracing backend ........................ <none>
        Logging backends:
        journald ............................. no
        syslog ............................... no
        slog2 ................................ no
        Using system PCRE2 ..................... no
        Qt Network:
        getifaddrs() ........................... yes
        IPv6 ifname ............................ yes
        libproxy ............................... no
        Linux AF_NETLINK ....................... yes
        OpenSSL ................................ no
        Qt directly linked to OpenSSL ........ no
        OpenSSL 1.1 ............................ no
        DTLS ................................... no
        SCTP ................................... no
        Use system proxies ..................... yes
        Qt Gui:
        Accessibility .......................... yes
        FreeType ............................... yes
        Using system FreeType ................ yes
        HarfBuzz ............................... yes
        Using system HarfBuzz ................ no
        Fontconfig ............................. yes
        Image formats:
        GIF .................................. yes
        ICO .................................. yes
        JPEG ................................. yes
        Using system libjpeg ............... no
        PNG .................................. yes
        Using system libpng ................ no
        EGL .................................... yes
        OpenVG ................................. yes
        OpenGL:
        Desktop OpenGL ....................... no
        OpenGL ES 2.0 ........................ yes
        OpenGL ES 3.0 ........................ no
        OpenGL ES 3.1 ........................ no
        OpenGL ES 3.2 ........................ no
        Vulkan ................................. no
        Session Management ..................... yes
        Features used by QPA backends:
        evdev .................................. yes
        libinput ............................... no
        INTEGRITY HID .......................... no
        mtdev .................................. no
        tslib .................................. no
        xkbcommon .............................. no
        X11 specific:
        XLib ................................. no
        XCB Xlib ............................. no
        EGL on X11 ........................... no
        QPA backends:
        DirectFB ............................... no
        EGLFS .................................. yes
        EGLFS details:
        EGLFS OpenWFD ........................ no
        EGLFS i.Mx6 .......................... no
        EGLFS i.Mx6 Wayland .................. no
        EGLFS RCAR ........................... no
        EGLFS EGLDevice ...................... no
        EGLFS GBM ............................ no
        EGLFS VSP2 ........................... no
        EGLFS Mali ........................... no
        EGLFS Raspberry Pi ................... yes
        EGLFS X11 ............................ no
        LinuxFB ................................ yes
        VNC .................................... yes
        Mir client ............................. no
        Qt Sql:
        SQL item models ........................ yes
        Qt Widgets:
        GTK+ ................................... no
        Styles ................................. Fusion Windows
        Qt PrintSupport:
        CUPS ................................... no
        Qt Sql Drivers:
        DB2 (IBM) .............................. no
        InterBase .............................. no
        MySql .................................. no
        OCI (Oracle) ........................... no
        ODBC ................................... no
        PostgreSQL ............................. yes
        SQLite2 ................................ no
        SQLite ................................. yes
        Using system provided SQLite ......... no
        TDS (Sybase) ........................... no
        Qt Testlib:
        Tester for item models ................. yes
        Qt SerialBus:
        Socket CAN ............................. yes
        Socket CAN FD .......................... yes
        Qt QML:
        QML network support .................... yes
        QML debugging and profiling support .... yes
        QML sequence object .................... yes
        QML list model ......................... yes
        QML XML http request ................... yes
        QML Locale ............................. yes
        QML delegate model ..................... 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
        TableView item ......................... yes
        Path support ........................... yes
        PathView item .......................... yes
        Positioner items ....................... yes
        Repeater item .......................... yes
        ShaderEffect item ...................... yes
        Sprite item ............................ yes
        Qt Scxml:
        ECMAScript data model for QtScxml ...... yes
        Qt Gamepad:
        SDL2 ................................... no
        Qt 3D:
        Assimp ................................. yes
        System Assimp .......................... no
        Output Qt3D Job traces ................. no
        Output Qt3D GL traces .................. no
        Use SSE2 instructions .................. no
        Use AVX2 instructions .................. no
        Aspects:
        Render aspect ........................ yes
        Input aspect ......................... yes
        Logic aspect ......................... yes
        Animation aspect ..................... yes
        Extras aspect ........................ yes
        Qt 3D Renderers:
        OpenGL Renderer ........................ yes
        Qt 3D GeometryLoaders:
        Autodesk FBX ........................... no
        Qt Bluetooth:
        BlueZ .................................. no
        BlueZ Low Energy ....................... no
        Linux Crypto API ....................... no
        WinRT Bluetooth API (desktop & UWP) .... no
        Qt Sensors:
        sensorfw ............................... no
        Qt Quick Controls 2:
        Styles ................................. Default Fusion Imagine Material Universal
        Qt Quick Templates 2:
        Hover support .......................... yes
        Multi-touch support .................... yes
        QtXmlPatterns:
        XML schema support ..................... yes
        Qt Multimedia:
        ALSA ................................... no
        GStreamer 1.0 .......................... yes
        GStreamer 0.10 ......................... no
        Video for Linux ........................ yes
        OpenAL ................................. no
        PulseAudio ............................. yes
        Resource Policy (libresourceqt5) ....... no
        Windows Audio Services ................. no
        DirectShow ............................. no
        Windows Media Foundation ............... no
        Qt Tools:
        QDoc ................................... no

        Note: Also available for Linux: linux-clang linux-icc

        WARNING: QDoc will not be compiled, probably because libclang could not be located. This means that you cannot build the Qt documentation.

        Either ensure that llvm-config is in your PATH environment variable, or set LLVM_INSTALL_DIR to the location of your llvm installation.
        On Linux systems, you may be able to install libclang by installing the libclang-dev or libclang-devel package, depending on your distribution.
        On macOS, you can use Homebrew's llvm package.
        On Windows, you must set LLVM_INSTALL_DIR to the installation path.

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

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

        This is the final output on make install:

        cd doc/ && ( test -e Makefile || /home/ubuntuvm/raspi/qt-everywhere-src-5.12.2/qtbase/bin/qmake -o Makefile /home/ubuntuvm/raspi/qt-everywhere-src-5.12.2/qtdoc/doc/doc.pro ) && make -f Makefile install
        make[2]: Entering directory '/home/ubuntuvm/raspi/qt-everywhere-src-5.12.2/qtdoc/doc'
        make[2]: Nothing to be done for 'install'.
        make[2]: Leaving directory '/home/ubuntuvm/raspi/qt-everywhere-src-5.12.2/qtdoc/doc'
        make[1]: Leaving directory '/home/ubuntuvm/raspi/qt-everywhere-src-5.12.2/qtdoc'

        So why is qtDoc still not working?

        When I go to create a kit in QT creator, Qmake is invalid and thus is not selectable.

        0_1552927712063_7f01b452-4320-4755-b570-85d8e02a218b-image.png

        Qmake is 24.6 MB in size

        Any help appreciated

        Thanks

        jsulmJ Offline
        jsulmJ Offline
        jsulm
        Lifetime Qt Champion
        wrote on last edited by
        #2

        @andyDT What do you see when you put the mouse cursor over that red exclamation mark?
        My guess is that qmake was build for ARM not x86.

        https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply
        0
        • A Offline
          A Offline
          andyDT
          wrote on last edited by
          #3
          This post is deleted!
          1 Reply Last reply
          0
          • A Offline
            A Offline
            andyDT
            wrote on last edited by
            #4
            This post is deleted!
            1 Reply Last reply
            0
            • A Offline
              A Offline
              andyDT
              wrote on last edited by
              #5
              This post is deleted!
              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