Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Error when building Qt5.15.16 from source

Error when building Qt5.15.16 from source

Scheduled Pinned Locked Moved Unsolved General and Desktop
13 Posts 5 Posters 170 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    Gravit22
    wrote 7 days ago last edited by
    #1

    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
    
    
    1 Reply Last reply
    0
    • C Offline
      C Offline
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote 7 days ago last edited by
      #2

      Your compiler is to old

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      G 1 Reply Last reply 7 days ago
      2
      • C Christian Ehrlicher
        7 days ago

        Your compiler is to old

        G Offline
        G Offline
        Gravit22
        wrote 7 days ago last edited by
        #3

        @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?

        C 1 Reply Last reply 7 days ago
        0
        • P Offline
          P Offline
          piervalli
          wrote 7 days ago last edited by
          #4

          It Is Qt5 what is the version of mingw64 used?

          1 Reply Last reply
          0
          • G Gravit22
            7 days ago

            @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?

            C Offline
            C Offline
            Christian Ehrlicher
            Lifetime Qt Champion
            wrote 7 days ago last edited by
            #5

            @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

            Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
            Visit the Qt Academy at https://academy.qt.io/catalog

            G 1 Reply Last reply 7 days ago
            3
            • C Christian Ehrlicher
              7 days ago

              @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

              G Offline
              G Offline
              Gravit22
              wrote 7 days ago last edited by Gravit22 5 Oct 2025, 12:44
              #6

              @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

              C 1 Reply Last reply 7 days ago
              0
              • P Offline
                P Offline
                piervalli
                wrote 7 days ago last edited by
                #7

                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.

                1 Reply Last reply
                0
                • P Offline
                  P Offline
                  piervalli
                  wrote 7 days ago last edited by
                  #8

                  This is page
                  https://wiki.qt.io/Qt_5.15_Tools_and_Versions

                  1 Reply Last reply
                  0
                  • G Gravit22
                    7 days ago

                    @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

                    C Offline
                    C Offline
                    Christian Ehrlicher
                    Lifetime Qt Champion
                    wrote 7 days ago last edited by
                    #9

                    @Gravit22 it looks like an older version is used. What does 'gcc - - version' say?

                    Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
                    Visit the Qt Academy at https://academy.qt.io/catalog

                    G 1 Reply Last reply 6 days ago
                    0
                    • C Christian Ehrlicher
                      7 days ago

                      @Gravit22 it looks like an older version is used. What does 'gcc - - version' say?

                      G Offline
                      G Offline
                      Gravit22
                      wrote 6 days ago last edited by
                      #10

                      @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.
                      
                      1 Reply Last reply
                      0
                      • posktomtenP Offline
                        posktomtenP Offline
                        posktomten
                        wrote 6 days ago last edited by
                        #11

                        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
                        

                        posktomten

                        1 Reply Last reply
                        0
                        • C Offline
                          C Offline
                          Christian Ehrlicher
                          Lifetime Qt Champion
                          wrote 6 days ago last edited by
                          #12

                          Also - do you really need qtlocation? If not simply skip it.

                          Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
                          Visit the Qt Academy at https://academy.qt.io/catalog

                          1 Reply Last reply
                          0
                          • hskoglundH Offline
                            hskoglundH Offline
                            hskoglund
                            wrote 6 days ago last edited by
                            #13

                            Hi, good advice of @Christian-Ehrlicher 's to skip it, otherwise there is a solution here:
                            https://bugreports.qt.io/browse/QTBUG-122589

                            1 Reply Last reply
                            2

                            1/13

                            10 May 2025, 10:54

                            • Login

                            • Login or register to search.
                            1 out of 13
                            • First post
                              1/13
                              Last post
                            0
                            • Categories
                            • Recent
                            • Tags
                            • Popular
                            • Users
                            • Groups
                            • Search
                            • Get Qt Extensions
                            • Unsolved