Failed to build Qt6.8 from source as static library, fails at qtimezonelocale.cpp
-
I get the following error while building, try to checking for missing libraries but could not relate or understand the error. Any one faced similar issue ?
Building CXX object qtbase/src/corelib/CMakeFiles/Core.dir/Debug/time/qtimezonelocale.cpp.o FAILED: qtbase/src/corelib/CMakeFiles/Core.dir/Debug/time/qtimezonelocale.cpp.o /home/user/qnx710/host/linux/x86_64/usr/bin/q++ -Vgcc_ntoaarch64le -Wc,-isysroot,/home/user/qnx710/target/qnx7 -lang-c++ -DPCRE2_CODE_UNIT_WIDTH=16 -DQT_ASCII_CAST_WARNINGS -DQT_BUILDING_QT -DQT_BUILD_CORE_LIB -DQT_DEPRECATED_WARNINGS -DQT_EXPLICIT_QFILE_CONSTRUCTION_FROM_PATH -DQT_LEAN_HEADERS=1 -DQT_MOC_COMPAT -DQT_NO_CAST_TO_ASCII -DQT_NO_CONTEXTLESS_CONNECT -DQT_NO_FOREACH -DQT_NO_JAVA_STYLE_ITERATORS -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_NO_QASCONST -DQT_NO_QEXCHANGE -DQT_NO_QPAIR -DQT_NO_QSNPRINTF -DQT_NO_USING_NAMESPACE -DQT_TYPESAFE_FLAGS -DQT_USE_NODISCARD_FILE_OPEN -DQT_USE_QSTRINGBUILDER -D_FORTIFY_SOURCE=2 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_EXTENSIVE -D_REENTRANT -DCMAKE_INTDIR=\"Debug\" -I/home/user/qt_build/qtbase/src/corelib/Core_autogen/include_Debug -I/home/user/qt_build/qtbase/include -I/home/user/qt_build/qtbase/include/QtCore -I/home/user/qt_src/qt-everywhere-src-6.8.0/qtbase/src/corelib -I/home/user/qt_build/qtbase/src/corelib -I/home/user/qt_build/qtbase/src/corelib/global -I/home/user/qt_build/qtbase/src/corelib/kernel -I/home/user/qt_src/qt-everywhere-src-6.8.0/qtbase/src/corelib/../3rdparty/tinycbor/src -I/home/user/qt_build/qtbase/include/QtCore/6.8.0 -I/home/user/qt_build/qtbase/include/QtCore/6.8.0/QtCore -I/home/user/qt_src/qt-everywhere-src-6.8.0/qtbase/src/corelib/../3rdparty/double-conversion/double-conversion -I/home/user/qt_src/qt-everywhere-src-6.8.0/qtbase/src/corelib/../3rdparty/double-conversion -I/home/user/qt_src/qt-everywhere-src-6.8.0/qtbase/src/corelib/../3rdparty/forkfd -I/home/user/qt_build/qtbase/src/corelib/.rcc -I/home/user/qt_src/qt-everywhere-src-6.8.0/qtbase/mkspecs/qnx-aarch64le-qcc -I/home/user/qnx710/target/qnx7/usr/include/openssl -I/home/user/qt_src/qt-everywhere-src-6.8.0/qtbase/src/3rdparty/pcre2/src -g -g -std=gnu++17 -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -Wall -Wextra -fexceptions -Wno-invalid-offsetof -fstack-protector-strong -fstack-clash-protection -Winvalid-pch -include /home/user/qt_build/qtbase/src/corelib/CMakeFiles/Core.dir/Debug/cmake_pch.hxx -Wp,-MD,qtbase/src/corelib/CMakeFiles/Core.dir/Debug/time/qtimezonelocale.cpp.o.d -Wp,-MT,qtbase/src/corelib/CMakeFiles/Core.dir/Debug/time/qtimezonelocale.cpp.o -Wp,-MF,qtbase/src/corelib/CMakeFiles/Core.dir/Debug/time/qtimezonelocale.cpp.o.d -o qtbase/src/corelib/CMakeFiles/Core.dir/Debug/time/qtimezonelocale.cpp.o -c /home/user/qt_src/qt-everywhere-src-6.8.0/qtbase/src/corelib/time/qtimezonelocale.cpp In file included from /home/user/qt_build/qtbase/include/QtCore/qassert.h:1, from /home/user/qt_src/qt-everywhere-src-6.8.0/qtbase/src/corelib/global/qglobal.h:35, from /home/user/qt_build/qtbase/include/QtCore/qglobal.h:1, from /home/user/qt_src/qt-everywhere-src-6.8.0/qtbase/src/corelib/global/qt_pch.h:20, from /home/user/qt_build/qtbase/src/corelib/CMakeFiles/Core.dir/Debug/cmake_pch.hxx:5, from <command-line>: /home/user/qt_src/qt-everywhere-src-6.8.0/qtbase/src/corelib/time/qtimezonelocale.cpp: In function 'constexpr UCalendarDisplayNameType {anonymous}::ucalDisplayNameType(QTimeZone::TimeType, QTimeZone::NameType)': /home/user/qt_src/qt-everywhere-src-6.8.0/qtbase/src/corelib/time/qtimezonelocale.cpp:34:5: error: call to non-'constexpr' function 'void qt_assert_x(const char*, const char*, const char*, int)' Q_UNREACHABLE_RETURN(UCAL_STANDARD); ^~~~~~~~~~~~~~~~~~~~ [19/15360] Building CXX object qtdeclarative/src/quicktemplates/CMakeFiles/QuickTemplates2.dir/Release/cmake_pch.hxx.gch ninja: build stopped: subcommand failed.
-
Looks like some problems with the qnx compiler/standard library that a function is not constexpr but Qt expects it.
-
@Christian-Ehrlicher Does it mean that compiler is incorrectly evaluating the constexpr.
As qtimezonelocale.cpp is part of the Qt source code. -
@jay1 said in Failed to build Qt6.8 from source as static library, fails at qtimezonelocale.cpp:
Does it mean that compiler is incorrectly evaluating the constexpr.
No, the compiler does not think that the function is constexpr due to some compiler bugs I would say. You should create a bug report to see if this is can be fixed or the qnx compiler is (once more) simply too bugged.
You should make sure to use the latest qnx compiler. -