Failure to build QT5 5.10.1 (and 5.11.3, 5.12.) on Raspberry Pi 3



  • Following the instructions in http://www.tal.org/tutorials/building-qt-510-raspberry-pi-debian-stretch, I installed database support, X11 support and Wayland support packages. Although the ./configure completes successfully, the Make fails:

    /usr/bin/g++ -c -pipe -marm -mfpu=vfp -mtune=arm1176jzf-s -march=armv6zk -mabi=aapcs-linux -mfloat-abi=hard -O2 -std=c++1y -fvisibility=hidden -fvisibility-inlines-hidden -fno-exceptions -Wall -W -Wvla -Wdate-time -Wshift-overflow=2 -Wduplicated-cond -D_REENTRANT -fPIC -DQT_NO_FOREACH -DQT_DEPRECATED_WARNINGS -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_PLUGIN -DQT_XCB_QPA_LIB_LIB -DQT_SERVICE_SUPPORT_LIB -DQT_THEME_SUPPORT_LIB -DQT_FONTDATABASE_SUPPORT_LIB -DQT_EGL_SUPPORT_LIB -DQT_GUI_LIB -DQT_EDID_SUPPORT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I/home/pi/Downloads/qt5/qt-everywhere-src-5.12.0/qtbase/src/plugins/platforms/xcb/gl_integrations/xcb_egl -I. -I/home/pi/Downloads/qt5/qt-everywhere-src-5.12.0/qtbase/src/plugins/platforms/xcb/gl_integrations -I/home/pi/Downloads/qt5/qt-everywhere-src-5.12.0/qtbase/src/plugins/platforms/xcb -isystem /usr/include/libdrm -I/home/pi/Downloads/qt5/qt-everywhere-src-5.12.0/qtbase/include -I/home/pi/Downloads/qt5/qt-everywhere-src-5.12.0/qtbase/include/QtServiceSupport -I/home/pi/Downloads/qt5/qt-everywhere-src-5.12.0/qtbase/include/QtServiceSupport/5.12.0 -I/home/pi/Downloads/qt5/qt-everywhere-src-5.12.0/qtbase/include/QtServiceSupport/5.12.0/QtServiceSupport -I../../../../../../include -I../../../../../../include/QtServiceSupport -I/home/pi/Downloads/qt5/qt-everywhere-src-5.12.0/qtbase/include/QtThemeSupport -I/home/pi/Downloads/qt5/qt-everywhere-src-5.12.0/qtbase/include/QtThemeSupport/5.12.0 -I/home/pi/Downloads/qt5/qt-everywhere-src-5.12.0/qtbase/include/QtThemeSupport/5.12.0/QtThemeSupport -I../../../../../../include/QtThemeSupport -I/home/pi/Downloads/qt5/qt-everywhere-src-5.12.0/qtbase/include/QtFontDatabaseSupport -I/home/pi/Downloads/qt5/qt-everywhere-src-5.12.0/qtbase/include/QtFontDatabaseSupport/5.12.0 -I/home/pi/Downloads/qt5/qt-everywhere-src-5.12.0/qtbase/include/QtFontDatabaseSupport/5.12.0/QtFontDatabaseSupport -I../../../../../../include/QtFontDatabaseSupport -I/home/pi/Downloads/qt5/qt-everywhere-src-5.12.0/qtbase/include/QtEglSupport -I/home/pi/Downloads/qt5/qt-everywhere-src-5.12.0/qtbase/include/QtEglSupport/5.12.0 -I/home/pi/Downloads/qt5/qt-everywhere-src-5.12.0/qtbase/include/QtEglSupport/5.12.0/QtEglSupport -I../../../../../../include/QtEglSupport -I/home/pi/Downloads/qt5/qt-everywhere-src-5.12.0/qtbase/include/QtGui/5.12.0 -I/home/pi/Downloads/qt5/qt-everywhere-src-5.12.0/qtbase/include/QtGui/5.12.0/QtGui -I../../../../../../include/QtGui/5.12.0 -I../../../../../../include/QtGui/5.12.0/QtGui -I/home/pi/Downloads/qt5/qt-everywhere-src-5.12.0/qtbase/include/QtGui -I../../../../../../include/QtGui -I/home/pi/Downloads/qt5/qt-everywhere-src-5.12.0/qtbase/include/QtEdidSupport -I/home/pi/Downloads/qt5/qt-everywhere-src-5.12.0/qtbase/include/QtEdidSupport/5.12.0 -I/home/pi/Downloads/qt5/qt-everywhere-src-5.12.0/qtbase/include/QtEdidSupport/5.12.0/QtEdidSupport -I../../../../../../include/QtEdidSupport -I/home/pi/Downloads/qt5/qt-everywhere-src-5.12.0/qtbase/include/QtCore/5.12.0 -I/home/pi/Downloads/qt5/qt-everywhere-src-5.12.0/qtbase/include/QtCore/5.12.0/QtCore -I../../../../../../include/QtCore/5.12.0 -I../../../../../../include/QtCore/5.12.0/QtCore -I/home/pi/Downloads/qt5/qt-everywhere-src-5.12.0/qtbase/include/QtDBus -I../../../../../../include/QtDBus -I/home/pi/Downloads/qt5/qt-everywhere-src-5.12.0/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 -I/home/pi/Downloads/qt5/qt-everywhere-src-5.12.0/qtbase/src/3rdparty/xcb/include -I/home/pi/Downloads/qt5/qt-everywhere-src-5.12.0/qtbase/src/3rdparty/xcb/sysinclude -I/home/pi/Downloads/qt5/qt-everywhere-src-5.12.0/qtbase/mkspecs/devices/linux-rasp-pi-g++ -o .obj/qxcbeglwindow.o /home/pi/Downloads/qt5/qt-everywhere-src-5.12.0/qtbase/src/plugins/platforms/xcb/gl_integrations/xcb_egl/qxcbeglwindow.cpp
    /home/pi/Downloads/qt5/qt-everywhere-src-5.12.0/qtbase/src/plugins/platforms/xcb/gl_integrations/xcb_egl/qxcbeglwindow.cpp: In member function ‘virtual void QXcbEglWindow::create()’:
    /home/pi/Downloads/qt5/qt-everywhere-src-5.12.0/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]
    e = eglCreateWindowSurface(m_glIntegration->eglDisplay(), m_config, m_window, 0);
    ^~~~~~~~
    In file included from /home/pi/Downloads/qt5/qt-everywhere-src-5.12.0/qtbase/include/QtEglSupport/5.12.0/QtEglSupport/private/../../../../../src/platformsupport/eglconvenience/qt_egl_p.h:65:0,
    from /home/pi/Downloads/qt5/qt-everywhere-src-5.12.0/qtbase/include/QtEglSupport/5.12.0/QtEglSupport/private/qt_egl_p.h:1,
    from /home/pi/Downloads/qt5/qt-everywhere-src-5.12.0/qtbase/src/plugins/platforms/xcb/gl_integrations/xcb_egl/qxcbeglinclude.h:49,
    from /home/pi/Downloads/qt5/qt-everywhere-src-5.12.0/qtbase/src/plugins/platforms/xcb/gl_integrations/xcb_egl/qxcbeglwindow.h:45,
    from /home/pi/Downloads/qt5/qt-everywhere-src-5.12.0/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:1945: recipe for target '.obj/qxcbeglwindow.o' failed
    make[7]: *** [.obj/qxcbeglwindow.o] Error 1
    make[7]: Leaving directory '/home/pi/Downloads/qt5/build/qtbase/src/plugins/platforms/xcb/gl_integrations/xcb_egl'
    Makefile:44: recipe for target 'sub-xcb_egl-make_first' failed
    make[6]: *** [sub-xcb_egl-make_first] Error 2
    make[6]: Leaving directory '/home/pi/Downloads/qt5/build/qtbase/src/plugins/platforms/xcb/gl_integrations'
    Makefile:148: 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/Downloads/qt5/build/qtbase/src/plugins/platforms/xcb'
    Makefile:100: recipe for target 'sub-xcb-make_first' failed
    make[4]: *** [sub-xcb-make_first] Error 2
    make[4]: Leaving directory '/home/pi/Downloads/qt5/build/qtbase/src/plugins/platforms'
    Makefile:102: recipe for target 'sub-platforms-make_first' failed
    make[3]: *** [sub-platforms-make_first] Error 2
    make[3]: Leaving directory '/home/pi/Downloads/qt5/build/qtbase/src/plugins'
    Makefile:774: recipe for target 'sub-plugins-make_first' failed
    make[2]: *** [sub-plugins-make_first] Error 2
    make[2]: Leaving directory '/home/pi/Downloads/qt5/build/qtbase/src'
    Makefile:48: recipe for target 'sub-src-make_first' failed
    make[1]: *** [sub-src-make_first] Error 2
    make[1]: Leaving directory '/home/pi/Downloads/qt5/build/qtbase'
    Makefile:81: recipe for target 'module-qtbase-make_first' failed
    make: *** [module-qtbase-make_first] Error 2
    pi@raspberrypi:~/Downloads/qt5/build $

    I've repeated the steps for 5.11.3, and 5.12.0 (the later, using both the New way and Old way of configuring the Qt build) with the same results. I'm using linux-rasp-pi2-g++ as the platform option.

    I've taken precaution to increase the swapsize to 1024 (more than the 200 recommended).

    However, I do not one issue. When I run configure, I do note one issue: the EGLFS Rasberry Pi is not recognized. In other words, I see this:
    QPA backends:
    DirectFB ............................... no
    EGLFS .................................. yes
    EGLFS details:
    ...
    EGLFS Rasberry Pi .................... no

    To be frank, my background is in the Windows environment, so I'm a bit of a fish out of water, and am open to some advice. I don't believe I need EGLFS as I'm quite happy to run my QT5 applications in the existing Debian Stretch windowing environment.

    What should be my next steps?


  • Moderators

    The tutorial you linked performs a cross-compilation for Raspberry Pi on a Raspberry Pi. That's just a waste of time. You should cross-compile from a host PC instead. A guide for that is here https://wiki.qt.io/RaspberryPi2EGLFS (hint: instead of working on OS image you can ssh directly into your PI).

    Cross-compiling on PC means that you save a lot of time (quad core desktop CPU will compile Qt easily in 30-90 minutes. On Raspberry Pi it would take you 1-12 hours depending on which modules you choose to compile), you won't need to worry about RAM and SD card side (because you will install only the final packages on the device), and avoid some errors (Qt configure is expecting you to cross-compile for a Pi, not do a native build).

    I don't believe I need EGLFS as I'm quite happy to run my QT5 applications in the existing Debian Stretch windowing environment.

    You do need EGLFS. Without it, Qt GUI will be rendered by your CPU instead of GPU. On a RPi, that means it will run super slow.



  • @sierdzio , many thanks for your advice. I'll follow the guide and report back later what happens. I'm surprised there haven't been more complaints about the www.tal.org link.


  • Qt Champions 2018

    @BrianInVancouver said in Failure to build QT5 5.10.1 (and 5.11.3, 5.12.) on Raspberry Pi 3:

    I'm surprised there haven't been more complaints about the www.tal.org link.

    As far as I can see this tutorial doesn't say that it does cross compilation.
    And it says that it is building on RaspberryPi: "Building Qt on the Raspberry Pi is quite straightforward and in short consist of the following steps"
    So no reason to complain about it.


  • Moderators

    @jsulm said in Failure to build QT5 5.10.1 (and 5.11.3, 5.12.) on Raspberry Pi 3:

    As far as I can see this tutorial doesn't say that it does cross compilation.

    -device linux-rasp-pi-g++ -device-option CROSS_COMPILE=/usr/bin/


  • Qt Champions 2018

    @sierdzio Oh, you're right, didn't notice that. Then there is reason to complain :-)


Log in to reply
 

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