Issues when making a native build of Qt 5.7 on a Raspberry Pi 3 with RaspBian Wheezy



  • I am trying to build Qt 5.7.0 on a raspberry pi 3 with Raspbian Wheezy but I am stuck on a linking issue after sorting out a few previous issues.

    CONTEXT
    The LINUX/Rasbian version infos are :

    cat /proc/version
    Linux version 4.4.13-v7+ (dc4@dc4-XPS13-9333) (gcc version 4.9.3 (crosstool-NG crosstool-ng-1.22.0-88-g8460611) ) #894 SMP Mon Jun 13 13:13:27 BST 2016

    lsb_release -a
    No LSB modules are available.
    Distributor ID: Debian
    Description: Debian GNU/Linux 7.11 (wheezy)
    Release: 7.11
    Codename: wheezy

    I installed the Qt sources in the directory /home/pi/Qt.5.7.0-src with
    tar zxvf ~/qt-everywhere-opensource-src-5.7.0.tar.gz

    I used the following command to configure the build :
    ./configure -static -opensource -confirm-license -nomake examples -no-openssl -no-opengl -device linux-rasp-pi-g++ -device-option CROSS_COMPILE=/usr/bin/ -make libs

    I have 2 other version on Qt. One (Qt4.8.7) was nativelly compiled on the RPi

    SOLVED ISSUES
    To solve a first compiling issue I had to install GCC and G++ 4.7 and set it as the default GCC compiler :
    $ sudo apt-get install gcc-4.7 g++-4.7
    $ sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.6 60 --slave /usr/bin/g++ g++ /usr/bin/g++-4.6
    $ sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.7 40 --slave /usr/bin/g++ g++ /usr/bin/g++-4.7
    Then run the the command and select gcc-4.7.
    $ sudo update-alternatives --config gcc

    To solve a second issue :
    In file included from qxcbclipboard.cpp:43:0:
    qxcbscreen.h:49:26: fatal error: xcb/xinerama.h: Aucun fichier ou dossier de ce type
    compilation terminated.
    Makefile.xcb_qpa_lib:2400: recipe for target '.obj/qxcbclipboard.o' failed
    make[6]: *** [.obj/qxcbclipboard.o] Error 1

    I had to install Xinerama :
    sudo apt-get install libxcb-xinerama0 libxcb-xinerama0-dev
    ./sysroot-relativelinks.py sysroot
    ⇒ fixed the probem

    I had a third compiling issue which I solved by removing the qtxmlpatterns and qtmacextras packages from the build configuration. I had to run th configuration again :
    ./configure -static -opensource -confirm-license -nomake examples -no-openssl -no-opengl -device linux-rasp-pi-g++ -device-option CROSS_COMPILE=/usr/bin/ -make libs
    -skip qtxmlpatterns -skip qtmacextras

    CURRENT ISSUE
    I am now stuck with the following issue when making Qt. Running « make –j3 » produced the following messages :

    cd qtbase/ && ( test -e Makefile || /home/pi/Qt5.7.0-src/qtbase/bin/qmake /home/pi/Qt5.7.0-src/qtbase/qtbase.pro -qtconf /home/pi/Qt5.7.0-src/qtbase/bin/qt.conf -o Makefile ) && make -f Makefile 
    make[1]: Entering directory '/home/pi/Qt5.7.0-src/qtbase'
    cd src/ && ( test -e Makefile || /home/pi/Qt5.7.0-src/qtbase/bin/qmake /home/pi/Qt5.7.0-src/qtbase/src/src.pro -qtconf /home/pi/Qt5.7.0-src/qtbase/bin/qt.conf -o Makefile ) && make -f Makefile 
    cd qmake/ && ( test -e Makefile.qmake-aux || /home/pi/Qt5.7.0-src/qtbase/bin/qmake /home/pi/Qt5.7.0-src/qtbase/qmake/qmake-aux.pro -qtconf /home/pi/Qt5.7.0-src/qtbase/bin/qt.conf -o Makefile.qmake-aux ) && make -f Makefile.qmake-aux 
    make[2]: Entering directory '/home/pi/Qt5.7.0-src/qtbase/qmake'
    make[2]: Nothing to be done for 'first'.
    make[2]: Leaving directory '/home/pi/Qt5.7.0-src/qtbase/qmake'
    make[2]: Entering directory '/home/pi/Qt5.7.0-src/qtbase/src'
    cd corelib/ && ( test -e Makefile.qtzlib || /home/pi/Qt5.7.0-src/qtbase/bin/qmake /home/pi/Qt5.7.0-src/qtbase/src/corelib/qtzlib.pro -qtconf /home/pi/Qt5.7.0-src/qtbase/bin/qt.conf -o Makefile.qtzlib ) && make -f Makefile.qtzlib 
    cd tools/bootstrap/ && ( test -e Makefile || /home/pi/Qt5.7.0-src/qtbase/bin/qmake /home/pi/Qt5.7.0-src/qtbase/src/tools/bootstrap/bootstrap.pro -qtconf /home/pi/Qt5.7.0-src/qtbase/bin/qt.conf -o Makefile ) && make -f Makefile 
    cd 3rdparty/pcre/ && ( test -e Makefile || /home/pi/Qt5.7.0-src/qtbase/bin/qmake /home/pi/Qt5.7.0-src/qtbase/src/3rdparty/pcre/pcre.pro -qtconf /home/pi/Qt5.7.0-src/qtbase/bin/qt.conf -o Makefile ) && make -f Makefile 
    cd 3rdparty/freetype/ && ( test -e Makefile || /home/pi/Qt5.7.0-src/qtbase/bin/qmake /home/pi/Qt5.7.0-src/qtbase/src/3rdparty/freetype/freetype.pro -qtconf /home/pi/Qt5.7.0-src/qtbase/bin/qt.conf -o Makefile ) && make -f Makefile 
    make[3]: Entering directory '/home/pi/Qt5.7.0-src/qtbase/src/corelib'
    make[3]: Nothing to be done for 'first'.
    make[3]: Leaving directory '/home/pi/Qt5.7.0-src/qtbase/src/corelib'
    make[3]: Entering directory '/home/pi/Qt5.7.0-src/qtbase/src/3rdparty/pcre'
    make[3]: Nothing to be done for 'first'.
    

    … more « browsing » messages … and then

    /home/pi/Qt5.7.0-src/qtbase/bin/qmake 
    -qtconf /home/pi/Qt5.7.0-src/qtbase/bin/qt.conf 
    -o Makefile qml.pro
    
    /usr/bin/g++ -Wl,-rpath-link,/opt/vc/lib 
    -Wl,-rpath-link,/usr/lib/arm-linux-gnueabihf 
    -Wl,-rpath-link,/lib/arm-linux-gnueabihf 
    -mfloat-abi=hard 
    -Wl,--gc-sections 
    -Wl,-O1 
    -Wl,--enable-new-dtags 
    -o ../../bin/qml .obj/main.o .obj/qml_qml_plugin_import.o .obj/qml_plugin_import.o .obj/qrc_qml.o .obj/moc_conf.o   
    -L/home/pi/Qt5.7.0-src/qtdeclarative/lib 
    -L/home/pi/Qt5.7.0-src/qtbase/lib 
    -lQt5Widgets
    -L/home/pi/Qt5.7.0-src/qtdeclarative/plugins/qmltooling 
    -lqmldbg_debugger
    -lqmldbg_local 
    -lqmldbg_native 
    -lqmldbg_profiler 
    -lqmldbg_server 
    -lQt5PacketProtocol 
    -lqmldbg_tcp 
    -lQt5Qml 
    -L/home/pi/Qt5.7.0-src/qtbase/plugins/bearer 
    -lqconnmanbearer 
    -lqgenericbearer 
    -lqnmbearer 
    -lQt5Network 
    -lQt5DBus 
    -L/home/pi/Qt5.7.0-src/qtimageformats/plugins/imageformats -lqdds -lqicns -lqtga -lqtiff -lqwbmp -lqwebp 
    -L/home/pi/Qt5.7.0-src/qtbase/plugins/imageformats -lqico -lQt5Gui -ljpeg -lpng -lqtharfbuzzng -lQt5Core -lz -licui18n -licuuc -licudata -lqtpcre -lm -ldl -lrt -lpthread
    

    This issue is that after this command, tons of lot of messages saying ("référence indéfinie vers" translate to "undefined reference to") :

    /home/pi/Qt5.7.0-src/qtbase/lib/libQt5Widgets.a(qapplication.o): dans la fonction « QApplication::aboutQt() »:
    qapplication.cpp:(.text+0x1720): référence indéfinie vers « QMessageBox::aboutQt(QWidget*, QString const&) »
    
    /home/pi/Qt5.7.0-src/qtbase/lib/libQt5Widgets.a(qwidget.o): dans la fonction « QWidget::event(QEvent*) »:
    qwidget.cpp:(.text+0x13a30): référence indéfinie vers « QMenu::exec(QList<QAction*>, QPoint const&, QAction*, QWidget*) »
    /home/pi/Qt5.7.0-src/qtbase/lib/libQt5Widgets.a(qwindowcontainer.o): dans la fonction « QWindowContainer::parentWasChanged(QWidget*) »:
    qwindowcontainer.cpp:(.text+0x868): référence indéfinie vers « QMdiSubWindow::staticMetaObject »
    /home/pi/Qt5.7.0-src/qtbase/lib/libQt5Widgets.a(qwindowcontainer.o): dans la fonction « QWindowContainer::event(QEvent*) »:
    qwindowcontainer.cpp:(.text+0xf54): référence indéfinie vers « QMdiSubWindow::staticMetaObject »
    /home/pi/Qt5.7.0-src/qtbase/lib/libQt5Widgets.a(qstylesheetstyle.o): dans la fonction « QStyleSheetStyle::nativeFrameWidth(QWidget const*) »:
    qstylesheetstyle.cpp:(.text+0x2808): référence indéfinie vers « QMenu::staticMetaObject »
    /home/pi/Qt5.7.0-src/qtbase/lib/libQt5Widgets.a(qstylesheetstyle.o): dans la fonction « QStyleSheetStyle::polish(QWidget*) »:
    qstylesheetstyle.cpp:(.text+0x18024): référence indéfinie vers « QMdiSubWindow::staticMetaObject »
    /home/pi/Qt5.7.0-src/qtbase/lib/libQt5Widgets.a(qabstractspinbox.o): dans la fonction « QAbstractSpinBox::contextMenuEvent(QContextMenuEvent*) »:
    qabstractspinbox.cpp:(.text+0x215c): référence indéfinie vers « QMenu::addSeparator() »
    qabstractspinbox.cpp:(.text+0x21b4): référence indéfinie vers « QMenu::addAction(QString const&) »
    qabstractspinbox.cpp:(.text+0x2248): référence indéfinie vers « QMenu::addAction(QString const&) »
    qabstractspinbox.cpp:(.text+0x22b0): référence indéfinie vers « QMenu::addSeparator() »
    qabstractspinbox.cpp:(.text+0x22f4): référence indéfinie vers « QMenu::exec(QPoint const&, QAction*) »
    /home/pi/Qt5.7.0-src/qtbase/lib/libQt5Widgets.a(qcombobox.o): dans la fonction « QComboBoxPrivateContainer::topMargin() const »:
    qcombobox.cpp:(.text+0x13b4): référence indéfinie vers « QTableView::showGrid() const »
    qcombobox.cpp:(.text+0x13cc): référence indéfinie vers « QTableView::staticMetaObject »
    /home/pi/Qt5.7.0-src/qtbase/lib/libQt5Widgets.a(qcombobox.o): dans la fonction « QComboBoxPrivateContainer::spacing() const »:
    qcombobox.cpp:(.text+0x141c): référence indéfinie vers « QTableView::showGrid() const »
    qcombobox.cpp:(.text+0x1434): référence indéfinie vers « QTableView::staticMetaObject »
    /home/pi/Qt5.7.0-src/qtbase/lib/libQt5Widgets.a(qcombobox.o): dans la fonction « QComboBoxPrivate::updateViewContainerPaletteAndOpacity() »:
    qcombobox.cpp:(.text+0x3208): référence indéfinie vers « QMenu::QMenu(QWidget*) »
    qcombobox.cpp:(.text+0x3244): référence indéfinie vers « QMenu::~QMenu() »
    /home/pi/Qt5.7.0-src/qtbase/lib/libQt5Widgets.a(qlabel.o): dans la fonction « QLabel::contextMenuEvent(QContextMenuEvent*) »:
    qlabel.cpp:(.text+0x4028): référence indéfinie vers « QMenu::popup(QPoint const&, QAction*) »
    /home/pi/Qt5.7.0-src/qtbase/lib/libQt5Widgets.a(qlineedit.o): dans la fonction « QLineEdit::createStandardContextMenu() »:
    qlineedit.cpp:(.text+0x539c): référence indéfinie vers « QMenu::QMenu(QWidget*) »
    qlineedit.cpp:(.text+0x550c): référence indéfinie vers « QMenu::addAction(QString const&) »
    qlineedit.cpp:(.text+0x5740): référence indéfinie vers « QMenu::isEmpty() const »
    qlineedit.cpp:(.text+0x57f8): référence indéfinie vers « QMenu::addAction(QString const&) »
    qlineedit.cpp:(.text+0x5cc4): référence indéfinie vers « QMenu::addAction(QString const&) »
    qlineedit.cpp:(.text+0x5f04): référence indéfinie vers « QMenu::addAction(QString const&) »
    qlineedit.cpp:(.text+0x6028): référence indéfinie vers « QMenu::isEmpty() const »
    qlineedit.cpp:(.text+0x6038): référence indéfinie vers « QMenu::addSeparator() »
    qlineedit.cpp:(.text+0x6054): référence indéfinie vers « QMenu::addSeparator() »
    qlineedit.cpp:(.text+0x6078): référence indéfinie vers « QMenu::addMenu(QMenu*) »
    qlineedit.cpp:(.text+0x62cc): référence indéfinie vers « QMenu::addAction(QString const&) »
    qlineedit.cpp:(.text+0x6568): référence indéfinie vers « QMenu::addAction(QString const&) »
    qlineedit.cpp:(.text+0x6758): référence indéfinie vers « QMenu::addSeparator() »
    qlineedit.cpp:(.text+0x6820): référence indéfinie vers « QMenu::addAction(QString const&) »
    /home/pi/Qt5.7.0-src/qtbase/lib/libQt5Widgets.a(qlineedit.o): dans la fonction « QLineEdit::contextMenuEvent(QContextMenuEvent*) »:
    qlineedit.cpp:(.text+0x70c4): référence indéfinie vers « QMenu::popup(QPoint const&, QAction*) »
    /home/pi/Qt5.7.0-src/qtbase/lib/libQt5Widgets.a(qmainwindow.o): dans la fonction « QMainWindow::contextMenuEvent(QContextMenuEvent*) »:
    qmainwindow.cpp:(.text+0x27c): référence indéfinie vers « QMenu::isEmpty() const »
    qmainwindow.cpp:(.text+0x340): référence indéfinie vers « QMenu::popup(QPoint const&, QAction*) »
    /home/pi/Qt5.7.0-src/qtbase/lib/libQt5Widgets.a(qmainwindow.o): dans la fonction « QMainWindow::createPopupMenu() »:
    qmainwindow.cpp:(.text+0x1610): référence indéfinie vers « QMenu::QMenu(QWidget*) »
    qmainwindow.cpp:(.text+0x1668): référence indéfinie vers « QMenu::addSeparator() »
    qmainwindow.cpp:(.text+0x18bc): référence indéfinie vers « QMenu::QMenu(QWidget*) »
    /home/pi/Qt5.7.0-src/qtbase/lib/libQt5Widgets.a(qmenubar.o): dans la fonction « QMenuBar::addMenu(QString const&) »:
    qmenubar.cpp:(.text+0xb38): référence indéfinie vers « QMenu::QMenu(QString const&, QWidget*) »
    qmenubar.cpp:(.text+0xb40): référence indéfinie vers « QMenu::menuAction() const »
    /home/pi/Qt
    ... and so on …
    

    are produced.

    NEED HELP
    Anybody has an idea why these message are produced ? Could it be an interaction with the other Qt version installed ? I tried to change the bash PATH from /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games »
    to
    /home/pi/Qt5.7.0-src/qtbase/lib/:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games
    but that did now solve the problem.

    P.S. the printenv command list the following environnement variables :

    TERM=xterm-256color
    SHELL=/bin/bash
    SSH_CLIENT=192.168.1.20 58297 22
    SSH_TTY=/dev/pts/0
    USER=pi
    LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lz=01;31:*.xz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.axa=00;36:*.oga=00;36:*.spx=00;36:*.xspf=00;36:
    MAIL=/var/mail/pi
    PATH=/home/pi/Qt5.7.0-src/qtbase/lib/:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games
    PWD=/home/pi
    LANG=fr_FR.UTF-8
    SHLVL=1
    HOME=/home/pi
    LOGNAME=pi
    SSH_CONNECTION=192.168.1.20 58297 192.168.1.156 22
    DISPLAY=localhost:10.0
    _=/usr/bin/printenv
    


  • The problem I had actually "disappeared" after doing a "make clean" and re-doing a "make install".

    Next issue was when I configured Qt Creator (2.something) with the new Qt. It said "The default mkspec symlink is broken"
    I solved it by making a simlink in the install dir (/usr/local/Qt-5.7.0) from linux-g++ to default.

    After that my project compiled fine within Qt Creator against the new Qt version. The problem is that the program won't start It says :
    This application failed to start because it could not find or load the Qt platform plugin "eglfs"

    Does someone no know what's wrong ?



  • @PALYGAP said:

    After that my project compiled fine within Qt Creator against the new Qt version. The problem is that the program won't start It says :
    This application failed to start because it could not find or load the Qt platform plugin "eglfs"

    You configured Qt with the option -no-opengl so the eglfs backend is not available. You can try to start the application using the argument -platform xcb to force the X backend (if x window system is available).
    See also http://doc.qt.io/qt-5/embedded-linux.html for the different possible backends.



  • Thanks for the info micland
    I tried running my application with the -platform scb typing : *MyApp -platform scb *
    but I still got the same error.

    I am now trying to rebuild Qt with the opengl included --> removed -no-opengl from the configuration
    but when running make I get some errors about EGL during the compilation of the source qeglfsbrcmintegration.cpp :

    make[6]: Entering directory '/home/pi/Qt5.7.0-src/qtbase/src/plugins/platforms/eglfs'
    /usr/bin/g++ -c -pipe -marm -mfpu=vfp -mtune=arm1176jzf-s -march=armv6zk -mabi=aapcs-linux -mfloat-abi=hard -O2 -fPIC -std=c++11 -fvisibility=hidden -fvisibility-inlines-hidden -fno-exceptions -Wall -W -Wvla -D_REENTRANT -fPIC -DQT_NO_MTDEV -DQT_NO_LIBINPUT -DQT_NO_XKB -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_STATICPLUGIN -DQT_PLUGIN -DQT_EGLFS_DEVICE_LIB_LIB -DQT_PLATFORMSUPPORT_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -I../../../../include -I../../../../include/QtPlatformSupport -I../../../../include/QtPlatformSupport/5.7.0 -I../../../../include/QtPlatformSupport/5.7.0/QtPlatformSupport -I../../../../include/QtGui/5.7.0 -I../../../../include/QtGui/5.7.0/QtGui -I../../../../include/QtGui -I../../../../include/QtCore/5.7.0 -I../../../../include/QtCore/5.7.0/QtCore -I../../../../include/QtCore -I.moc -I../../../../mkspecs/devices/linux-rasp-pi-g++ -o .obj/qeglfsmain.o qeglfsmain.cpp
    rm -f ../../../../plugins/platforms/libqeglfs.a
    /usr/bin/ar cqs ../../../../plugins/platforms/libqeglfs.a .obj/qeglfsmain.o
    make[6]: Leaving directory '/home/pi/Qt5.7.0-src/qtbase/src/plugins/platforms/eglfs'
    cd deviceintegration/ && ( test -e Makefile || /home/pi/Qt5.7.0-src/qtbase/bin/qmake /home/pi/Qt5.7.0-src/qtbase/src/plugins/platforms/eglfs/deviceintegration/deviceintegration.pro -qtconf /home/pi/Qt5.7.0-src/qtbase/bin/qt.conf -o Makefile ) && make -f Makefile 
    make[6]: Entering directory '/home/pi/Qt5.7.0-src/qtbase/src/plugins/platforms/eglfs/deviceintegration'
    cd eglfs_brcm/ && ( test -e Makefile || /home/pi/Qt5.7.0-src/qtbase/bin/qmake /home/pi/Qt5.7.0-src/qtbase/src/plugins/platforms/eglfs/deviceintegration/eglfs_brcm/eglfs_brcm.pro -qtconf /home/pi/Qt5.7.0-src/qtbase/bin/qt.conf -o Makefile ) && make -f Makefile 
    make[7]: Entering directory '/home/pi/Qt5.7.0-src/qtbase/src/plugins/platforms/eglfs/deviceintegration/eglfs_brcm'
    /home/pi/Qt5.7.0-src/qtbase/bin/moc -DQT_NO_MTDEV -DQT_NO_LIBINPUT -DQT_NO_XKB -DMESA_EGL_NO_X11_HEADERS -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_STATICPLUGIN -DQT_PLUGIN -DQT_EGLFS_DEVICE_LIB_LIB -DQT_PLATFORMSUPPORT_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I/home/pi/Qt5.7.0-src/qtbase/mkspecs/devices/linux-rasp-pi-g++ -I/home/pi/Qt5.7.0-src/qtbase/src/plugins/platforms/eglfs/deviceintegration/eglfs_brcm -I/home/pi/Qt5.7.0-src/qtbase/src/plugins/platforms/eglfs -I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux -I/home/pi/Qt5.7.0-src/qtbase/include -I/home/pi/Qt5.7.0-src/qtbase/include/QtPlatformSupport -I/home/pi/Qt5.7.0-src/qtbase/include/QtPlatformSupport/5.7.0 -I/home/pi/Qt5.7.0-src/qtbase/include/QtPlatformSupport/5.7.0/QtPlatformSupport -I/home/pi/Qt5.7.0-src/qtbase/include/QtGui/5.7.0 -I/home/pi/Qt5.7.0-src/qtbase/include/QtGui/5.7.0/QtGui -I/home/pi/Qt5.7.0-src/qtbase/include/QtGui -I/home/pi/Qt5.7.0-src/qtbase/include/QtCore/5.7.0 -I/home/pi/Qt5.7.0-src/qtbase/include/QtCore/5.7.0/QtCore -I/home/pi/Qt5.7.0-src/qtbase/include/QtCore -I/usr/include/c++/4.7 -I/usr/include/c++/4.7/arm-linux-gnueabihf -I/usr/include/c++/4.7/backward -I/usr/lib/gcc/arm-linux-gnueabihf/4.7/include -I/usr/local/include -I/usr/lib/gcc/arm-linux-gnueabihf/4.7/include-fixed -I/usr/include/arm-linux-gnueabihf -I/usr/include qeglfsbrcmmain.cpp -o .moc/qeglfsbrcmmain.moc
    /usr/bin/g++ -c -pipe -marm -mfpu=vfp -mtune=arm1176jzf-s -march=armv6zk -mabi=aapcs-linux -mfloat-abi=hard -O2 -fPIC -std=c++11 -fvisibility=hidden -fvisibility-inlines-hidden -fno-exceptions -Wall -W -Wvla -D_REENTRANT -fPIC -DQT_NO_MTDEV -DQT_NO_LIBINPUT -DQT_NO_XKB -DMESA_EGL_NO_X11_HEADERS -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_STATICPLUGIN -DQT_PLUGIN -DQT_EGLFS_DEVICE_LIB_LIB -DQT_PLATFORMSUPPORT_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -I../../../eglfs -I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux -I../../../../../../include -I../../../../../../include/QtPlatformSupport -I../../../../../../include/QtPlatformSupport/5.7.0 -I../../../../../../include/QtPlatformSupport/5.7.0/QtPlatformSupport -I../../../../../../include/QtGui/5.7.0 -I../../../../../../include/QtGui/5.7.0/QtGui -I../../../../../../include/QtGui -I../../../../../../include/QtCore/5.7.0 -I../../../../../../include/QtCore/5.7.0/QtCore -I../../../../../../include/QtCore -I.moc -I../../../../../../mkspecs/devices/linux-rasp-pi-g++ -o .obj/qeglfsbrcmmain.o qeglfsbrcmmain.cpp
    /usr/bin/g++ -c -pipe -marm -mfpu=vfp -mtune=arm1176jzf-s -march=armv6zk -mabi=aapcs-linux -mfloat-abi=hard -O2 -fPIC -std=c++11 -fvisibility=hidden -fvisibility-inlines-hidden -fno-exceptions -Wall -W -Wvla -D_REENTRANT -fPIC -DQT_NO_MTDEV -DQT_NO_LIBINPUT -DQT_NO_XKB -DMESA_EGL_NO_X11_HEADERS -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_STATICPLUGIN -DQT_PLUGIN -DQT_EGLFS_DEVICE_LIB_LIB -DQT_PLATFORMSUPPORT_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -I../../../eglfs -I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux -I../../../../../../include -I../../../../../../include/QtPlatformSupport -I../../../../../../include/QtPlatformSupport/5.7.0 -I../../../../../../include/QtPlatformSupport/5.7.0/QtPlatformSupport -I../../../../../../include/QtGui/5.7.0 -I../../../../../../include/QtGui/5.7.0/QtGui -I../../../../../../include/QtGui -I../../../../../../include/QtCore/5.7.0 -I../../../../../../include/QtCore/5.7.0/QtCore -I../../../../../../include/QtCore -I.moc -I../../../../../../mkspecs/devices/linux-rasp-pi-g++ -o .obj/qeglfsbrcmintegration.o qeglfsbrcmintegration.cpp
    qeglfsbrcmintegration.cpp: In function ‘EGLNativeWindowType createDispmanxLayer(const QPoint&, const QSize&, int, DISPMANX_FLAGS_ALPHA_T)’:
    qeglfsbrcmintegration.cpp:74:5: error: ‘EGL_DISPMANX_WINDOW_T’ was not declared in this scope
    qeglfsbrcmintegration.cpp:74:28: error: ‘eglWindow’ was not declared in this scope
    qeglfsbrcmintegration.cpp:74:44: error: expected type-specifier before ‘EGL_DISPMANX_WINDOW_T’
    qeglfsbrcmintegration.cpp:74:44: error: expected ‘;’ before ‘EGL_DISPMANX_WINDOW_T’
    qeglfsbrcmintegration.cpp: In function ‘void destroyDispmanxLayer(EGLNativeWindowType)’:
    qeglfsbrcmintegration.cpp:84:5: error: ‘EGL_DISPMANX_WINDOW_T’ was not declared in this scope
    qeglfsbrcmintegration.cpp:84:28: error: ‘eglWindow’ was not declared in this scope
    qeglfsbrcmintegration.cpp:84:52: error: expected type-specifier before ‘EGL_DISPMANX_WINDOW_T’
    qeglfsbrcmintegration.cpp:84:52: error: expected ‘>’ before ‘EGL_DISPMANX_WINDOW_T’
    qeglfsbrcmintegration.cpp:84:52: error: expected ‘(’ before ‘EGL_DISPMANX_WINDOW_T’
    qeglfsbrcmintegration.cpp:84:75: error: expected primary-expression before ‘>’ token
    qeglfsbrcmintegration.cpp:84:84: error: expected ‘)’ before ‘;’ token
    qeglfsbrcmintegration.cpp:88:12: error: type ‘<type error>’ argument given to ‘delete’, expected pointer
    qeglfsbrcmintegration.cpp: In function ‘EGLNativeWindowType createDispmanxLayer(const QPoint&, const QSize&, int, DISPMANX_FLAGS_ALPHA_T)’:
    qeglfsbrcmintegration.cpp:80:1: warning: control reaches end of non-void function [-Wreturn-type]
    Makefile:1903: recipe for target '.obj/qeglfsbrcmintegration.o' failed
    make[7]: *** [.obj/qeglfsbrcmintegration.o] Error 1
    make[7]: Leaving directory '/home/pi/Qt5.7.0-src/qtbase/src/plugins/platforms/eglfs/deviceintegration/eglfs_brcm'
    Makefile:42: recipe for target 'sub-eglfs_brcm-make_first' failed
    make[6]: *** [sub-eglfs_brcm-make_first] Error 2
    make[6]: Leaving directory '/home/pi/Qt5.7.0-src/qtbase/src/plugins/platforms/eglfs/deviceintegration'
    Makefile:102: recipe for target 'sub-deviceintegration-make_first-ordered' failed
    make[5]: *** [sub-deviceintegration-make_first-ordered] Error 2
    make[5]: Leaving directory '/home/pi/Qt5.7.0-src/qtbase/src/plugins/platforms/eglfs'
    Makefile:122: recipe for target 'sub-eglfs-make_first' failed
    make[4]: *** [sub-eglfs-make_first] Error 2
    make[4]: Leaving directory '/home/pi/Qt5.7.0-src/qtbase/src/plugins/platforms'
    Makefile:99: recipe for target 'sub-platforms-make_first' failed
    make[3]: *** [sub-platforms-make_first] Error 2
    make[3]: Leaving directory '/home/pi/Qt5.7.0-src/qtbase/src/plugins'
    Makefile:748: recipe for target 'sub-plugins-make_first' failed
    make[2]: *** [sub-plugins-make_first] Error 2
    make[2]: Leaving directory '/home/pi/Qt5.7.0-src/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/Qt5.7.0-src/qtbase'
    Makefile:77: recipe for target 'module-qtbase-make_first' failed
    make: *** [module-qtbase-make_first] Error 2
    


  • @PALYGAP said:

    Thanks for the info micland
    I tried running my application with the -platform scb typing : *MyApp -platform scb *
    but I still got the same error.

    xcb! not scb
    MyApp -platform xcb

    There are some pitfalls compiling Qt with EGLFS on a RasPi. Take a look at this wiki page:
    http://wiki.qt.io/RaspberryPi2EGLFS



  • Tried again with the right call (MyApp -platform xcb) and got a different error :

    top-Qt___Qt-5_7_0__Release $ ./btscanner -platform xcb
    This application failed to start because it could not find or load the Qt platform plugin "xcb"
    in "".
    
    Reinstalling the application may fix this problem.
    

    Apparently the xcb module was not installed on my Raspbian system, so I installed it :

    sudo apt-get install xcb
    

    Trying again to run my program the result was still the same message (see above).

    I checked the file in the /usr/local/Qt-5.7.0/plugins/platforms and the libqxcb.a is there :

    drwxr-sr-x  2 root staff  4096 juil.  6 06:57 .
    drwxr-sr-x 18 root staff  4096 juil.  6 06:59 ..
    -rw-r--r--  1 root staff 45060 juil.  5 20:41 libqlinuxfb.a
    -rw-r--r--  1 root staff  1152 juil.  6 06:57 libqlinuxfb.prl
    -rw-r--r--  1 root staff 29736 juil.  5 20:35 libqminimal.a
    -rw-r--r--  1 root staff  1152 juil.  6 06:57 libqminimal.prl
    -rw-r--r--  1 root staff 58798 juil.  5 20:36 libqoffscreen.a
    -rw-r--r--  1 root staff  1104 juil.  6 06:57 libqoffscreen.prl
    -rw-r--r--  1 root staff  7514 juil.  5 20:42 libqxcb.a
    -rw-r--r--  1 root staff  1268 juil.  6 06:57 libqxcb.prl
    

    Tried to update the PATH with the platforms lib PATH : export PATH=/usr/local/Qt-5.7.0/plugins/platforms:$PATH
    but that did not solve the problem.

    Thanks micland for the link. I'll have a look at it tomorrow.


Log in to reply
 

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