organicmaps / organicmaps

🍃 Organic Maps is a free Android & iOS offline maps app for travelers, tourists, hikers, and cyclists. It uses crowd-sourced OpenStreetMap data and is developed with love by MapsWithMe (MapsMe) founders and our community. No ads, no tracking, no data collection, no crapware. Please donate to support the development!
https://organicmaps.app
Apache License 2.0
10.02k stars 958 forks source link

Some build targets fail because of cached Qt Positioning dependency status #9728

Open pastk opened 5 days ago

pastk commented 5 days ago

To reproduce:

  1. Build the desktop target i.e. tools/unix/build_omim.sh -d desktop (there will be Building with Qt Positioning in the log)
  2. Build some test target e.g. tools/unix/build_omim.sh -d routing_common_tests
    ...
    Building without Qt Positioning
    ...
    [10/17] Building CXX object platform/CMakeFiles/platform.dir/Unity/unity_0_cxx.cxx.o
    FAILED: platform/CMakeFiles/platform.dir/Unity/unity_0_cxx.cxx.o 
    /usr/bin/ccache /usr/bin/ccache /usr/bin/c++ -DDEBUG -DQT_CORE_LIB -DQT_NETWORK_LIB -DUSE_FILE32API -I/home/pastk/dev/OM/omim-build-debug/platform/platform_autogen/include -I/home/pastk/dev/OM/organicmaps -I/home/pastk/dev/OM/omim-build-debug/3party/gflags/include -I/home/pastk/dev/OM/organicmaps/3party/utfcpp/source -I/home/pastk/dev/OM/organicmaps/3party/expat/expat/lib -I/home/pastk/dev/OM/omim-build-debug/3party/expat/expat -I/home/pastk/dev/OM/omim-build-debug/3party/jansson/jansson/include -isystem /home/pastk/dev/OM/organicmaps/3party/boost -isystem /usr/include/x86_64-linux-gnu/qt6/QtCore -isystem /usr/include/x86_64-linux-gnu/qt6 -isystem /usr/lib/x86_64-linux-gnu/qt6/mkspecs/linux-g++ -isystem /usr/include/x86_64-linux-gnu/qt6/QtNetwork -g -std=c++20 -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -fdiagnostics-color=always -ffast-math -fno-omit-frame-pointer -Wall -Wextra -Wpedantic -Wno-unused-parameter -fPIC -MD -MT platform/CMakeFiles/platform.dir/Unity/unity_0_cxx.cxx.o -MF platform/CMakeFiles/platform.dir/Unity/unity_0_cxx.cxx.o.d -o platform/CMakeFiles/platform.dir/Unity/unity_0_cxx.cxx.o -c /home/pastk/dev/OM/omim-build-debug/platform/CMakeFiles/platform.dir/Unity/unity_0_cxx.cxx
    In file included from /home/pastk/dev/OM/omim-build-debug/platform/platform_autogen/EWIEGA46WW/moc_qt_location_service.cpp:10,
                 from /home/pastk/dev/OM/omim-build-debug/platform/platform_autogen/mocs_compilation.cpp:3,
                 from /home/pastk/dev/OM/omim-build-debug/platform/CMakeFiles/platform.dir/Unity/unity_0_cxx.cxx:4:
    /home/pastk/dev/OM/omim-build-debug/platform/platform_autogen/EWIEGA46WW/../../../../organicmaps/platform/qt_location_service.hpp:5:10: fatal error: QGeoPositionInfoSource: No such file or directory
    5 | #include <QGeoPositionInfoSource>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~
    compilation terminated.
    ninja: build stopped: subcommand failed.

    I have to rm -r ../omim-build-debug/CMakeFiles/ to make it reset.

@Ferenc- could you take a look please?

cmake 3.28.3 on Lubuntu 24.04

biodranik commented 5 days ago
  1. It works on older cmake 3.22.1.
  2. Passing -c key to build_omim.sh (e.g. -cd) should help with the build error.
  3. A proper fix should always have positioning accessible when platform is built on Linux, e.g. to be unit-tested.
pastk commented 4 days ago
2. Passing `-c` key to `build_omim.sh` (e.g. `-cd`) should help with the build error.

Having to re-build is not a good workaround..

Ferenc- commented 4 days ago

A proper fix should always have positioning accessible when platform is built on Linux, e.g. to be unit-tested.

@biodranik If you give me the green light, then I would very gladly turn qt positioning to always on. I believe the whole reason for the opt out was because there were some obscure build systems somewhere, which didn't have qt-positioning. I believe that was discussed on TG and also reported here. Let me know if I may proceed.

Ferenc- commented 1 day ago

@vng If I remember correctly it was you who hit this last time. Is the above proposal OK from your perspective?

vng commented 1 day ago

Honestly, I don't have a clue here.

Why do we need any QT positioning (and the QT itself) in "routing_common_tests" ?