Error when building Qt5.15.16 from source
-
wrote 7 days ago last edited by
When I try to build Qt from soure I have this error:
In file included from include/mbgl/util/image.hpp:4, from platform/qt/src/qt_image.cpp:1: include/mbgl/util/geometry.hpp:9:24: error: found ‘:’ in nested-name-specifier, expected ‘::’ 9 | enum class FeatureType : uint8_t { | ^ | :: include/mbgl/util/geometry.hpp:9:12: error: ‘FeatureType’ has not been declared 9 | enum class FeatureType : uint8_t { | ^~~~~~~~~~~ include/mbgl/util/geometry.hpp:9:34: error: expected unqualified-id before ‘{’ token 9 | enum class FeatureType : uint8_t { | ^ 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 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 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 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 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 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 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 g++ -c -pipe -DNDEBUG -DQT_IMAGE_DECODERS -DQT_BUILD_MAPBOXGL_LIB -DRAPIDJSON_HAS_STDSTRING=1 -DMBGL_USE_GLES2 -D__QT__ -O3 -ftemplate-depth=1024 -fvisibility-inlines-hidden -fvisibility=hidden -DMBGL_VERSION_REV=\"qt-v1.5.0\" -O2 -fPIC -std=c++1y -w -D_REENTRANT -fvisibility=hidden -fvisibility-inlines-hidden -DQT_NO_LINKED_LIST -DQT_NO_JAVA_STYLE_ITERATORS -DQT_NO_LINKED_LIST -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_NO_DEBUG -DQT_NETWORK_LIB -DQT_GUI_LIB -DQT_SQL_LIB -DQT_CORE_LIB -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -I. -Ideps/boost/1.65.1 -Ideps/boost/1.65.1/include -Ideps/earcut/0.12.4 -Ideps/earcut/0.12.4/include -Ideps/geojson/0.4.2 -Ideps/geojson/0.4.2/include -Ideps/geojsonvt/6.5.1 -Ideps/geojsonvt/6.5.1/include -Ideps/geometry/0.9.3 -Ideps/geometry/0.9.3/include -Ideps/kdbush/0.1.1-1 -Ideps/kdbush/0.1.1-1/include -Ideps/optional/f27e7908 -Ideps/optional/f27e7908/include -Ideps/polylabel/1.0.3 -Ideps/polylabel/1.0.3/include -Ideps/protozero/1.5.2 -Ideps/protozero/1.5.2/include -Ideps/rapidjson/1.1.0 -Ideps/rapidjson/1.1.0/include -Ideps/shelf-pack/2.1.1 -Ideps/shelf-pack/2.1.1/include -Ideps/supercluster/0.2.2 -Ideps/supercluster/0.2.2/include -Ideps/tao_tuple/28626e99 -Ideps/tao_tuple/28626e99/include -Ideps/unique_resource/cba309e -Ideps/unique_resource/cba309e/include -Ideps/variant/1.1.4 -Ideps/variant/1.1.4/include -Ideps/vector-tile/1.0.2 -Ideps/vector-tile/1.0.2/include -Ideps/wagyu/0.4.3 -Ideps/wagyu/0.4.3/include -Iinclude -Iplatform/default -Iplatform/qt -Iplatform/qt/include -Isrc -Ivendor/nunicode/include -I/home/mykhailo/Downloads/qt-everywhere-opensource-src-5.15.16/qt-everywhere-src-5.15.16/qtbase/include/QtNetwork/5.15.16 -I/home/mykhailo/Downloads/qt-everywhere-opensource-src-5.15.16/qt-everywhere-src-5.15.16/qtbase/include/QtNetwork/5.15.16/QtNetwork -I/home/mykhailo/Downloads/qt-everywhere-opensource-src-5.15.16/qt-everywhere-src-5.15.16/qtbase/include/QtGui/5.15.16 -I/home/mykhailo/Downloads/qt-everywhere-opensource-src-5.15.16/qt-everywhere-src-5.15.16/qtbase/include/QtGui/5.15.16/QtGui -I/home/mykhailo/Downloads/qt-everywhere-opensource-src-5.15.16/qt-everywhere-src-5.15.16/qtbase/include/QtSql/5.15.16 -I/home/mykhailo/Downloads/qt-everywhere-opensource-src-5.15.16/qt-everywhere-src-5.15.16/qtbase/include/QtSql/5.15.16/QtSql -I/home/mykhailo/Downloads/qt-everywhere-opensource-src-5.15.16/qt-everywhere-src-5.15.16/qtbase/include/QtCore/5.15.16 -I/home/mykhailo/Downloads/qt-everywhere-opensource-src-5.15.16/qt-everywhere-src-5.15.16/qtbase/include/QtCore/5.15.16/QtCore -I/home/mykhailo/Downloads/qt-everywhere-opensource-src-5.15.16/qt-everywhere-src-5.15.16/qtbase/include -I/home/mykhailo/Downloads/qt-everywhere-opensource-src-5.15.16/qt-everywhere-src-5.15.16/qtbase/include/QtNetwork -I/home/mykhailo/Downloads/qt-everywhere-opensource-src-5.15.16/qt-everywhere-src-5.15.16/qtbase/include/QtGui -I/home/mykhailo/Downloads/qt-everywhere-opensource-src-5.15.16/qt-everywhere-src-5.15.16/qtbase/include/QtSql -I/home/mykhailo/Downloads/qt-everywhere-opensource-src-5.15.16/qt-everywhere-src-5.15.16/qtbase/include/QtCore -I.moc -I/home/mykhailo/Downloads/qt-everywhere-opensource-src-5.15.16/qt-everywhere-src-5.15.16/qtbase/mkspecs/linux-g++ -o .obj/platform/qt/src/thread_local.o platform/qt/src/thread_local.cpp make[5]: *** [Makefile:5743: .obj/platform/qt/src/qt_image.o] Error 1 make[5]: *** Waiting for unfinished jobs.... make[5]: Leaving directory '/home/mykhailo/Downloads/qt-everywhere-opensource-src-5.15.16/qt-everywhere-src-5.15.16/qtlocation/src/3rdparty/mapbox-gl-native' make[4]: *** [Makefile:203: sub-------3rdparty-mapbox-gl-native-make_first] Error 2 make[4]: Leaving directory '/home/mykhailo/Downloads/qt-everywhere-opensource-src-5.15.16/qt-everywhere-src-5.15.16/qtlocation/src/plugins/geoservices' make[3]: *** [Makefile:73: sub-geoservices-make_first] Error 2 make[3]: Leaving directory '/home/mykhailo/Downloads/qt-everywhere-opensource-src-5.15.16/qt-everywhere-src-5.15.16/qtlocation/src/plugins' make[2]: *** [Makefile:234: sub-plugins-make_first] Error 2 make[2]: Leaving directory '/home/mykhailo/Downloads/qt-everywhere-opensource-src-5.15.16/qt-everywhere-src-5.15.16/qtlocation/src' make[1]: *** [Makefile:49: sub-src-make_first] Error 2 make[1]: Leaving directory '/home/mykhailo/Downloads/qt-everywhere-opensource-src-5.15.16/qt-everywhere-src-5.15.16/qtlocation' make: *** [Makefile:816: module-qtlocation-make_first] Error 2
-
Your compiler is to old
-
Your compiler is to old
wrote 7 days ago last edited by@Christian-Ehrlicher I do not understand. My Perl version is v5.38.2 and cmake version is 3.28.3.
As I understand it is relatively recent. What exactly is outdated? -
wrote 7 days ago last edited by
It Is Qt5 what is the version of mingw64 used?
-
@Christian-Ehrlicher I do not understand. My Perl version is v5.38.2 and cmake version is 3.28.3.
As I understand it is relatively recent. What exactly is outdated?@Gravit22 said in Error when building Qt5.15.16 from source:
My Perl version is v5.38.2 and cmake version is 3.
Neither of them is your compiler... You need a recent gcc
-
@Gravit22 said in Error when building Qt5.15.16 from source:
My Perl version is v5.38.2 and cmake version is 3.
Neither of them is your compiler... You need a recent gcc
wrote 7 days ago last edited by Gravit22 5 Oct 2025, 12:44@Christian-Ehrlicher My gcc version is:
gcc (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0
Also seems not too bad
@piervalli as I understand this is my mingw64 version -
wrote 7 days ago last edited by
Sorry usually I use Windows instead of Linux the same version of Qt Ubuntu 20.04, you can find on release notes which is the distro used.
-
wrote 7 days ago last edited by
This is page
https://wiki.qt.io/Qt_5.15_Tools_and_Versions -
@Christian-Ehrlicher My gcc version is:
gcc (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0
Also seems not too bad
@piervalli as I understand this is my mingw64 version@Gravit22 it looks like an older version is used. What does 'gcc - - version' say?
-
@Gravit22 it looks like an older version is used. What does 'gcc - - version' say?
wrote 6 days ago last edited by@Christian-Ehrlicher It states the version of gcc is 13.3.0
gcc (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0 Copyright (C) 2023 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
wrote 6 days ago last edited by
Worked for me
Qt5.15.16 Compiled on Lubuntu 20.04 64-bit GLIBC 2.31 GCC 9.4.0 ../qt-everywhere-src-5.15.16/configure -release -prefix "/opt/Qt/5.15.16/gcc_64" -opensource -confirm-license -silent -qt-zlib -qt-pcre -qt-libpng -qt-libjpeg -system-freetype -opengl desktop -make libs -make tools -flite -openssl-runtime OPENSSL_PREFIX="/opt/Qt/Tools/OpenSSLv3/src" make make install
-
Also - do you really need qtlocation? If not simply skip it.
-
wrote 6 days ago last edited by
Hi, good advice of @Christian-Ehrlicher 's to skip it, otherwise there is a solution here:
https://bugreports.qt.io/browse/QTBUG-122589
1/13