Problem Build Qt 5.12.0 on Raspberry PI 3
-
#-------------------------------------- # Install general dependencies #-------------------------------------- apt-get install \ build-essential \ libbluetooth-dev \ libdbus-1-dev \ libfontconfig1-dev \ libfreetype6-dev \ libgl1-mesa-dev \ libglib2.0-dev \ libicu-dev \ libinput-dev \ libjpeg-dev \ libpng-dev \ libsqlite3-dev \ libssl-dev \ libxkbcommon-dev \ nasm \ xcb \ xorg #-------------------------------------- # Install database dependencies #-------------------------------------- apt-get install \ libpq-dev \ libmariadbclient-dev \ libsqlite3-dev #-------------------------------------- # Install RaspberryPI dependencies #-------------------------------------- apt-get install \ libraspberrypi-dev #-------------------------------------- # Download Source Code #-------------------------------------- cd /usr/local/src wget http://download.qt.io/official_releases/qt/5.12/5.12.0/single/qt-everywhere-src-5.12.0.tar.xz tar xvfJ qt-everywhere-src-5.12.0.tar.xz cd qt-everywhere-src-5.12.0 #-------------------------------------- # Configure Options to MakeFile #-------------------------------------- ./configure \ -opensource -confirm-license \ -release \ -force-pkg-config \ -no-compile-examples \ -no-gbm \ -no-kms \ -no-pch \ -no-xkb \ -no-use-gold-linker \ -nomake examples \ -nomake tests \ -nomake tools \ -opengl desktop \ -qt-libpng \ -qt-pcre \ -qt-zlib \ -system-libpng \ -reduce-exports \ -skip qt3d \ -skip qtactiveqt \ -skip qtandroidextras \ -skip qtcanvas3d \ -skip qtconnectivity \ -skip qtdatavis3d \ -skip qtdeclarative \ -skip qtdoc \ -skip qtdocgallery \ -skip qtfeedback \ -skip qtgamepad \ -skip qtgraphicaleffects \ -skip qtimageformats \ -skip qtlocation \ -skip qtmacextras \ -skip qtmultimedia \ -skip qtnetworkauth \ -skip qtpim \ -skip qtpurchasing \ -skip qtqa \ -skip qtquickcontrols \ -skip qtquickcontrols2 \ -skip qtremoteobjects \ -skip qtrepotools \ -skip qtscript \ -skip qtscxml \ -skip qtsensors \ -skip qtserialbus \ -skip qtspeech \ -skip qtsvg \ -skip qttranslations \ -skip qtvirtualkeyboard \ -skip qtwayland \ -skip qtwebchannel \ -skip qtwebengine \ -skip qtwebglplugin \ -skip qtwebsockets \ -skip qtwebview \ -skip qtwinextras \ -skip qtx11extras \ -skip qtxmlpatterns #-------------------------------------- # Build & Install #-------------------------------------- make -j4 make install #-------------------------------------- # Error when compiling packges #-------------------------------------- ... make[5]: Nothing to be done for 'first'. make[5]: Leaving directory '/usr/local/src/qt-everywhere-src-5.12.0/qtbase/src/plugins/platforms/offscreen' cd xcb/ && ( test -e Makefile || /usr/local/src/qt-everywhere-src-5.12.0/qtbase/bin/qmake -o Makefile /usr/local/src/qt-everywhere-src-5.12.0/qtbase/src/plugins/platforms/xcb/xcb.pro ) && make -f Makefile make[5]: Entering directory '/usr/local/src/qt-everywhere-src-5.12.0/qtbase/src/plugins/platforms/xcb' ( test -e Makefile.xcb_qpa_lib || /usr/local/src/qt-everywhere-src-5.12.0/qtbase/bin/qmake -o Makefile.xcb_qpa_lib /usr/local/src/qt-everywhere-src-5.12.0/qtbase/src/plugins/platforms/xcb/xcb_qpa_lib.pro ) && make -f Makefile.xcb_qpa_lib make[6]: Entering directory '/usr/local/src/qt-everywhere-src-5.12.0/qtbase/src/plugins/platforms/xcb' rm -f libQt5XcbQpa.so.5.12.0 libQt5XcbQpa.so libQt5XcbQpa.so.5 libQt5XcbQpa.so.5.12 g++ -Wl,--no-undefined -Wl,--version-script,QtXcbQpa.version -Wl,-O1 -Wl,--enable-new-dtags -Wl,-z,origin -Wl,-rpath,\$ORIGIN -shared -Wl,-soname,libQt5XcbQpa.so.5 -o libQt5XcbQpa.so.5.12.0 .obj/qxcbclipboard.o .obj/qxcbconnection.o .obj/qxcbintegration.o .obj/qxcbkeyboard.o .obj/qxcbmime.o .obj/qxcbscreen.o .obj/qxcbwindow.o .obj/qxcbbackingstore.o .obj/qxcbwmsupport.o .obj/qxcbnativeinterface.o .obj/qxcbcursor.o .obj/qxcbimage.o .obj/qxcbxsettings.o .obj/qxcbsystemtraytracker.o .obj/qxcbeventqueue.o .obj/qxcbeventdispatcher.o .obj/qxcbconnection_basic.o .obj/qxcbconnection_screens.o .obj/qxcbatom.o .obj/qxcbdrag.o .obj/qxcbglintegrationfactory.o .obj/qxcbglintegration.o .obj/qxcbnativeinterfacehandler.o .obj/qtessellator.o .obj/qpixmap_x11.o .obj/qpaintengine_x11.o .obj/qcolormap_x11.o .obj/qbackingstore_x11.o .obj/qxcbnativepainting.o .obj/moc_qxcbconnection.o .obj/moc_qxcbmime.o .obj/moc_qxcbnativeinterface.o .obj/moc_qxcbsystemtraytracker.o .obj/moc_qxcbeventqueue.o .obj/moc_qxcbeventdispatcher.o .obj/moc_qxcbconnection_basic.o .obj/moc_qxcbglintegrationplugin.o -L/usr/local/src/qt-everywhere-src-5.12.0/qtbase/lib -lQt5ServiceSupport -lQt5ThemeSupport -lQt5FontDatabaseSupport -lGL -lfontconfig -lfreetype -lQt5Gui -lQt5EdidSupport -lQt5DBus -lQt5Core -lpthread -lX11-xcb -lX11 -lXrender -lxcb-render-util -lxcb-render -lxcb-sync -lxcb-xfixes -lxcb-xinerama -lxcb-randr -lxcb-image -lxcb-shm -lxcb-keysyms -lxcb-icccm -lxcb -lxcb-shape -lxkbcommon-x11 -lxkbcommon -ldl -lGL -lgthread-2.0 -lglib-2.0 -lfreetype .obj/qxcbconnection.o: In function `QXcbConnection::QXcbConnection(QXcbNativeInterface*, bool, unsigned int, char const*)': qxcbconnection.cpp:(.text+0x1be4): undefined reference to `QXcbKeyboard::QXcbKeyboard(QXcbConnection*)' .obj/qxcbconnection.o: In function `QXcbConnection::queryKeyboardModifiers() const': qxcbconnection.cpp:(.text+0x1f30): undefined reference to `QXcbKeyboard::translateModifiers(int) const' .obj/qxcbconnection.o: In function `QXcbConnection::handleXcbEvent(xcb_generic_event_t*)': qxcbconnection.cpp:(.text+0x2df0): undefined reference to `QXcbKeyboard::updateKeymap(xcb_mapping_notify_event_t*)' qxcbconnection.cpp:(.text+0x2f20): undefined reference to `QXcbKeyboard::updateXKBStateFromCore(unsigned short)' qxcbconnection.cpp:(.text+0x2fb4): undefined reference to `QXcbKeyboard::updateXKBStateFromCore(unsigned short)' qxcbconnection.cpp:(.text+0x3040): undefined reference to `QXcbKeyboard::updateXKBStateFromCore(unsigned short)' qxcbconnection.cpp:(.text+0x312c): undefined reference to `QXcbKeyboard::updateXKBStateFromCore(unsigned short)' qxcbconnection.cpp:(.text+0x3164): undefined reference to `QXcbKeyboard::handleKeyReleaseEvent(xcb_key_press_event_t const*)' qxcbconnection.cpp:(.text+0x3174): undefined reference to `QXcbKeyboard::updateXKBStateFromCore(unsigned short)' qxcbconnection.cpp:(.text+0x31bc): undefined reference to `QXcbKeyboard::handleKeyPressEvent(xcb_key_press_event_t const*)' qxcbconnection.cpp:(.text+0x31cc): undefined reference to `QXcbKeyboard::updateXKBStateFromCore(unsigned short)' .obj/qxcbconnection.o: In function `QXcbConnection::~QXcbConnection()': qxcbconnection.cpp:(.text+0x3dfc): undefined reference to `QXcbKeyboard::~QXcbKeyboard()' .obj/qxcbintegration.o: In function `QXcbIntegration::possibleKeys(QKeyEvent const*) const': qxcbintegration.cpp:(.text+0xe0): undefined reference to `QXcbKeyboard::possibleKeys(QKeyEvent const*) const' .obj/qxcbwindow.o: In function `QXcbWindow::handleButtonReleaseEvent(xcb_button_press_event_t const*)': qxcbwindow.cpp:(.text+0x1e28): undefined reference to `QXcbKeyboard::translateModifiers(int) const' .obj/qxcbwindow.o: In function `QXcbWindow::handleMotionNotifyEvent(xcb_motion_notify_event_t const*)': qxcbwindow.cpp:(.text+0x1f30): undefined reference to `QXcbKeyboard::translateModifiers(int) const' .obj/qxcbwindow.o: In function `QXcbWindow::handleButtonPressEvent(xcb_button_press_event_t const*)': qxcbwindow.cpp:(.text+0x3fb0): undefined reference to `QXcbKeyboard::translateModifiers(int) const' collect2: error: ld returned 1 exit status Makefile.xcb_qpa_lib:336: recipe for target '../../../../lib/libQt5XcbQpa.so.5.12.0' failed make[6]: *** [../../../../lib/libQt5XcbQpa.so.5.12.0] Error 1 make[6]: Leaving directory '/usr/local/src/qt-everywhere-src-5.12.0/qtbase/src/plugins/platforms/xcb' Makefile:44: recipe for target 'sub-xcb_qpa_lib-pro-make_first-ordered' failed make[5]: *** [sub-xcb_qpa_lib-pro-make_first-ordered] Error 2 make[5]: Leaving directory '/usr/local/src/qt-everywhere-src-5.12.0/qtbase/src/plugins/platforms/xcb' Makefile:98: recipe for target 'sub-xcb-make_first' failed make[4]: *** [sub-xcb-make_first] Error 2 make[4]: Leaving directory '/usr/local/src/qt-everywhere-src-5.12.0/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 '/usr/local/src/qt-everywhere-src-5.12.0/qtbase/src/plugins' Makefile:747: recipe for target 'sub-plugins-make_first' failed make[2]: *** [sub-plugins-make_first] Error 2 make[2]: Leaving directory '/usr/local/src/qt-everywhere-src-5.12.0/qtbase/src' Makefile:48: recipe for target 'sub-src-make_first' failed make[1]: *** [sub-src-make_first] Error 2 make[1]: Leaving directory '/usr/local/src/qt-everywhere-src-5.12.0/qtbase' Makefile:47: recipe for target 'module-qtbase-make_first' failed make: *** [module-qtbase-make_first] Error 2
What can be happening or missing ?
This script working on Qt 5.11.1. -
-no-xkb
Looks like this flag should not be in qmake call.
So you're trying to natively compile on the RPi itself? And you only want qtcore + qtwidgets modules, right?
-
-no-xkb
Looks like this flag should not be in qmake call.
So you're trying to natively compile on the RPi itself? And you only want qtcore + qtwidgets modules, right?
@sierdzio Yes, only modules, core, gui, network, serialport, build directly in the Raspberry PI 3
-
This work with this configuration:
./configure -opensource -confirm-license -release -force-pkg-config -no-compile-examples -no-gbm -no-kms -no-pch -no-xcb -no-use-gold-linker -nomake examples -nomake tests -nomake tools -opengl desktop -qt-libpng -qt-pcre -qt-zlib -system-libpng -reduce-exports -skip qt3d -skip qtactiveqt -skip qtandroidextras -skip qtcanvas3d -skip qtcharts -skip qtconnectivity -skip qtdatavis3d -skip qtdeclarative -skip qtdoc -skip qtgamepad -skip qtgraphicaleffects -skip qtimageformats -skip qtlocation -skip qtmacextras -skip qtmultimedia -skip qtnetworkauth -skip qtpurchasing -skip qtquickcontrols -skip qtquickcontrols2 -skip qtremoteobjects -skip qtscript -skip qtscxml -skip qtsensors -skip qtserialbus -skip qtspeech -skip qtsvg -skip qttools -skip qttranslations -skip qtvirtualkeyboard -skip qtwayland -skip qtwebchannel -skip qtwebengine -skip qtwebglplugin -skip qtwebsockets -skip qtwebview -skip qtwinextras -skip qtx11extras -skip qtxmlpatterns