Building static version of Qt5 on Linux, getting error: "Project ERROR: Unknown module(s) in QT: fontdatabase_support-private"
-
I'm trying to build a static version of Qt5 on Red Hat Enterprise Linux 7.6 (Qt Commercial license). I seem to be missing a Qt-related module (fontsdatabase), but it is part of Qt itself.
These are the steps I've followed:
- I used fresh source from:
qt-everywhere-src-5.15.10.xz
- I used the following configure command:
./configure -prefix /opt/qt-5.15.10-static -release -static -no-securetransport -accessibility -qt-zlib -qt-libpng -qt-libjpeg -no-cups -no-sql-sqlite -no-qml-debug -nomake examples -nomake tests -no-freetype
make
Build failed with the following error:
"Project ERROR: Unknown module(s) in QT: fontdatabase_support-private"
I'm using GCC 9.1.0. This is basically a fresh RHEL 7.6 image with just the bare essentials installed. Any pointers greatly appreciated! I'm building static to simplify deployment for end user and to generate a single file installer using Qt Installer Framework.
This is the full output of the last compile step when error occurred:
[...] g++ -c -pipe -O2 -fPIC -std=c++1z -fvisibility=hidden -fvisibility-inlines-hidden -fno-exceptions -Wall -Wextra -Wvla -Wdate-time -Wshift-overflow=2 -Wduplicated-cond -Wno-stringop-overflow -Wno-format-overflow -ffunction-sections -fdata-sections -D_REENTRANT -fPIC -DQT_NO_LINKED_LIST -DQT_NO_JAVA_STYLE_ITERATORS -DQT_DEPRECATED_WARNINGS -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_STATICPLUGIN -DQT_PLUGIN -DQT_NETWORK_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -I../../../../include/QtNetwork/5.15.10 -I../../../../include/QtNetwork/5.15.10/QtNetwork -I../../../../include/QtCore/5.15.10 -I../../../../include/QtCore/5.15.10/QtCore -I../../../../include -I../../../../include/QtNetwork -I../../../../include/QtDBus -I../../../../include/QtCore -I.moc -I../../../../mkspecs/linux-g++ -o .obj/moc_qbearerengine_impl.o .moc/moc_qbearerengine_impl.cpp rm -f ../../../../plugins/bearer/libqnmbearer.a ar cqs ../../../../plugins/bearer/libqnmbearer.a .obj/main.o .obj/qnetworkmanagerservice.o .obj/qnetworkmanagerengine.o .obj/qofonoservice_linux.o .obj/qnetworksession_impl.o .obj/moc_qnetworkmanagerservice.o .obj/moc_qnetworkmanagerengine.o .obj/moc_qofonoservice_linux_p.o .obj/moc_qnetworksession_impl.o .obj/moc_qbearerengine_impl.o make[5]: Leaving directory `/home/developer/Downloads/qt-everywhere-src-5.15.10/qtbase/src/plugins/bearer/networkmanager' make[4]: Leaving directory `/home/developer/Downloads/qt-everywhere-src-5.15.10/qtbase/src/plugins/bearer' cd platforms/ && ( test -e Makefile || /home/developer/Downloads/qt-everywhere-src-5.15.10/qtbase/bin/qmake -o Makefile /home/developer/Downloads/qt-everywhere-src-5.15.10/qtbase/src/plugins/platforms/platforms.pro ) && make -f Makefile make[4]: Entering directory `/home/developer/Downloads/qt-everywhere-src-5.15.10/qtbase/src/plugins/platforms' cd minimal/ && ( test -e Makefile || /home/developer/Downloads/qt-everywhere-src-5.15.10/qtbase/bin/qmake -o Makefile /home/developer/Downloads/qt-everywhere-src-5.15.10/qtbase/src/plugins/platforms/minimal/minimal.pro ) && make -f Makefile Project ERROR: Unknown module(s) in QT: fontdatabase_support-private make[4]: *** [sub-minimal-make_first] Error 3 make[4]: Leaving directory `/home/developer/Downloads/qt-everywhere-src-5.15.10/qtbase/src/plugins/platforms' make[3]: *** [sub-platforms-make_first] Error 2 make[3]: Leaving directory `/home/developer/Downloads/qt-everywhere-src-5.15.10/qtbase/src/plugins' make[2]: *** [sub-plugins-make_first] Error 2 make[2]: Leaving directory `/home/developer/Downloads/qt-everywhere-src-5.15.10/qtbase/src' make[1]: *** [sub-src-make_first] Error 2 make[1]: Leaving directory `/home/developer/Downloads/qt-everywhere-src-5.15.10/qtbase' make: *** [module-qtbase-make_first] Error 2
References:
- I used fresh source from:
-
Re-reading your configure line, I wonder if it's not related to your freetype deactivation. Can you retry without that option ?
One recommendation: use out of source builds so when you have to restart like that you can simply nuke the build folder and start fresh.
-
Hi and welcome to devnet,
At this time 5.15.10 is not yet publicly released so you have a commercial license. You should contact the Qt Company's support about that matter.
-
Thanks SGaist!
I didn't realize that the open source is still only at 5.15.5 still. I might try to build an older version to see if I have more success in case there was a regression.
PS I have limited support via my commercial license as I have a small business license! (I tried :))
Rob
-
Re-reading your configure line, I wonder if it's not related to your freetype deactivation. Can you retry without that option ?
One recommendation: use out of source builds so when you have to restart like that you can simply nuke the build folder and start fresh.
-
You're welcome !
Since you have it working now, please mark the thread as solved using the "Topic Tools" button or the three dotted menu beside the answer you deem correct so that other forum members may know a solution has been found :-)
-
This also occurs when building shared libraries.
For those building Qt with Conan (recipe from Conan Center):
conan create <path_to_qt_recipe_directory> [other options] -o qt/*:with_freetype=True