Native Build of Qt on Raspberry Pi-3



  • Hi All,

    I build Qt 5.9.2 on Raspberry Pi3 board. I refered the below link.

    https://wiki.qt.io/Native_Build_of_Qt_5.4.1_on_a_Raspberry_Pi

    but I am getting error after giving below command.

    ./configure -v -opengl es2 -tslib -force-pkg-config -device linux-rasp-pi-g++ -device-option CROSS_COMPILE=/usr/bin/
    -opensource -confirm-license -optimized-qmake -reduce-exports -release -qt-pcre -make libs
    -prefix /usr/local/qt5 2>&1 | tee config.out

    output of the command :

    sudo ./configure -v -opengl es2 -tslib -force-pkg-config -device linux-rasp-pi-g++ -device-option CROSS_COMPILE=/usr/bin/ -opensource -confirm-license -optimized-qmake -reduce-exports -release -qt-pcre -make libs -prefix /usr/local/qt5 2>&1 | tee config.out
    tee: config.out: Permission denied

    • cd qtbase
    • /media/usb/qt-everywhere-opensource-src-5.9.2/qtbase/configure -top-level -v -opengl es2 -tslib -force-pkg-config -device linux-rasp-pi-g++ -device-option CROSS_COMPILE=/usr/bin/ -opensource -confirm-license -optimized-qmake -reduce-exports -release -qt-pcre -make libs -prefix /usr/local/qt5
      Creating qmake...
      make: Nothing to be done for 'first'.
      Command line: -v -opengl es2 -tslib -force-pkg-config -device linux-rasp-pi-g++ -device-option CROSS_COMPILE=/usr/bin/ -opensource -confirm-license -optimized-qmake -reduce-exports -release -qt-pcre -make libs -prefix /usr/local/qt5

    This is the Qt Open Source Edition.

    You have already accepted the terms of the Open Source license.

    Running configuration tests...
    Done running configuration tests.

    Configure summary:

    Building on: linux-g++ (arm, CPU features: <none>)
    Building for: devices/linux-rasp-pi-g++ (arm, CPU features: <none>)
    Configuration: cross_compile use_gold_linker compile_examples enable_new_dtags largefile precompile_header shared rpath release c++11 c++14 c++1z concurrent dbus no-pkg-config reduce_exports release_tools stl
    Build options:
    Mode ................................... release; optimized tools
    Optimize release build for size ........ no
    Building shared libraries .............. yes
    Using C++ standard ..................... C++1z
    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 ................................... yes
    Using system zlib ...................... yes
    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 ............... yes
    PNG .................................. yes
    Using system libpng ................ yes
    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 .................................. yes
    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
    X11:
    Using system-provided XCB libraries .. yes
    EGL on X11 ........................... no
    Xinput2 .............................. yes
    XCB XKB .............................. no
    XLib ................................. yes
    XCB render ........................... yes
    XCB GLX .............................. yes
    XCB Xlib ............................. yes
    Using system-provided xkbcommon ...... no
    Qt Widgets:
    GTK+ ................................... no
    Styles ................................. Fusion Windows
    Qt PrintSupport:
    CUPS ................................... no
    Qt Sql:
    DB2 (IBM) .............................. no
    InterBase .............................. no
    MySql .................................. yes
    OCI (Oracle) ........................... no
    ODBC ................................... no
    PostgreSQL ............................. yes
    SQLite2 ................................ yes
    SQLite ................................. yes
    Using system provided SQLite ......... no
    TDS (Sybase) ........................... yes
    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: Also available for Linux: linux-clang linux-icc

    Note: -optimized-tools is not useful in -release mode.

    Note: Disabling X11 Accessibility Bridge: D-Bus or AT-SPI is missing.

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

    ERROR: Feature 'pkg-config' was enabled, but the pre-condition 'tests.pkg-config' failed.

    ERROR: Feature 'opengles2' was enabled, but the pre-condition 'config.win32 || (!config.watchos && !features.opengl-desktop && libs.opengl_es2)' failed.

    ERROR: The OpenGL functionality tests failed!
    You might need to modify the include and library search paths by editing QMAKE_INCDIR_OPENGL[_ES2],
    QMAKE_LIBDIR_OPENGL[_ES2] and QMAKE_LIBS_OPENGL[_ES2] in the mkspec for your platform.

    How to solve this above errors?

    Could you please provide detail information on qt5 build procedure.

    Thanks and Regards,
    Swathi.


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    First of all, do out of source builds so you can more easily start from scratch if you have an error.

    You should add the -v option to your configure parameter so it shows exactly what's going wrong.



  • Could you please give the ./configure command.



  • @swathi I'm using this command to crossCompile

    ./configure -release -opengl es2 -device linux-rasp-pi3-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 -make libs -prefix /usr/local/qt5pi -extprefix ~/raspi/qt5pi -hostprefix ~/raspi/qt5 -v -no-use-gold-linker
    

    but it seems that you are missing some development files....please give more debug info


  • Lifetime Qt Champion

    Where is your source located ?

    Again, do out of source builds, if you are calling configure again and again in the sources without doing a cleanup you are going to have all kinds of troubles.

    Also, you should parse the output to see what makes the OpenGL test fail.



  • Hi,

    I followed "https://wiki.qt.io/Native_Build_of_Qt_5.4.1_on_a_Raspberry_Pi" Link but I downloaded the link source file qt_5_9_1.

    I modified the configure line like this.( linux-rasp-pi-g++ repalce with linux-rasp-pi3-g++ )

    ./configure -v -opengl es2 -tslib -force-pkg-config -device linux-rasp-pi3-g++ -device-option CROSS_COMPILE=/usr/bin/ -opensource -confirm-license -optimized-qmake -reduce-exports -release -qt-pcre -make libs -prefix /usr/local/qt5 2>&1 | tee config.out
    I am getting error.Could you please suggest the configure path.

    I am using Raspberry Pi3 board with "2017-09-07-raspbian-stretch" image. SD card size is 32 GB and I mount the Pen drive for building qt. Pen drive size is 16gb.

    How much space is required for building and what size of SD card and pen drive is required.

    Thanks in advance.
    Regards,
    Swathi.



  • Hi,

    Yes I called configure again and again in the sources without doing cleanup.
    How to cleanup the configure(Command for cleanup)?



  • ERROR: Feature 'pkg-config' was enabled, but the pre-condition 'tests.pkg-config' failed.
    

    I believe if you provide sysroot to the configure, this error can be solved. The sysroot should have .pc files for the dependencies required.

    The other errors are obvious. You are not having cross compiled opengl libraries. Mesa can provide you with these libraries. I am also having trouble cross compiling Mesa.


  • Lifetime Qt Champion

    make confclean

    But as I already suggested, do out of source builds and nuke the build folder as needed.


Log in to reply
 

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