Qt 5.7 static build on Ubuntu 16.04 64-bit: configure no module scenegraph
Unsolved
Installation and Deployment
-
My goal is to create one 64-bit Linux executable by using static Qt libraries for deployment. I try to follow the description on this website chapter "Configuring Qt for Linux", but encounter several configuration/build errors:
- Fresh Ubuntu 16.04.01 64-bit installation
- All packages installed from qt-opensource-linux-x64-5.7.1.run
- Create new Qt Widgets Application with Qt Creator
- Build the application
Build output: Cannot find -lGL: Fix: $ sudo apt-get install libgl1-mesa-dev
I copied the complete ./configure command from:
http://doc.qt.io/qtinstallerframework/ifw-getting-started.html$ cd ~/Qt5.7.1/5.7/Src/ $ ./configure -prefix $PWD/qtbase \ -release \ -static \ -accessibility \ -qt-zlib \ -qt-libpng \ -qt-libjpeg \ -qt-xcb \ -qt-pcre \ -qt-freetype \ -no-glib \ -no-cups \ -no-sql-sqlite \ -no-qml-debug \ -no-opengl \ -no-egl \ -no-xinput \ -no-xinput2 \ -no-sm \ -no-icu \ -nomake examples \ -nomake tests \ -skip qtactiveqt \ -skip qtenginio \ -skip qtlocation \ -skip qtmultimedia \ -skip qtserialport \ -skip qtquick1 \ -skip qtquickcontrols \ -skip qtscript \ -skip qtsensors \ -skip qtwebkit \ -skip qtwebsockets \ -skip qtxmlpatterns \ -skip qt3d Output: -no-xinput: invalid command-line switch Attempting to skip non-existent module qtenginio. Fixed by removing: -no-xinput -skip qtenginio Run ./configure again: Attempting to skip non-existent module qtquick1. Fixed by removing: -skip qtquick1 Run ./configure again: Attempting to skip non-existent module qtwebkit. Fixed by emoving: -skip qtwebkit
Is the ./configure command wrong in the documentation?
Run final ./configure command:
$ cd ~/Qt5.7.1/5.7/Src/ $ ./configure \ -prefix $PWD/qtbase \ -release \ -static \ -accessibility \ -qt-zlib \ -qt-libpng \ -qt-libjpeg \ -qt-xcb \ -qt-pcre \ -qt-freetype \ -no-glib \ -no-cups \ -no-sql-sqlite \ -no-qml-debug \ -no-opengl \ -no-egl \ -no-xinput2 \ -no-sm \ -no-icu \ -nomake examples \ -nomake tests \ -skip qtactiveqt \ -skip qtlocation \ -skip qtmultimedia \ -skip qtserialport \ -skip qtquickcontrols \ -skip qtscript \ -skip qtsensors \ -skip qtwebsockets \ -skip qtxmlpatterns \ -skip qt3d Output: ... WARNING: Using static linking will disable the use of dynamically loaded plugins. Make sure to import all needed static plugins, or compile needed modules into the library. Info: creating stash file /home/erwin/Qt5.7.1/5.7/Src/.qmake.stash Info: creating super cache file /home/erwin/Qt5.7.1/5.7/Src/.qmake.super Qt is now configured for building. Just run 'make'. Once everything is built, Qt is installed. You should not run 'make install'. Prior to reconfiguration, make sure you remove any leftovers from the previous build.
Seems to be OK.
Run make:
$ make ... make -f Makefile make[4]: Entering directory '/home/erwin/Qt5.7.1/5.7/Src/qtdeclarative-render2d/src/plugins/scenegraph' cd softwarecontext/ && ( test -e Makefile || /home/erwin/Qt5.7.1/5.7/Src/qtbase/bin/qmake /home/erwin/Qt5.7.1/5.7/Src/qtdeclarative-render2d/src/plugins/scenegraph/softwarecontext/softwarecontext.pro -qtconf /home/erwin/Qt5.7.1/5.7/Src/qtbase/bin/qt.conf -o Makefile ) && make -f Makefile Project ERROR: No module claims plugin type 'scenegraph' Makefile:42: recipe for target 'sub-softwarecontext-make_first' failed make[4]: *** [sub-softwarecontext-make_first] Error 3 make[4]: Leaving directory '/home/erwin/Qt5.7.1/5.7/Src/qtdeclarative-render2d/src/plugins/scenegraph' Makefile:42: recipe for target 'sub-scenegraph-make_first' failed make[3]: *** [sub-scenegraph-make_first] Error 2 make[3]: Leaving directory '/home/erwin/Qt5.7.1/5.7/Src/qtdeclarative-render2d/src/plugins' Makefile:43: recipe for target 'sub-plugins-make_first' failed make[2]: *** [sub-plugins-make_first] Error 2 make[2]: Leaving directory '/home/erwin/Qt5.7.1/5.7/Src/qtdeclarative-render2d/src' Makefile:43: recipe for target 'sub-src-make_first' failed make[1]: *** [sub-src-make_first] Error 2 make[1]: Leaving directory '/home/erwin/Qt5.7.1/5.7/Src/qtdeclarative-render2d' Makefile:243: recipe for target 'module-qtdeclarative-render2d-make_first' failed make: *** [module-qtdeclarative-render2d-make_first] Error 2
Can someone help me further to fix this No module claims plugin type 'scenegraph' error? It is easy to reproduce on a clean Ubuntu machine.
Thanks!
-
Hi,
Ensure that the qtdeclarative module is built before that one. AFAIK, it's the one claiming the scenegraph plugin type.