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. QtLocation doesn't compile correctly with qmake -r and make

QtLocation doesn't compile correctly with qmake -r and make

Scheduled Pinned Locked Moved Unsolved General and Desktop
11 Posts 5 Posters 971 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.
  • A Offline
    A Offline
    abdel
    wrote on last edited by
    #1

    Hello everyone, please can you help me to overcome this big problem.
    It's been a long time and I tried to compile the QtLocation module with qt 6.0.3 (Mingw 8.1.0 64 bits), but it's not work.
    The process I follow is :
    download qtlocation library from GitHub (I tried for 10 last versions).
    Run qt 6.0.3 (Mingw 8.1.0 64 bits) cmd.
    Go to the qtlocation folder.
    Run qmake or run qmake -r
    run mingw32-make or run make
    run mingw32-make install or run make install

    /////////////////////////////////////////////////////////////////

    C:\Users\Haoudi\Downloads\qtlocation-dev\src\positioning\qgeoareamonitorsource.cpp:41:10: fatal error: QGeoAreaMonitorSource: No such file or directory
    #include <QGeoAreaMonitorSource>
    ^~~~~~~~~~~~~~~~~~~~~~~
    compilation terminated.
    make[3]: *** [Makefile.Release:1793: .obj/release/qgeoareamonitorsource.o] Error 1
    make[3]: Leaving directory 'C:/Users/Haoudi/Downloads/qtlocation-dev/qtlocation-shadow-build/src/positioning'
    make[2]: *** [Makefile:45: release] Error 2
    make[2]: Leaving directory 'C:/Users/Haoudi/Downloads/qtlocation-dev/qtlocation-shadow-build/src/positioning'
    make[1]: *** [Makefile:132: sub-positioning-make_first] Error 2
    make[1]: Leaving directory 'C:/Users/Haoudi/Downloads/qtlocation-dev/qtlocation-shadow-build/src'
    make: *** [Makefile:52: sub-src-make_first] Error 2

    //////////////////////////////////////////////////////

    I follow the same process to compile the MQTT library, and it's work correctly.

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      What if you use cmake ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • P Offline
        P Offline
        PiBo
        wrote on last edited by
        #3

        Hi abdel,

        Could you find the solution to this

        1 Reply Last reply
        0
        • P Offline
          P Offline
          PiBo
          wrote on last edited by
          #4

          I downloaded qtlocation-5.15 and did a
          qmake # from qt5
          make

          qgeoareamonitorsource.cpp:40:10: fatal error: QGeoAreaMonitorSource: No such file or directory
          40 | #include <QGeoAreaMonitorSource>
          | ^~~~~~~~~~~~~~~~~~~~~~~
          compilation terminated.
          make[2]: *** [Makefile:1029: .obj/qgeoareamonitorsource.o] Error 1
          make[2]: Leaving directory '/home/dev/source/qtlocation-5.15/src/positioning'
          make[1]: *** [Makefile:130: sub-positioning-make_first] Error 2
          make[1]: Leaving directory '/home/dev/source/qtlocation-5.15/src'
          make: *** [Makefile:49: sub-src-make_first] Error 2

          Any help would be appreciated

          SGaistS 1 Reply Last reply
          0
          • P PiBo

            I downloaded qtlocation-5.15 and did a
            qmake # from qt5
            make

            qgeoareamonitorsource.cpp:40:10: fatal error: QGeoAreaMonitorSource: No such file or directory
            40 | #include <QGeoAreaMonitorSource>
            | ^~~~~~~~~~~~~~~~~~~~~~~
            compilation terminated.
            make[2]: *** [Makefile:1029: .obj/qgeoareamonitorsource.o] Error 1
            make[2]: Leaving directory '/home/dev/source/qtlocation-5.15/src/positioning'
            make[1]: *** [Makefile:130: sub-positioning-make_first] Error 2
            make[1]: Leaving directory '/home/dev/source/qtlocation-5.15/src'
            make: *** [Makefile:49: sub-src-make_first] Error 2

            Any help would be appreciated

            SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #5

            @PiBo Hi, which exact version of qmake did you use ?

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            P 1 Reply Last reply
            0
            • SGaistS SGaist

              @PiBo Hi, which exact version of qmake did you use ?

              P Offline
              P Offline
              PiBo
              wrote on last edited by
              #6

              @SGaist QMake version 3.1
              Using Qt version 5.15.3 in /usr/lib/x86_64-linux-gnu

              1 Reply Last reply
              0
              • C Offline
                C Offline
                ChrisW67
                wrote on last edited by
                #7

                You look to be using the Ubuntu 22.04 (or equivalent) environment. The qtbase5-dev package does not deploy the private headers that qtlocation requires. You need the qtbase5-private-dev package. With that package present I have no problem building the qtlocation 5.15 branch.

                chrisw@newton:~/workspace/qtlocation$ qmake -v
                QMake version 3.1
                Using Qt version 5.15.3 in /usr/lib/x86_64-linux-gnu
                chrisw@newton:~/workspace/qtlocation$ git branch
                * 5.15
                  dev
                chrisw@newton:~/workspace/qtlocation$ mkdir ../qtlocation_build
                chrisw@newton:~/workspace/qtlocation$ cd ../qtlocation_build/
                chrisw@newton:~/workspace/qtlocation_build$ qmake ../qtlocation/qtlocation.pro 
                Info: creating stash file /home/chrisw/workspace/qtlocation_build/.qmake.stash
                Info: creating cache file /home/chrisw/workspace/qtlocation_build/.qmake.cache
                Checking for gypsy... no
                Checking for winrt... no
                
                Running configuration tests...
                Checking for Gypsy... no
                Checking for WinRT Geolocation API... no
                Done running configuration tests.
                
                Configure summary:
                
                Qt Positioning:
                  Gypsy GPS Daemon ....................... no
                  WinRT Geolocation API .................. no
                Qt Location:
                  Qt.labs.location experimental QML plugin . no
                  Geoservice plugins:
                    OpenStreetMap ........................ yes
                    HERE ................................. yes
                    Esri ................................. yes
                    Mapbox ............................... yes
                    MapboxGL ............................. yes
                    Itemsoverlay ......................... yes
                
                Qt is now configured for building. Just run 'make'.
                Once everything is built, you must run 'make install'.
                Qt will be installed into '/usr'.
                
                Prior to reconfiguration, make sure you remove any leftovers from
                the previous build.
                
                chrisw@newton:~/workspace/qtlocation_build$ make
                cd src/ && ( test -e Makefile || /usr/lib/qt5/bin/qmake -o Makefile /home/chrisw/workspace/qtlocation/src/src.pro ) && make -f Makefile 
                ...
                make[3]: Leaving directory '/home/chrisw/workspace/qtlocation_build/examples/positioning/logfilepositionsource'
                make[2]: Leaving directory '/home/chrisw/workspace/qtlocation_build/examples/positioning'
                make[1]: Leaving directory '/home/chrisw/workspace/qtlocation_build/examples'
                chrisw@newton:~/workspace/qtlocation_build
                
                P 1 Reply Last reply
                1
                • C ChrisW67

                  You look to be using the Ubuntu 22.04 (or equivalent) environment. The qtbase5-dev package does not deploy the private headers that qtlocation requires. You need the qtbase5-private-dev package. With that package present I have no problem building the qtlocation 5.15 branch.

                  chrisw@newton:~/workspace/qtlocation$ qmake -v
                  QMake version 3.1
                  Using Qt version 5.15.3 in /usr/lib/x86_64-linux-gnu
                  chrisw@newton:~/workspace/qtlocation$ git branch
                  * 5.15
                    dev
                  chrisw@newton:~/workspace/qtlocation$ mkdir ../qtlocation_build
                  chrisw@newton:~/workspace/qtlocation$ cd ../qtlocation_build/
                  chrisw@newton:~/workspace/qtlocation_build$ qmake ../qtlocation/qtlocation.pro 
                  Info: creating stash file /home/chrisw/workspace/qtlocation_build/.qmake.stash
                  Info: creating cache file /home/chrisw/workspace/qtlocation_build/.qmake.cache
                  Checking for gypsy... no
                  Checking for winrt... no
                  
                  Running configuration tests...
                  Checking for Gypsy... no
                  Checking for WinRT Geolocation API... no
                  Done running configuration tests.
                  
                  Configure summary:
                  
                  Qt Positioning:
                    Gypsy GPS Daemon ....................... no
                    WinRT Geolocation API .................. no
                  Qt Location:
                    Qt.labs.location experimental QML plugin . no
                    Geoservice plugins:
                      OpenStreetMap ........................ yes
                      HERE ................................. yes
                      Esri ................................. yes
                      Mapbox ............................... yes
                      MapboxGL ............................. yes
                      Itemsoverlay ......................... yes
                  
                  Qt is now configured for building. Just run 'make'.
                  Once everything is built, you must run 'make install'.
                  Qt will be installed into '/usr'.
                  
                  Prior to reconfiguration, make sure you remove any leftovers from
                  the previous build.
                  
                  chrisw@newton:~/workspace/qtlocation_build$ make
                  cd src/ && ( test -e Makefile || /usr/lib/qt5/bin/qmake -o Makefile /home/chrisw/workspace/qtlocation/src/src.pro ) && make -f Makefile 
                  ...
                  make[3]: Leaving directory '/home/chrisw/workspace/qtlocation_build/examples/positioning/logfilepositionsource'
                  make[2]: Leaving directory '/home/chrisw/workspace/qtlocation_build/examples/positioning'
                  make[1]: Leaving directory '/home/chrisw/workspace/qtlocation_build/examples'
                  chrisw@newton:~/workspace/qtlocation_build
                  
                  P Offline
                  P Offline
                  PiBo
                  wrote on last edited by
                  #8

                  @ChrisW67 Thanks for your reply. I've installed a clean ubuntu 22.04, installed qtbase-dev, qtbase-private-dev and build-essentials. Getting the same result

                  qmake version 3.1
                  Using Qt version 5.15.3 in /usr/lib/x86_64-linux-gnu
                  g++, gcc 11.3.0

                  dev@dev-VirtualBox:~/source/build2$ qmake ../qtlocation-5.15/qtlocation.pro

                  Running configuration tests...
                  Done running configuration tests.

                  Configure summary:

                  Qt Positioning:
                  Gypsy GPS Daemon ....................... no
                  WinRT Geolocation API .................. no
                  Qt Location:
                  Qt.labs.location experimental QML plugin . no
                  Geoservice plugins:
                  OpenStreetMap ........................ yes
                  HERE ................................. yes
                  Esri ................................. yes
                  Mapbox ............................... yes
                  MapboxGL ............................. yes
                  Itemsoverlay ......................... yes

                  Qt is now configured for building. Just run 'make'.
                  Once everything is built, you must run 'make install'.
                  Qt will be installed into '/usr'.

                  Prior to reconfiguration, make sure you remove any leftovers from
                  the previous build.

                  dev@dev-VirtualBox:~/source/build2$make

                  /home/dev/source/qtlocation-5.15/src/positioning/qgeoareamonitorsource.cpp:40:10: fatal error: QGeoAreaMonitorSource: No such file or directory
                  40 | #include <QGeoAreaMonitorSource>
                  | ^~~~~~~~~~~~~~~~~~~~~~~
                  compilation terminated.
                  make[2]: *** [Makefile:837: .obj/qgeoareamonitorsource.o] Error 1
                  make[2]: Leaving directory '/home/dev/source/build2/src/positioning'
                  make[1]: *** [Makefile:130: sub-positioning-make_first] Error 2
                  make[1]: Leaving directory '/home/dev/source/build2/src'
                  make: *** [Makefile:49: sub-src-make_first] Error 2

                  1 Reply Last reply
                  0
                  • C Offline
                    C Offline
                    ChrisW67
                    wrote on last edited by
                    #9

                    Where did your qtlocation source code come from? Mine is straight from a git clone.
                    Are any of the Ubuntu packages:

                    • qtqtlocation5-dev
                    • libqt5location5-plugin-mapboxgl
                    • libqt5location-plugins
                    • libqt5location5
                      installed? At least one of these interferes with the build for me (but they also install the plugin you are trying to build from source)
                    P 1 Reply Last reply
                    0
                    • C ChrisW67

                      Where did your qtlocation source code come from? Mine is straight from a git clone.
                      Are any of the Ubuntu packages:

                      • qtqtlocation5-dev
                      • libqt5location5-plugin-mapboxgl
                      • libqt5location-plugins
                      • libqt5location5
                        installed? At least one of these interferes with the build for me (but they also install the plugin you are trying to build from source)
                      P Offline
                      P Offline
                      PiBo
                      wrote on last edited by
                      #10

                      @ChrisW67
                      Hi,
                      It worked this time round.

                      I started on a clean ubuntu 22.04 again.
                      Installed qtbase-private-dev (which also installes qtbase-dev) , then installed build-essential (previously I installed qtbase-dev before qtbase-private-dev . Can't see how that makes a diff)
                      after this I could see that qtlocation5-dev , libqt5location5 , libqt5location5-plugin-mapboxgl , libqt5location5-plugins gets installed.
                      Then:
                      (This part I also did differently , I previously downloaded a zip from github)
                      git clone https://github.com/qt/qtlocation.git
                      cd qtlocation
                      git checkout 5.15

                      mkdir ../build
                      cd ../build
                      qmake ../qtlocation/qtlocation.pro
                      make

                      Life can continue now. Thanks for your help!!

                      R 1 Reply Last reply
                      0
                      • P PiBo

                        @ChrisW67
                        Hi,
                        It worked this time round.

                        I started on a clean ubuntu 22.04 again.
                        Installed qtbase-private-dev (which also installes qtbase-dev) , then installed build-essential (previously I installed qtbase-dev before qtbase-private-dev . Can't see how that makes a diff)
                        after this I could see that qtlocation5-dev , libqt5location5 , libqt5location5-plugin-mapboxgl , libqt5location5-plugins gets installed.
                        Then:
                        (This part I also did differently , I previously downloaded a zip from github)
                        git clone https://github.com/qt/qtlocation.git
                        cd qtlocation
                        git checkout 5.15

                        mkdir ../build
                        cd ../build
                        qmake ../qtlocation/qtlocation.pro
                        make

                        Life can continue now. Thanks for your help!!

                        R Offline
                        R Offline
                        ryanf55
                        wrote on last edited by
                        #11

                        @PiBo said in QtLocation doesn't compile correctly with qmake -r and make:

                        @ChrisW67
                        Hi,
                        It worked this time round.

                        I started on a clean ubuntu 22.04 again.
                        Installed qtbase-private-dev (which also installes qtbase-dev) , then installed build-essential (previously I installed qtbase-dev before qtbase-private-dev . Can't see how that makes a diff)
                        after this I could see that qtlocation5-dev , libqt5location5 , libqt5location5-plugin-mapboxgl , libqt5location5-plugins gets installed.
                        Then:
                        (This part I also did differently , I previously downloaded a zip from github)
                        git clone https://github.com/qt/qtlocation.git
                        cd qtlocation
                        git checkout 5.15

                        mkdir ../build
                        cd ../build
                        qmake ../qtlocation/qtlocation.pro
                        make

                        Life can continue now. Thanks for your help!!

                        If the package passes qmake, but then fails make, doesn't this indicate there is a problem in the build system not recognizing missing dependencies during at configuration time?

                        1 Reply Last reply
                        0

                        • Login

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