Raspberry Pi 3 B+ Multiple errors compiling QT 5.12.3



  • HI,
    After trying a lot of tutorials and a lot of compilations and 2 weeks after start try compiling qt5 for my raspberry pi 3b+ with image "2019-04-08-raspbian-stretch.img" I got always some kind of error, for now I'm trying this tutorial

    I run:

    PKG_CONFIG_LIBDIR=/usr/lib/arm-linux-gnueabihf/pkgconfig:/usr/share/pkgconfig ../qt-everywhere-src-5.12.3/configure -platform linux-rpi-g++ -v -opengl es2 -eglfs -no-gtk -opensource -confirm-license -release -reduce-exports -force-pkg-config -nomake examples -no-compile-examples -skip qtwayland -skip qtwebengine -no-feature-geoservices_mapboxgl -qt-pcre -no-pch -ssl -evdev -system-freetype -fontconfig -glib -prefix /opt/Qt5.12 -qpa eglfs
    

    And I got:

    Configure summary:
    
    Build type: linux-rpi-g++ (arm, CPU features: <none>)
    Compiler: gcc 6.3.0
    Configuration: use_gold_linker enable_new_dtags largefile shared rpath release c++11 c++14 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++14
      Using ccache ........................... no
      Using gold linker ...................... yes
      Using new DTAGS ........................ yes
      Using precompiled headers .............. no
      Using LTCG ............................. no
      Target compiler supports:
        NEON ................................. no
      Build parts ............................ libs tools
    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 ................................... yes
      Using system zlib ...................... yes
    Qt Core:
      DoubleConversion ....................... yes
        Using system DoubleConversion ........ yes
      GLib ................................... yes
      iconv .................................. no
      ICU .................................... yes
      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 ................................ yes
        Qt directly linked to OpenSSL ........ no
      OpenSSL 1.1 ............................ no
      DTLS ................................... yes
      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 ............... yes
        PNG .................................. yes
          Using system libpng ................ yes
      EGL .................................... yes
      OpenVG ................................. yes
      OpenGL:
        Desktop OpenGL ....................... no
        OpenGL ES 2.0 ........................ yes
        OpenGL ES 3.0 ........................ yes
        OpenGL ES 3.1 ........................ yes
        OpenGL ES 3.2 ........................ yes
      Vulkan ................................. no
      Session Management ..................... yes
    Features used by QPA backends:
      evdev .................................. yes
      libinput ............................... yes
      INTEGRITY HID .......................... no
      mtdev .................................. yes
      tslib .................................. yes
      xkbcommon .............................. yes
      X11 specific:
        XLib ................................. yes
        XCB Xlib ............................. yes
        EGL on X11 ........................... yes
    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 ...................... yes
        EGLFS GBM ............................ yes
        EGLFS VSP2 ........................... no
        EGLFS Mali ........................... no
        EGLFS Raspberry Pi ................... yes
        EGLFS X11 ............................ yes
      LinuxFB ................................ yes
      VNC .................................... yes
      Mir client ............................. no
      XCB:
        Using system-provided XCB libraries .. yes
        XCB XKB .............................. yes
        XCB XInput ........................... no
        Native painting (experimental) ....... yes
        GL integrations:
          GLX Plugin ......................... no
          EGL-X11 Plugin ..................... yes
    Qt Sql:
      SQL item models ........................ yes
    Qt Widgets:
      GTK+ ................................... no
      Styles ................................. Fusion Windows
    Qt PrintSupport:
      CUPS ................................... yes
    Qt Sql Drivers:
      DB2 (IBM) .............................. no
      InterBase .............................. no
      MySql .................................. yes
      OCI (Oracle) ........................... no
      ODBC ................................... yes
      PostgreSQL ............................. yes
      SQLite2 ................................ yes
      SQLite ................................. yes
        Using system provided SQLite ......... no
      TDS (Sybase) ........................... yes
    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 .................................. yes
      BlueZ Low Energy ....................... yes
      Linux Crypto API ....................... yes
      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
    Qt Positioning:
      Gypsy GPS Daemon ....................... no
      WinRT Geolocation API .................. no
    Qt Location:
      Qt.labs.location experimental QML plugin . yes
      Geoservice plugins:
        OpenStreetMap ........................ yes
        HERE ................................. yes
        Esri ................................. yes
        Mapbox ............................... yes
        MapboxGL ............................. no
        Itemsoverlay ......................... yes
    QtXmlPatterns:
      XML schema support ..................... yes
    Qt Multimedia:
      ALSA ................................... yes
      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 ................................... yes
    
    Qt is now configured for building. Just run 'make'.
    Once everything is built, you must run 'make install'.
    Qt will be installed into '/opt/Qt5.12'.
    
    Prior to reconfiguration, make sure you remove any leftovers from
    the previous build.
    
    

    I run:

    make -j4
    

    And I got:

    abaseSupport/5.12.3/QtFontDatabaseSupport -I../../../../../../include/QtFontDatabaseSupport -I/home/pi/qt-everywhere-src-5.12.3/qtbase/include/QtLinuxAccessibilitySupport -I/home/pi/qt-everywhere-src-5.12.3/qtbase/include/QtLinuxAccessibilitySupport/5.12.3 -I/home/pi/qt-everywhere-src-5.12.3/qtbase/include/QtLinuxAccessibilitySupport/5.12.3/QtLinuxAccessibilitySupport -I../../../../../../include/QtLinuxAccessibilitySupport -I/home/pi/qt-everywhere-src-5.12.3/qtbase/include/QtAccessibilitySupport -I/home/pi/qt-everywhere-src-5.12.3/qtbase/include/QtAccessibilitySupport/5.12.3 -I/home/pi/qt-everywhere-src-5.12.3/qtbase/include/QtAccessibilitySupport/5.12.3/QtAccessibilitySupport -I../../../../../../include/QtAccessibilitySupport -I/home/pi/qt-everywhere-src-5.12.3/qtbase/include/QtEglSupport -I/home/pi/qt-everywhere-src-5.12.3/qtbase/include/QtEglSupport/5.12.3 -I/home/pi/qt-everywhere-src-5.12.3/qtbase/include/QtEglSupport/5.12.3/QtEglSupport -I../../../../../../include/QtEglSupport -I/home/pi/qt-everywhere-src-5.12.3/qtbase/include/QtGui/5.12.3 -I/home/pi/qt-everywhere-src-5.12.3/qtbase/include/QtGui/5.12.3/QtGui -I../../../../../../include/QtGui/5.12.3 -I../../../../../../include/QtGui/5.12.3/QtGui -I/home/pi/qt-everywhere-src-5.12.3/qtbase/include/QtGui -I../../../../../../include/QtGui -I/home/pi/qt-everywhere-src-5.12.3/qtbase/include/QtEdidSupport -I/home/pi/qt-everywhere-src-5.12.3/qtbase/include/QtEdidSupport/5.12.3 -I/home/pi/qt-everywhere-src-5.12.3/qtbase/include/QtEdidSupport/5.12.3/QtEdidSupport -I../../../../../../include/QtEdidSupport -I/home/pi/qt-everywhere-src-5.12.3/qtbase/include/QtCore/5.12.3 -I/home/pi/qt-everywhere-src-5.12.3/qtbase/include/QtCore/5.12.3/QtCore -I../../../../../../include/QtCore/5.12.3 -I../../../../../../include/QtCore/5.12.3/QtCore -I/home/pi/qt-everywhere-src-5.12.3/qtbase/include/QtDBus -I../../../../../../include/QtDBus -I/home/pi/qt-everywhere-src-5.12.3/qtbase/include/QtCore -I../../../../../../include/QtCore -I.moc -I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux -isystem /usr/include/at-spi-2.0 -isystem /usr/include/dbus-1.0 -I/usr/lib/arm-linux-gnueabihf/dbus-1.0/include -isystem /usr/include/glib-2.0 -I/usr/lib/arm-linux-gnueabihf/glib-2.0/include -I/home/pi/qt-everywhere-src-5.12.3/qtbase/mkspecs/linux-rpi-g++ -o .obj/qxcbeglmain.o /home/pi/qt-everywhere-src-5.12.3/qtbase/src/plugins/platforms/xcb/gl_integrations/xcb_egl/qxcbeglmain.cpp
    /home/pi/qt-everywhere-src-5.12.3/qtbase/src/plugins/platforms/xcb/gl_integrations/xcb_egl/qxcbeglwindow.cpp: In member function ‘virtual void QXcbEglWindow::create()’:
    /home/pi/qt-everywhere-src-5.12.3/qtbase/src/plugins/platforms/xcb/gl_integrations/xcb_egl/qxcbeglwindow.cpp:96:81: error: invalid conversion from ‘xcb_window_t {aka unsigned int}’ to ‘EGLNativeWindowType {aka void*}’ [-fpermissive]
         m_surface = eglCreateWindowSurface(m_glIntegration->eglDisplay(), m_config, m_window, 0);
                                                                                     ^~~~~~~~
    In file included from /home/pi/qt-everywhere-src-5.12.3/qtbase/include/QtEglSupport/5.12.3/QtEglSupport/private/../../../../../src/platformsupport/eglconvenience/qt_egl_p.h:67:0,
                     from /home/pi/qt-everywhere-src-5.12.3/qtbase/include/QtEglSupport/5.12.3/QtEglSupport/private/qt_egl_p.h:1,
                     from /home/pi/qt-everywhere-src-5.12.3/qtbase/src/plugins/platforms/xcb/gl_integrations/xcb_egl/qxcbeglinclude.h:49,
                     from /home/pi/qt-everywhere-src-5.12.3/qtbase/src/plugins/platforms/xcb/gl_integrations/xcb_egl/qxcbeglwindow.h:45,
                     from /home/pi/qt-everywhere-src-5.12.3/qtbase/src/plugins/platforms/xcb/gl_integrations/xcb_egl/qxcbeglwindow.cpp:40:
    /opt/vc/include/EGL/egl.h:265:31: note:   initializing argument 3 of ‘void* eglCreateWindowSurface(EGLDisplay, EGLConfig, EGLNativeWindowType, const EGLint*)’
     EGLAPI EGLSurface EGLAPIENTRY eglCreateWindowSurface(EGLDisplay dpy, EGLConfig config,
                                   ^~~~~~~~~~~~~~~~~~~~~~
    Makefile:2036: recipe for target '.obj/qxcbeglwindow.o' failed
    make[7]: *** [.obj/qxcbeglwindow.o] Error 1
    make[7]: *** Waiting for unfinished jobs....
    make[7]: Leaving directory '/home/pi/build/qtbase/src/plugins/platforms/xcb/gl_integrations/xcb_egl'
    Makefile:46: recipe for target 'sub-xcb_egl-make_first' failed
    make[6]: *** [sub-xcb_egl-make_first] Error 2
    make[6]: Leaving directory '/home/pi/build/qtbase/src/plugins/platforms/xcb/gl_integrations'
    Makefile:106: recipe for target 'sub-gl_integrations-make_first-ordered' failed
    make[5]: *** [sub-gl_integrations-make_first-ordered] Error 2
    make[5]: Leaving directory '/home/pi/build/qtbase/src/plugins/platforms/xcb'
    Makefile:102: recipe for target 'sub-xcb-make_first' failed
    make[4]: *** [sub-xcb-make_first] Error 2
    make[4]: Leaving directory '/home/pi/build/qtbase/src/plugins/platforms'
    Makefile:104: recipe for target 'sub-platforms-make_first' failed
    make[3]: *** [sub-platforms-make_first] Error 2
    make[3]: Leaving directory '/home/pi/build/qtbase/src/plugins'
    Makefile:725: recipe for target 'sub-plugins-make_first' failed
    make[2]: *** [sub-plugins-make_first] Error 2
    make[2]: Leaving directory '/home/pi/build/qtbase/src'
    Makefile:50: recipe for target 'sub-src-make_first' failed
    make[1]: *** [sub-src-make_first] Error 2
    make[1]: Leaving directory '/home/pi/build/qtbase'
    Makefile:83: recipe for target 'module-qtbase-make_first' failed
    make: *** [module-qtbase-make_first] Error 2
    
    

    If I run the configure file with platform linux-rpi-vc4-g++ on configure:

    2.3/qtbase/mkspecs/linux-rpi-vc4-g++ -DQT_VERSION_STR=\"5.12.3\" -DQT_VERSION_MAJOR=5 -DQT_VERSION_MINOR=12 -DQT_VERSION_PATCH=3 -DQT_BUILD_QMAKE -DQT_BOOTSTRAPPED -DPROEVALUATOR_FULL -DQT_NO_FOREACH /home/pi/qt-everywhere-src-5.12.3/qtbase/qmake/generators/makefiledeps.cpp
    In file included from /home/pi/qt-everywhere-src-5.12.3/qtbase/qmake/generators/makefiledeps.cpp:36:0:
    /home/pi/qt-everywhere-src-5.12.3/qtbase/mkspecs/linux-rpi-vc4-g++/qplatformdefs.h:40:43: fatal error: ../../linux-g++/qplatformdefs.h: No such file or directory
     #include "../../linux-g++/qplatformdefs.h"
                                               ^
    compilation terminated.
    Makefile:257: recipe for target 'makefiledeps.o' failed
    make: *** [makefiledeps.o] Error 1
    
    

    No matter what I got error, but in particular in this error I don found anything if I run the configure file with platform linux-rpi3-g++ , linux-rpi-g++ , linux-rpi-g++ I get the same error and I'm stuck.

    Some one have any idea?
    thanks

    UPDATE 09/07/2019
    I try complile qt5.7 because it's available on apt so I think e can compile it qith no problem but I can't too I the get error:

    I run:

    PKG_CONFIG_LIBDIR=/usr/lib/arm-linux-gnueabihf/pkgconfig PKG_CONFIG_SYSROOT_DIR=/ ./configure -v -opengl es2 -eglfs -device linux-rpi3-g++ -device-option CROSS_COMPILE=/usr/bin/ -opensource -confirm-license -nomake examples -no-compile-examples -skip qtwayland -skip qtwebengine -release -prefix /opt/Qt5.7 -nomake tests
    

    I got

    ./../include/QtCore -I../../include/QtCore/5.7.0 -I../../include/QtCore/5.7.0/QtCore -I.moc -I../../mkspecs/devices/linux-rpi3-g++ -o .obj/qline.o tools/qline.cpp
    tools/qhash.cpp:148:54: error: attribute(target("+crc")) is unknown
     static uint crc32(const Char *ptr, size_t len, uint h)
                                                          ^
    Makefile:14351: recipe for target '.obj/qhash.o' failed
    make[3]: *** [.obj/qhash.o] Error 1
    make[3]: *** Waiting for unfinished jobs....
    make[3]: Leaving directory '/home/pi/qt-everywhere-opensource-src-5.7.0/qtbase/src/corelib'
    Makefile:166: recipe for target 'sub-corelib-make_first' failed
    make[2]: *** [sub-corelib-make_first] Error 2
    make[2]: *** Waiting for unfinished jobs....
    g++ -Wl,--gc-sections -Wl,-O1 -o ../../../bin/qdbuscpp2xml .obj/moc.o .obj/preprocessor.o .obj/generator.o .obj/parser.o .obj/token.o .obj/qdbuscpp2xml.o   -L/home/pi/qt-everywhere-opensource-src-5.7.0/qtbase/lib -lQt5BootstrapDBus -lQt5Bootstrap -lpthread 
    make[3]: Leaving directory '/home/pi/qt-everywhere-opensource-src-5.7.0/qtbase/src/tools/qdbuscpp2xml'
    make[2]: Leaving directory '/home/pi/qt-everywhere-opensource-src-5.7.0/qtbase/src'
    Makefile:45: recipe for target 'sub-src-make_first' failed
    make[1]: *** [sub-src-make_first] Error 2
    make[1]: Leaving directory '/home/pi/qt-everywhere-opensource-src-5.7.0/qtbase'
    Makefile:75: recipe for target 'module-qtbase-make_first' failed
    make: *** [module-qtbase-make_first] Error 2
    pi@raspberrypi:~/qt-everywhere-opensource-src-5.
    

    Apparently I can't compile any QT version.

    what can i do? some help?
    Thanks



  • This worked for me thank to the autor https://github.com/tranter/raspberry-pi-qt-builds



  • This worked for me thank to the autor https://github.com/tranter/raspberry-pi-qt-builds


Log in to reply