Qt 5.15.14 and Ubuntu 24.04
-
I'm trying to compile the Qt 5.15.14 sources on Ubuntu 24.04.
configure -prefix /usr/local -opensource -release -sysconfdir /etc/xdg -openssl -no-eglfs -system-sqlite -make libs -skip qtandroidextras -skip qtmacextras -skip qtwinextras -skip qtwayland -skip qtcanvas3d -skip qt3d -skip qtgraphicaleffects -skip qtpurchasing -confirm-license -v
make
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 -D_REENTRANT -DQT_NO_LINKED_LIST -DQT_NO_JAVA_STYLE_ITERATORS -DQT_NO_CAST_FROM_ASCII -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_BUILD_XKBCOMMON_SUPPORT_LIB -DQT_BUILDING_QT -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x050000 -DQT_DEPRECATED_WARNINGS_SINCE=0x060000 -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -I/usr/src/qt-everywhere-src-5.15.14/qtbase/src/platformsupport/input/xkbcommon -I. -I/usr/src/qt-everywhere-src-5.15.14/qtbase/include -I/usr/src/qt-everywhere-src-5.15.14/qtbase/include/QtXkbCommonSupport -I/usr/src/qt-everywhere-src-5.15.14/qtbase/include/QtXkbCommonSupport/5.15.14 -I/usr/src/qt-everywhere-src-5.15.14/qtbase/include/QtXkbCommonSupport/5.15.14/QtXkbCommonSupport -I../../../../include -I../../../../include/QtXkbCommonSupport -I/usr/src/qt-everywhere-src-5.15.14/qtbase/include/QtGui/5.15.14 -I/usr/src/qt-everywhere-src-5.15.14/qtbase/include/QtGui/5.15.14/QtGui -I../../../../include/QtGui/5.15.14 -I../../../../include/QtGui/5.15.14/QtGui -I/usr/src/qt-everywhere-src-5.15.14/qtbase/include/QtCore/5.15.14 -I/usr/src/qt-everywhere-src-5.15.14/qtbase/include/QtCore/5.15.14/QtCore -I../../../../include/QtCore/5.15.14 -I../../../../include/QtCore/5.15.14/QtCore -I/usr/src/qt-everywhere-src-5.15.14/qtbase/include/QtGui -I../../../../include/QtGui -I/usr/src/qt-everywhere-src-5.15.14/qtbase/include/QtCore -I../../../../include/QtCore -I.moc -I/usr/src/qt-everywhere-src-5.15.14/qtbase/mkspecs/linux-g++ -o .obj/qxkbcommon.o /usr/src/qt-everywhere-src-5.15.14/qtbase/src/platformsupport/input/xkbcommon/qxkbcommon.cpp /usr/src/qt-everywhere-src-5.15.14/qtbase/src/platformsupport/input/xkbcommon/qxkbcommon.cpp:276:16: error: 'XKB_KEY_dead_lowline' was not declared in this scope; did you mean 'XKB_KEY_dead_belowring'? 276 | Xkb2Qt<XKB_KEY_dead_lowline, Qt::Key_Dead_Lowline>, | ^~~~~~~~~~~~~~~~~~~~ | XKB_KEY_dead_belowring /usr/src/qt-everywhere-src-5.15.14/qtbase/src/platformsupport/input/xkbcommon/qxkbcommon.cpp:276:69: error: template argument 1 is invalid 276 | Xkb2Qt<XKB_KEY_dead_lowline, Qt::Key_Dead_Lowline>, | ^ /usr/src/qt-everywhere-src-5.15.14/qtbase/src/platformsupport/input/xkbcommon/qxkbcommon.cpp:277:16: error: 'XKB_KEY_dead_aboveverticalline' was not declared in this scope; did you mean 'XKB_KEY_dead_abovering'? 277 | Xkb2Qt<XKB_KEY_dead_aboveverticalline, Qt::Key_Dead_Aboveverticalline>, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | XKB_KEY_dead_abovering /usr/src/qt-everywhere-src-5.15.14/qtbase/src/platformsupport/input/xkbcommon/qxkbcommon.cpp:277:79: error: template argument 1 is invalid 277 | Xkb2Qt<XKB_KEY_dead_aboveverticalline, Qt::Key_Dead_Aboveverticalline>, | ^ /usr/src/qt-everywhere-src-5.15.14/qtbase/src/platformsupport/input/xkbcommon/qxkbcommon.cpp:278:16: error: 'XKB_KEY_dead_belowverticalline' was not declared in this scope; did you mean 'XKB_KEY_dead_belowtilde'? 278 | Xkb2Qt<XKB_KEY_dead_belowverticalline, Qt::Key_Dead_Belowverticalline>, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | XKB_KEY_dead_belowtilde /usr/src/qt-everywhere-src-5.15.14/qtbase/src/platformsupport/input/xkbcommon/qxkbcommon.cpp:278:79: error: template argument 1 is invalid 278 | Xkb2Qt<XKB_KEY_dead_belowverticalline, Qt::Key_Dead_Belowverticalline>, | ^ /usr/src/qt-everywhere-src-5.15.14/qtbase/src/platformsupport/input/xkbcommon/qxkbcommon.cpp:279:16: error: 'XKB_KEY_dead_longsolidusoverlay' was not declared in this scope 279 | Xkb2Qt<XKB_KEY_dead_longsolidusoverlay, Qt::Key_Dead_Longsolidusoverlay>, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/src/qt-everywhere-src-5.15.14/qtbase/src/platformsupport/input/xkbcommon/qxkbcommon.cpp:279:80: error: template argument 1 is invalid 279 | Xkb2Qt<XKB_KEY_dead_longsolidusoverlay, Qt::Key_Dead_Longsolidusoverlay>, | ^ /usr/src/qt-everywhere-src-5.15.14/qtbase/src/platformsupport/input/xkbcommon/qxkbcommon.cpp:427:5: error: template argument 156 is invalid 427 | >::Data{} | ^ /usr/src/qt-everywhere-src-5.15.14/qtbase/src/platformsupport/input/xkbcommon/qxkbcommon.cpp:427:5: error: template argument 157 is invalid /usr/src/qt-everywhere-src-5.15.14/qtbase/src/platformsupport/input/xkbcommon/qxkbcommon.cpp:427:5: error: template argument 158 is invalid /usr/src/qt-everywhere-src-5.15.14/qtbase/src/platformsupport/input/xkbcommon/qxkbcommon.cpp:427:5: error: template argument 159 is invalid make[5]: *** [Makefile:759: .obj/qxkbcommon.o] Error 1 make[5]: Leaving directory '/usr/src/qt-everywhere-src-5.15.14/build/qtbase/src/platformsupport/input/xkbcommon' make[4]: *** [Makefile:48: sub-xkbcommon-make_first-ordered] Error 2 make[4]: Leaving directory '/usr/src/qt-everywhere-src-5.15.14/build/qtbase/src/platformsupport/input' make[3]: Leaving directory '/usr/src/qt-everywhere-src-5.15.14/build/qtbase/src/platformsupport' make[3]: *** [Makefile:210: sub-input-make_first] Error 2 make[2]: *** [Makefile:479: sub-platformsupport-make_first] Error 2 make[2]: Leaving directory '/usr/src/qt-everywhere-src-5.15.14/build/qtbase/src' make[1]: *** [Makefile:51: sub-src-make_first] Error 2 make[1]: Leaving directory '/usr/src/qt-everywhere-src-5.15.14/build/qtbase' make: *** [Makefile:80: module-qtbase-make_first] Error 2 The command '/bin/sh -c make -j${THREADS}' returned a non-zero code: 2
But get the above errors.
-
I'm trying to compile the Qt 5.15.14 sources on Ubuntu 24.04.
configure -prefix /usr/local -opensource -release -sysconfdir /etc/xdg -openssl -no-eglfs -system-sqlite -make libs -skip qtandroidextras -skip qtmacextras -skip qtwinextras -skip qtwayland -skip qtcanvas3d -skip qt3d -skip qtgraphicaleffects -skip qtpurchasing -confirm-license -v
make
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 -D_REENTRANT -DQT_NO_LINKED_LIST -DQT_NO_JAVA_STYLE_ITERATORS -DQT_NO_CAST_FROM_ASCII -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_BUILD_XKBCOMMON_SUPPORT_LIB -DQT_BUILDING_QT -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x050000 -DQT_DEPRECATED_WARNINGS_SINCE=0x060000 -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -I/usr/src/qt-everywhere-src-5.15.14/qtbase/src/platformsupport/input/xkbcommon -I. -I/usr/src/qt-everywhere-src-5.15.14/qtbase/include -I/usr/src/qt-everywhere-src-5.15.14/qtbase/include/QtXkbCommonSupport -I/usr/src/qt-everywhere-src-5.15.14/qtbase/include/QtXkbCommonSupport/5.15.14 -I/usr/src/qt-everywhere-src-5.15.14/qtbase/include/QtXkbCommonSupport/5.15.14/QtXkbCommonSupport -I../../../../include -I../../../../include/QtXkbCommonSupport -I/usr/src/qt-everywhere-src-5.15.14/qtbase/include/QtGui/5.15.14 -I/usr/src/qt-everywhere-src-5.15.14/qtbase/include/QtGui/5.15.14/QtGui -I../../../../include/QtGui/5.15.14 -I../../../../include/QtGui/5.15.14/QtGui -I/usr/src/qt-everywhere-src-5.15.14/qtbase/include/QtCore/5.15.14 -I/usr/src/qt-everywhere-src-5.15.14/qtbase/include/QtCore/5.15.14/QtCore -I../../../../include/QtCore/5.15.14 -I../../../../include/QtCore/5.15.14/QtCore -I/usr/src/qt-everywhere-src-5.15.14/qtbase/include/QtGui -I../../../../include/QtGui -I/usr/src/qt-everywhere-src-5.15.14/qtbase/include/QtCore -I../../../../include/QtCore -I.moc -I/usr/src/qt-everywhere-src-5.15.14/qtbase/mkspecs/linux-g++ -o .obj/qxkbcommon.o /usr/src/qt-everywhere-src-5.15.14/qtbase/src/platformsupport/input/xkbcommon/qxkbcommon.cpp /usr/src/qt-everywhere-src-5.15.14/qtbase/src/platformsupport/input/xkbcommon/qxkbcommon.cpp:276:16: error: 'XKB_KEY_dead_lowline' was not declared in this scope; did you mean 'XKB_KEY_dead_belowring'? 276 | Xkb2Qt<XKB_KEY_dead_lowline, Qt::Key_Dead_Lowline>, | ^~~~~~~~~~~~~~~~~~~~ | XKB_KEY_dead_belowring /usr/src/qt-everywhere-src-5.15.14/qtbase/src/platformsupport/input/xkbcommon/qxkbcommon.cpp:276:69: error: template argument 1 is invalid 276 | Xkb2Qt<XKB_KEY_dead_lowline, Qt::Key_Dead_Lowline>, | ^ /usr/src/qt-everywhere-src-5.15.14/qtbase/src/platformsupport/input/xkbcommon/qxkbcommon.cpp:277:16: error: 'XKB_KEY_dead_aboveverticalline' was not declared in this scope; did you mean 'XKB_KEY_dead_abovering'? 277 | Xkb2Qt<XKB_KEY_dead_aboveverticalline, Qt::Key_Dead_Aboveverticalline>, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | XKB_KEY_dead_abovering /usr/src/qt-everywhere-src-5.15.14/qtbase/src/platformsupport/input/xkbcommon/qxkbcommon.cpp:277:79: error: template argument 1 is invalid 277 | Xkb2Qt<XKB_KEY_dead_aboveverticalline, Qt::Key_Dead_Aboveverticalline>, | ^ /usr/src/qt-everywhere-src-5.15.14/qtbase/src/platformsupport/input/xkbcommon/qxkbcommon.cpp:278:16: error: 'XKB_KEY_dead_belowverticalline' was not declared in this scope; did you mean 'XKB_KEY_dead_belowtilde'? 278 | Xkb2Qt<XKB_KEY_dead_belowverticalline, Qt::Key_Dead_Belowverticalline>, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | XKB_KEY_dead_belowtilde /usr/src/qt-everywhere-src-5.15.14/qtbase/src/platformsupport/input/xkbcommon/qxkbcommon.cpp:278:79: error: template argument 1 is invalid 278 | Xkb2Qt<XKB_KEY_dead_belowverticalline, Qt::Key_Dead_Belowverticalline>, | ^ /usr/src/qt-everywhere-src-5.15.14/qtbase/src/platformsupport/input/xkbcommon/qxkbcommon.cpp:279:16: error: 'XKB_KEY_dead_longsolidusoverlay' was not declared in this scope 279 | Xkb2Qt<XKB_KEY_dead_longsolidusoverlay, Qt::Key_Dead_Longsolidusoverlay>, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/src/qt-everywhere-src-5.15.14/qtbase/src/platformsupport/input/xkbcommon/qxkbcommon.cpp:279:80: error: template argument 1 is invalid 279 | Xkb2Qt<XKB_KEY_dead_longsolidusoverlay, Qt::Key_Dead_Longsolidusoverlay>, | ^ /usr/src/qt-everywhere-src-5.15.14/qtbase/src/platformsupport/input/xkbcommon/qxkbcommon.cpp:427:5: error: template argument 156 is invalid 427 | >::Data{} | ^ /usr/src/qt-everywhere-src-5.15.14/qtbase/src/platformsupport/input/xkbcommon/qxkbcommon.cpp:427:5: error: template argument 157 is invalid /usr/src/qt-everywhere-src-5.15.14/qtbase/src/platformsupport/input/xkbcommon/qxkbcommon.cpp:427:5: error: template argument 158 is invalid /usr/src/qt-everywhere-src-5.15.14/qtbase/src/platformsupport/input/xkbcommon/qxkbcommon.cpp:427:5: error: template argument 159 is invalid make[5]: *** [Makefile:759: .obj/qxkbcommon.o] Error 1 make[5]: Leaving directory '/usr/src/qt-everywhere-src-5.15.14/build/qtbase/src/platformsupport/input/xkbcommon' make[4]: *** [Makefile:48: sub-xkbcommon-make_first-ordered] Error 2 make[4]: Leaving directory '/usr/src/qt-everywhere-src-5.15.14/build/qtbase/src/platformsupport/input' make[3]: Leaving directory '/usr/src/qt-everywhere-src-5.15.14/build/qtbase/src/platformsupport' make[3]: *** [Makefile:210: sub-input-make_first] Error 2 make[2]: *** [Makefile:479: sub-platformsupport-make_first] Error 2 make[2]: Leaving directory '/usr/src/qt-everywhere-src-5.15.14/build/qtbase/src' make[1]: *** [Makefile:51: sub-src-make_first] Error 2 make[1]: Leaving directory '/usr/src/qt-everywhere-src-5.15.14/build/qtbase' make: *** [Makefile:80: module-qtbase-make_first] Error 2 The command '/bin/sh -c make -j${THREADS}' returned a non-zero code: 2
But get the above errors.
This was a breaking change incorporated into libxcbcommon 1.6.0 that I am going to guess is what ships with Ubuntu 24.04
https://gitlab.freedesktop.org/xorg/proto/xorgproto/-/merge_requests/70
https://github.com/xkbcommon/libxkbcommon/blob/6073565903488cb5b9a8d37fdc4a7c2f9d7ad04d/NEWS#L11You can find a patch attached to one of the bug reports:
https://bugreports.qt.io/browse/QTBUG-117950 -
@ChrisW67 Thanks! I was able to apply that patch and that fixed the issue. Now I am running into another compilation issue:
In file included from /usr/src/qt-everywhere-src-5.15.14/qtlocation/src/3rdparty/mapbox-gl-native/include/mbgl/util/image.hpp:4, from /usr/src/qt-everywhere-src-5.15.14/qtlocation/src/3rdparty/mapbox-gl-native/platform/qt/src/qt_image.cpp:1: /usr/src/qt-everywhere-src-5.15.14/qtlocation/src/3rdparty/mapbox-gl-native/include/mbgl/util/geometry.hpp:9:24: error: found ':' in nested-name-specifier, expected '::' 9 | enum class FeatureType : uint8_t { | ^ | :: /usr/src/qt-everywhere-src-5.15.14/qtlocation/src/3rdparty/mapbox-gl-native/include/mbgl/util/geometry.hpp:9:12: error: 'FeatureType' has not been declared 9 | enum class FeatureType : uint8_t { | ^~~~~~~~~~~ /usr/src/qt-everywhere-src-5.15.14/qtlocation/src/3rdparty/mapbox-gl-native/include/mbgl/util/geometry.hpp:9:34: error: expected unqualified-id before '{' token 9 | enum class FeatureType : uint8_t { | ^ /usr/src/qt-everywhere-src-5.15.14/qtlocation/src/3rdparty/mapbox-gl-native/include/mbgl/util/geometry.hpp:47:5: error: 'FeatureType' does not name a type; did you mean 'ToFeatureType'? 47 | FeatureType operator()(const Point<T> &) const { return FeatureType::Point; } | ^~~~~~~~~~~ | ToFeatureType /usr/src/qt-everywhere-src-5.15.14/qtlocation/src/3rdparty/mapbox-gl-native/include/mbgl/util/geometry.hpp:49:5: error: 'FeatureType' does not name a type; did you mean 'ToFeatureType'? 49 | FeatureType operator()(const MultiPoint<T> &) const { return FeatureType::Point; } | ^~~~~~~~~~~ | ToFeatureType /usr/src/qt-everywhere-src-5.15.14/qtlocation/src/3rdparty/mapbox-gl-native/include/mbgl/util/geometry.hpp:51:5: error: 'FeatureType' does not name a type; did you mean 'ToFeatureType'? 51 | FeatureType operator()(const LineString<T> &) const { return FeatureType::LineString; } | ^~~~~~~~~~~ | ToFeatureType /usr/src/qt-everywhere-src-5.15.14/qtlocation/src/3rdparty/mapbox-gl-native/include/mbgl/util/geometry.hpp:53:5: error: 'FeatureType' does not name a type; did you mean 'ToFeatureType'? 53 | FeatureType operator()(const MultiLineString<T> &) const { return FeatureType::LineString; } | ^~~~~~~~~~~ | ToFeatureType /usr/src/qt-everywhere-src-5.15.14/qtlocation/src/3rdparty/mapbox-gl-native/include/mbgl/util/geometry.hpp:55:5: error: 'FeatureType' does not name a type; did you mean 'ToFeatureType'? 55 | FeatureType operator()(const Polygon<T> &) const { return FeatureType::Polygon; } | ^~~~~~~~~~~ | ToFeatureType /usr/src/qt-everywhere-src-5.15.14/qtlocation/src/3rdparty/mapbox-gl-native/include/mbgl/util/geometry.hpp:57:5: error: 'FeatureType' does not name a type; did you mean 'ToFeatureType'? 57 | FeatureType operator()(const MultiPolygon<T> &) const { return FeatureType::Polygon; } | ^~~~~~~~~~~ | ToFeatureType /usr/src/qt-everywhere-src-5.15.14/qtlocation/src/3rdparty/mapbox-gl-native/include/mbgl/util/geometry.hpp:59:5: error: 'FeatureType' does not name a type; did you mean 'ToFeatureType'? 59 | FeatureType operator()(const mapbox::geometry::geometry_collection<T> &) const { return FeatureType::Unknown; } | ^~~~~~~~~~~ | ToFeatureType make[5]: Leaving directory '/usr/src/qt-everywhere-src-5.15.14/build/qtlocation/src/3rdparty/mapbox-gl-native' make[5]: *** [Makefile:5851: .obj/platform/qt/src/qt_image.o] Error 1 make[4]: *** [Makefile:203: sub-------3rdparty-mapbox-gl-native-make_first] Error 2 make[4]: Leaving directory '/usr/src/qt-everywhere-src-5.15.14/build/qtlocation/src/plugins/geoservices' make[3]: Leaving directory '/usr/src/qt-everywhere-src-5.15.14/build/qtlocation/src/plugins' make[3]: *** [Makefile:73: sub-geoservices-make_first] Error 2 make[2]: Leaving directory '/usr/src/qt-everywhere-src-5.15.14/build/qtlocation/src' make[2]: *** [Makefile:234: sub-plugins-make_first] Error 2 make[1]: Leaving directory '/usr/src/qt-everywhere-src-5.15.14/build/qtlocation' make[1]: *** [Makefile:49: sub-src-make_first] Error 2 make: *** [Makefile:623: module-qtlocation-make_first] Error 2 The command '/bin/sh -c make -j${THREADS}' returned a non-zero code: 2
I did not see any solutions to this in the Qt forums. I did see what looked to be the same compilation issue in a Gentoo forum: https://forums.gentoo.org/viewtopic-p-8759981.html?sid=1d494725e07e9e0c284053518579d5fe
The solution there seemed to be upgrading glibc. I assume I am already using a newer version of glibc than in the 2022 Gentoo forum post. -
@ChrisW67 Thanks! I was able to apply that patch and that fixed the issue. Now I am running into another compilation issue:
In file included from /usr/src/qt-everywhere-src-5.15.14/qtlocation/src/3rdparty/mapbox-gl-native/include/mbgl/util/image.hpp:4, from /usr/src/qt-everywhere-src-5.15.14/qtlocation/src/3rdparty/mapbox-gl-native/platform/qt/src/qt_image.cpp:1: /usr/src/qt-everywhere-src-5.15.14/qtlocation/src/3rdparty/mapbox-gl-native/include/mbgl/util/geometry.hpp:9:24: error: found ':' in nested-name-specifier, expected '::' 9 | enum class FeatureType : uint8_t { | ^ | :: /usr/src/qt-everywhere-src-5.15.14/qtlocation/src/3rdparty/mapbox-gl-native/include/mbgl/util/geometry.hpp:9:12: error: 'FeatureType' has not been declared 9 | enum class FeatureType : uint8_t { | ^~~~~~~~~~~ /usr/src/qt-everywhere-src-5.15.14/qtlocation/src/3rdparty/mapbox-gl-native/include/mbgl/util/geometry.hpp:9:34: error: expected unqualified-id before '{' token 9 | enum class FeatureType : uint8_t { | ^ /usr/src/qt-everywhere-src-5.15.14/qtlocation/src/3rdparty/mapbox-gl-native/include/mbgl/util/geometry.hpp:47:5: error: 'FeatureType' does not name a type; did you mean 'ToFeatureType'? 47 | FeatureType operator()(const Point<T> &) const { return FeatureType::Point; } | ^~~~~~~~~~~ | ToFeatureType /usr/src/qt-everywhere-src-5.15.14/qtlocation/src/3rdparty/mapbox-gl-native/include/mbgl/util/geometry.hpp:49:5: error: 'FeatureType' does not name a type; did you mean 'ToFeatureType'? 49 | FeatureType operator()(const MultiPoint<T> &) const { return FeatureType::Point; } | ^~~~~~~~~~~ | ToFeatureType /usr/src/qt-everywhere-src-5.15.14/qtlocation/src/3rdparty/mapbox-gl-native/include/mbgl/util/geometry.hpp:51:5: error: 'FeatureType' does not name a type; did you mean 'ToFeatureType'? 51 | FeatureType operator()(const LineString<T> &) const { return FeatureType::LineString; } | ^~~~~~~~~~~ | ToFeatureType /usr/src/qt-everywhere-src-5.15.14/qtlocation/src/3rdparty/mapbox-gl-native/include/mbgl/util/geometry.hpp:53:5: error: 'FeatureType' does not name a type; did you mean 'ToFeatureType'? 53 | FeatureType operator()(const MultiLineString<T> &) const { return FeatureType::LineString; } | ^~~~~~~~~~~ | ToFeatureType /usr/src/qt-everywhere-src-5.15.14/qtlocation/src/3rdparty/mapbox-gl-native/include/mbgl/util/geometry.hpp:55:5: error: 'FeatureType' does not name a type; did you mean 'ToFeatureType'? 55 | FeatureType operator()(const Polygon<T> &) const { return FeatureType::Polygon; } | ^~~~~~~~~~~ | ToFeatureType /usr/src/qt-everywhere-src-5.15.14/qtlocation/src/3rdparty/mapbox-gl-native/include/mbgl/util/geometry.hpp:57:5: error: 'FeatureType' does not name a type; did you mean 'ToFeatureType'? 57 | FeatureType operator()(const MultiPolygon<T> &) const { return FeatureType::Polygon; } | ^~~~~~~~~~~ | ToFeatureType /usr/src/qt-everywhere-src-5.15.14/qtlocation/src/3rdparty/mapbox-gl-native/include/mbgl/util/geometry.hpp:59:5: error: 'FeatureType' does not name a type; did you mean 'ToFeatureType'? 59 | FeatureType operator()(const mapbox::geometry::geometry_collection<T> &) const { return FeatureType::Unknown; } | ^~~~~~~~~~~ | ToFeatureType make[5]: Leaving directory '/usr/src/qt-everywhere-src-5.15.14/build/qtlocation/src/3rdparty/mapbox-gl-native' make[5]: *** [Makefile:5851: .obj/platform/qt/src/qt_image.o] Error 1 make[4]: *** [Makefile:203: sub-------3rdparty-mapbox-gl-native-make_first] Error 2 make[4]: Leaving directory '/usr/src/qt-everywhere-src-5.15.14/build/qtlocation/src/plugins/geoservices' make[3]: Leaving directory '/usr/src/qt-everywhere-src-5.15.14/build/qtlocation/src/plugins' make[3]: *** [Makefile:73: sub-geoservices-make_first] Error 2 make[2]: Leaving directory '/usr/src/qt-everywhere-src-5.15.14/build/qtlocation/src' make[2]: *** [Makefile:234: sub-plugins-make_first] Error 2 make[1]: Leaving directory '/usr/src/qt-everywhere-src-5.15.14/build/qtlocation' make[1]: *** [Makefile:49: sub-src-make_first] Error 2 make: *** [Makefile:623: module-qtlocation-make_first] Error 2 The command '/bin/sh -c make -j${THREADS}' returned a non-zero code: 2
I did not see any solutions to this in the Qt forums. I did see what looked to be the same compilation issue in a Gentoo forum: https://forums.gentoo.org/viewtopic-p-8759981.html?sid=1d494725e07e9e0c284053518579d5fe
The solution there seemed to be upgrading glibc. I assume I am already using a newer version of glibc than in the 2022 Gentoo forum post.This,
enum class FeatureType : uint8_t {...
, looks to be the start of a perfectly valid enum class declaration where the enum values have a concrete type. This appears to be the code concerned.
Why your compiler is choking here is unclear.
What compiler and other tools do you have? -
@ChrisW67
I'm running this all inside a docker container. Below is the beginning of our Dockerfile up until and including the Qt compilation part:FROM ubuntu:noble as interim LABEL maintainer=... ARG THREADS=4 # set up Ubuntu Noble repository RUN apt-get update && apt-get -y upgrade RUN DEBIAN_FRONTEND=noninteractive apt-get -y install autoconf automake bison build-essential cmake flex g++ git gperf gtk-doc-tools intltool libasound2-dev libblkid-dev libbluetooth-dev libcrypto++-dev libcups2-dev libcurl4-gnutls-dev libdbus-1-dev libdrm-dev libegl1-mesa-dev libfontconfig1-dev libfreetype6-dev libgif-dev libgl1-mesa-dev libgstreamer1.0-dev libgstreamer-plugins-*1.0-dev libgtk-3-dev libgudev-1.0-dev libharfbuzz-dev libhyphen-dev libjpeg-dev libncurses5-dev libnl-3-dev libnl-route-3-dev libnm-dev libnotify-dev libnss3-dev libparted-dev libpng-dev libpulse-dev libsecret-1-dev libsqlite3-dev libssl-dev libsystemd-dev libtool libudev-dev libusb-1.0-0-dev libva-dev libvdpau-dev libvirt-dev libx11-dev libxcb*-dev libxcomposite-dev libxcursor-dev libxi-dev libxkbcommon-dev libxkbcommon-x11-dev libxrandr-dev libxrender-dev libxslt-dev libxss-dev libxtst-dev libxv-dev nasm network-manager-dev openssh-client pkg-config python3 ruby uuid-dev wget xz-utils nodejs libxkbfile-dev libass-dev pip python3-setuptools # configure python since python2 has been removed RUN update-alternatives --install /usr/bin/python python /usr/bin/python3 2 # set up Bitbucket access key ... # prepare the OS filesystem RUN apt-get -y remove *qt5* RUN rm -rf /usr/local/* # build ffmpeg ... # build mpv ... # build Qt ...
I reran to get the compiler:
# which g++ /usr/bin/g++ # g++ --version g++ (Ubuntu 13.2.0-23ubuntu4) 13.2.0
-
@ChrisW67
I'm running this all inside a docker container. Below is the beginning of our Dockerfile up until and including the Qt compilation part:FROM ubuntu:noble as interim LABEL maintainer=... ARG THREADS=4 # set up Ubuntu Noble repository RUN apt-get update && apt-get -y upgrade RUN DEBIAN_FRONTEND=noninteractive apt-get -y install autoconf automake bison build-essential cmake flex g++ git gperf gtk-doc-tools intltool libasound2-dev libblkid-dev libbluetooth-dev libcrypto++-dev libcups2-dev libcurl4-gnutls-dev libdbus-1-dev libdrm-dev libegl1-mesa-dev libfontconfig1-dev libfreetype6-dev libgif-dev libgl1-mesa-dev libgstreamer1.0-dev libgstreamer-plugins-*1.0-dev libgtk-3-dev libgudev-1.0-dev libharfbuzz-dev libhyphen-dev libjpeg-dev libncurses5-dev libnl-3-dev libnl-route-3-dev libnm-dev libnotify-dev libnss3-dev libparted-dev libpng-dev libpulse-dev libsecret-1-dev libsqlite3-dev libssl-dev libsystemd-dev libtool libudev-dev libusb-1.0-0-dev libva-dev libvdpau-dev libvirt-dev libx11-dev libxcb*-dev libxcomposite-dev libxcursor-dev libxi-dev libxkbcommon-dev libxkbcommon-x11-dev libxrandr-dev libxrender-dev libxslt-dev libxss-dev libxtst-dev libxv-dev nasm network-manager-dev openssh-client pkg-config python3 ruby uuid-dev wget xz-utils nodejs libxkbfile-dev libass-dev pip python3-setuptools # configure python since python2 has been removed RUN update-alternatives --install /usr/bin/python python /usr/bin/python3 2 # set up Bitbucket access key ... # prepare the OS filesystem RUN apt-get -y remove *qt5* RUN rm -rf /usr/local/* # build ffmpeg ... # build mpv ... # build Qt ...
I reran to get the compiler:
# which g++ /usr/bin/g++ # g++ --version g++ (Ubuntu 13.2.0-23ubuntu4) 13.2.0
The used version of mapboxgl is no longer supported by mapbox and the repo is archived. There is no way to fix this short of a local fix as pointed out by QTBUG-122589
It then provides a link to a patch.
-
@ChrisW67
I successfully built our docker container, but when I run it I get the following error:Project ERROR: Unknown module(s) in QT: webenginewidgets
Our docker container works with Ubuntu 20.04 and an older version of Qt. Did this module get moved or removed from Qt?
-
@ChrisW67
I found the issue. When Qt is being configured I see:Note: The following modules are not being compiled in this configuration: webenginecore webengine webenginewidgets pdf pdfwidgets WARNING: Python version 2 (2.7.5 or later) is required to build QtWebEngine.
I assume webenginecore, webengine and webenginewidgets all require Python 2. Seems that Python 2 is not available for Ubuntu 24.04. I'm looking for a workaround for this issue.