Error while compiling Qt6.9.0 on debian 12
-
I set up a fresh debian 12 64bit image in a VM to try building my application for linux but there are no compiled binaries available so i decided to compile it myself.
I installed the dependencies and cmake.
I followed the tutorial at https://doc.qt.io/qt-6/linux-building.html with the sources from git.
I ran the configure command from the qt-build directory as follows:
../qt-sources/configure -init-submodules -submodules qtbase,qttools,qtcharts,qvirtualkeyboard
This finished without any issues. After running cmake --build . --parallel; it crashed with the following after compiling for a while:
[5245/8074] Building CXX object qtdecl...SPrivate.dir/qqmlrangeformatting.cpp.o FAILED: qtdeclarative/src/qmlls/CMakeFiles/QmlLSPrivate.dir/qqmlrangeformatting.cpp.o /usr/bin/c++ -DQT_ASCII_CAST_WARNINGS -DQT_BUILDING_QT -DQT_BUILD_QMLLS_LIB -DQT_CORE_LIB -DQT_DEPRECATED_WARNINGS -DQT_EXPLICIT_QFILE_CONSTRUCTION_FROM_PATH -DQT_JSONRPC_LIB -DQT_LANGUAGESERVER_LIB -DQT_LEAN_HEADERS=1 -DQT_MOC_COMPAT -DQT_NETWORK_LIB -DQT_NO_AS_CONST=1 -DQT_NO_CAST_TO_ASCII -DQT_NO_DEBUG -DQT_NO_EXCEPTIONS -DQT_NO_FOREACH -DQT_NO_FOREACH=1 -DQT_NO_JAVA_STYLE_ITERATORS -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_NO_QASCONST -DQT_NO_QEXCHANGE -DQT_NO_QSNPRINTF -DQT_NO_QSNPRINTF=1 -DQT_NO_STD_FORMAT_SUPPORT -DQT_QMLCOMPILER_LIB -DQT_QMLDOM_LIB -DQT_QMLFORMAT_LIB -DQT_QMLINTEGRATION_LIB -DQT_QMLTOOLINGSETTINGS_LIB -DQT_QML_LIB -DQT_USE_QSTRINGBUILDER -D_GLIBCXX_ASSERTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -I/home/vbox/qt/qt-build/qtdeclarative/src/qmlls/QmlLSPrivate_autogen/include -I/home/vbox/qt/qt-build/qtbase/include -I/home/vbox/qt/qt-build/qtbase/include/QtQmlLS -I/home/vbox/qt/qt-sources/qtdeclarative/src/qmlls -I/home/vbox/qt/qt-build/qtdeclarative/src/qmlls -I/home/vbox/qt/qt-build/qtbase/include/QtQmlLS/6.9.0 -I/home/vbox/qt/qt-build/qtbase/include/QtQmlLS/6.9.0/QtQmlLS -I/home/vbox/qt/qt-build/qtbase/include/QtLanguageServer -I/home/vbox/qt/qt-build/qtlanguageserver/src/languageserver -I/home/vbox/qt/qt-build/qtbase/include/QtLanguageServer/6.9.0 -I/home/vbox/qt/qt-build/qtbase/include/QtLanguageServer/6.9.0/QtLanguageServer -I/home/vbox/qt/qt-build/qtbase/src/corelib -I/home/vbox/qt/qt-build/qtbase/include/QtCore/6.9.0 -I/home/vbox/qt/qt-build/qtbase/include/QtCore/6.9.0/QtCore -I/home/vbox/qt/qt-build/qtbase/include/QtCore -I/home/vbox/qt/qt-sources/qtbase/mkspecs/linux-g++ -I/home/vbox/qt/qt-build/qtbase/include/QtJsonRpc -I/home/vbox/qt/qt-build/qtlanguageserver/src/jsonrpc -I/home/vbox/qt/qt-build/qtbase/include/QtJsonRpc/6.9.0 -I/home/vbox/qt/qt-build/qtbase/include/QtJsonRpc/6.9.0/QtJsonRpc -I/home/vbox/qt/qt-build/qtbase/include/QtQmlDom -I/home/vbox/qt/qt-build/qtdeclarative/src/qmldom -I/home/vbox/qt/qt-build/qtbase/include/QtQmlDom/6.9.0 -I/home/vbox/qt/qt-build/qtbase/include/QtQmlDom/6.9.0/QtQmlDom -I/home/vbox/qt/qt-build/qtdeclarative/src/qml -I/home/vbox/qt/qt-build/qtbase/include/QtQml/6.9.0 -I/home/vbox/qt/qt-build/qtbase/include/QtQml/6.9.0/QtQml -I/home/vbox/qt/qt-build/qtbase/include/QtQml -I/home/vbox/qt/qt-build/qtbase/include/QtQmlIntegration -I/home/vbox/qt/qt-sources/qtdeclarative/src/qmlintegration -I/home/vbox/qt/qt-build/qtdeclarative/src/qmlintegration -I/home/vbox/qt/qt-build/qtbase/include/QtNetwork -I/home/vbox/qt/qt-build/qtdeclarative/src/qmlcompiler -I/home/vbox/qt/qt-build/qtbase/include/QtQmlCompiler/6.9.0 -I/home/vbox/qt/qt-build/qtbase/include/QtQmlCompiler/6.9.0/QtQmlCompiler -I/home/vbox/qt/qt-build/qtbase/include/QtQmlToolingSettings -I/home/vbox/qt/qt-build/qtdeclarative/src/qmltoolingsettings -I/home/vbox/qt/qt-build/qtbase/include/QtQmlToolingSettings/6.9.0 -I/home/vbox/qt/qt-build/qtbase/include/QtQmlToolingSettings/6.9.0/QtQmlToolingSettings -I/home/vbox/qt/qt-build/qtbase/include/QtQmlCompiler -I/home/vbox/qt/qt-build/qtbase/include/QtQmlFormat -I/home/vbox/qt/qt-build/qtdeclarative/src/qmlformat -I/home/vbox/qt/qt-build/qtbase/include/QtQmlFormat/6.9.0 -I/home/vbox/qt/qt-build/qtbase/include/QtQmlFormat/6.9.0/QtQmlFormat -DNDEBUG -O2 -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -Wall -Wextra -fPIC -U_FORTIFY_SOURCE -Wsuggest-override -fcf-protection=full -D_FORTIFY_SOURCE=2 -fstack-protector-strong -fstack-clash-protection -fno-exceptions -std=gnu++17 -Winvalid-pch -include /home/vbox/qt/qt-build/qtdeclarative/src/qmlls/CMakeFiles/QmlLSPrivate.dir/cmake_pch.hxx -MD -MT qtdeclarative/src/qmlls/CMakeFiles/QmlLSPrivate.dir/qqmlrangeformatting.cpp.o -MF qtdeclarative/src/qmlls/CMakeFiles/QmlLSPrivate.dir/qqmlrangeformatting.cpp.o.d -o qtdeclarative/src/qmlls/CMakeFiles/QmlLSPrivate.dir/qqmlrangeformatting.cpp.o -c /home/vbox/qt/qt-sources/qtdeclarative/src/qmlls/qqmlrangeformatting.cpp c++: fatal error: Killed signal terminated program cc1plus compilation terminated.
-
Hi,
Set parallel to 1, you should have the exact point of failure.
-
After running the command "cmake --build . parallel 1" it continued and finished building without another error?
-
After running the command "cmake --build . parallel 1" it continued and finished building without another error?
@YamiTheWitch said in Error while compiling Qt6.9.0 on debian 12:
building without another error?
c++: fatal error: Killed signal terminated program cc1plus
so it was killed because the machine ran out of memory
-