albar965 / littlenavmap

Little Navmap is a free flight planner, navigation tool, moving map, airport search and airport information system for Flight Simulator X, Microsoft Flight Simulator 2020, Prepar3D and X-Plane.
https://albar965.github.io/littlenavmap.html
GNU General Public License v3.0
1.26k stars 163 forks source link

Problem building custom fork of marble #569

Closed meltinglava closed 3 years ago

meltinglava commented 3 years ago

Cant compile marble on arch linux (neofetch at the bottom of the issue). Have linked the cmake command and output as well as the make one. Cant see any obvius things i have missed from BUILD.txt nor the Install file on marble.

I am on branch:

git describe --all --long
heads/lnm/1.1-0-g132c081ea

could not find any branch with newer commits than that.

cmake command:

cmake -DCMAKE_BUILD_TYPE=debug -DQTONLY=ON -DCMAKE_INSTALL_PREFIX=apps ../marble
-- The C compiler identification is GNU 10.2.0
-- The CXX compiler identification is GNU 10.2.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
Installing in /home/ros/projects/flightsim/build-marble-debug/apps. Run /home/ros/projects/flightsim/build-marble-debug/doc/prefix.sh to set the environment for marble.
-- Found Phonon: /usr/include/phonon4qt5
-- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY
-- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY - Success
-- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY
-- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY - Success
-- Performing Test COMPILER_HAS_DEPRECATED_ATTR
-- Performing Test COMPILER_HAS_DEPRECATED_ATTR - Success
-- Found Perl: /usr/bin/perl (found version "5.32.0")
-- Found libgps: /usr/include
-- Found libwlocate: /usr/include
Installing in /home/ros/projects/flightsim/build-marble-debug/apps. Run /home/ros/projects/flightsim/build-marble-debug/src/plugins/runner/gpx/prefix.sh to set the environment for marble.
Installing in /home/ros/projects/flightsim/build-marble-debug/apps. Run /home/ros/projects/flightsim/build-marble-debug/src/plugins/runner/json/prefix.sh to set the environment for marble.
Installing in /home/ros/projects/flightsim/build-marble-debug/apps. Run /home/ros/projects/flightsim/build-marble-debug/src/plugins/runner/kml/prefix.sh to set the environment for marble.
Installing in /home/ros/projects/flightsim/build-marble-debug/apps. Run /home/ros/projects/flightsim/build-marble-debug/src/plugins/runner/osm/prefix.sh to set the environment for marble.
-- Found libshp: /usr/include
Installing in /home/ros/projects/flightsim/build-marble-debug/apps. Run /home/ros/projects/flightsim/build-marble-debug/src/plugins/runner/shp/prefix.sh to set the environment for marble.
Installing in /home/ros/projects/flightsim/build-marble-debug/apps. Run /home/ros/projects/flightsim/build-marble-debug/src/apps/marble-kde/prefix.sh to set the environment for marble.
Installing in /home/ros/projects/flightsim/build-marble-debug/apps. Run /home/ros/projects/flightsim/build-marble-debug/src/bindings/prefix.sh to set the environment for marble.
Installing in /home/ros/projects/flightsim/build-marble-debug/apps. Run /home/ros/projects/flightsim/build-marble-debug/src/plasmarunner/prefix.sh to set the environment for marble.
Installing in /home/ros/projects/flightsim/build-marble-debug/apps. Run /home/ros/projects/flightsim/build-marble-debug/src/thumbnailer/prefix.sh to set the environment for marble.
Installing in /home/ros/projects/flightsim/build-marble-debug/apps. Run /home/ros/projects/flightsim/build-marble-debug/data/prefix.sh to set the environment for marble.
-- The following features have been enabled:

 * Unit tests, Build unit tests. Toggle with BUILD_MARBLE_TESTS=YES/NO. 'make test' will run all.
 * Qt Designer plugins, Marble widget support in Qt Designer. Toggle with WITH_DESIGNER_PLUGIN=YES/NO
 * Marble Desktop/Mobile applications, Build Marble Desktop/Mobile applications. Toggle with BUILD_MARBLE_APPS=YES/NO.

-- The following OPTIONAL packages have been found:

 * Qt5DBus (required version >= 5.3.0)
 * Phonon, cross-platform multimedia framework that enables the use of audio and video content, <http://qt.digia.com/>
   Support for playback of soundcue elements
   Voice navigation (sound or human speakers)
 * Perl, <http://www.perl.org>
   generation of sources in the APRS plugin
 * Qt5SerialPort (required version >= 5.3.0), Provides access to hardware and virtual serial ports.
   Reading from serial port in APRS plugin
 * libgps, communicating with the GPS daemon, <http://catb.org/gpsd/>
   position information via gpsd
 * Qt5PositioningQuick (required version >= 5.15.1)
 * Qt5Location (required version >= 5.3.0), geographical support for position and map use, <http://qt.digia.com/>
   position information via Qt5Positioning and QtLocation
 * Qt5Positioning (required version >= 5.3.0), a collection of APIs and frameworks, <http://qt.digia.com/>
   Required for QtLocation to work
 * libwlocate, WLAN-based geolocation, <http://www.openwlanmap.org/>
   Position information based on neighboring WLAN networks
 * libshp, reading and writing of ESRI Shapefiles (.shp), <http://shapelib.maptools.org/>
   reading and displaying .shp files

-- The following REQUIRED packages have been found:

 * Qt5Xml (required version >= 5.3.0)
 * Qt5Network (required version >= 5.3.0)
 * Qt5Test (required version >= 5.3.0)
 * Qt5Script (required version >= 5.3.0)
 * Qt5Gui (required version >= 5.15.1)
 * Qt5Widgets (required version >= 5.3.0)
 * Qt5Svg (required version >= 5.3.0)
 * Qt5Sql (required version >= 5.3.0)
 * Qt5Concurrent (required version >= 5.3.0)
 * Qt5Qml (required version >= 5.15.1)
 * Qt5QmlModels (required version >= 5.15.1)
 * Qt5Quick (required version >= 5.3.0)
 * Qt5PrintSupport (required version >= 5.3.0)
 * Qt5Core

-- The following features have been disabled:

 * Marble tools, Build various Marble tools for e.g. file format conversion. Toggle with BUILD_MARBLE_TOOLS=YES/NO.
 * Marble library C++ examples, Build C++ examples showing how to use the Marble library. Toggle with BUILD_MARBLE_EXAMPLES=YES/NO.

-- Configuring done
CMake Warning (dev) in src/plugins/render/aprs/CMakeLists.txt:
  Policy CMP0071 is not set: Let AUTOMOC and AUTOUIC process GENERATED files.
  Run "cmake --help-policy CMP0071" for policy details.  Use the cmake_policy
  command to set the policy and suppress this warning.

  For compatibility, CMake is excluding the GENERATED source file(s):

    "/home/ros/projects/flightsim/build-marble-debug/src/plugins/render/aprs/AprsGatherer_mic_e.cpp"

  from processing by AUTOMOC.  If any of the files should be processed, set
  CMP0071 to NEW.  If any of the files should not be processed, explicitly
  exclude them by setting the source file property SKIP_AUTOMOC:

    set_property(SOURCE file.h PROPERTY SKIP_AUTOMOC ON)

This warning is for project developers.  Use -Wno-dev to suppress it.

-- Generating done
-- Build files have been written to: /home/ros/projects/flightsim/build-marble-debug

Build log:

make
[  1%] Automatic MOC for target sgp4
[  1%] Built target sgp4_autogen
[  1%] Built target sgp4
[  1%] Automatic MOC for target astro
[  1%] Built target astro_autogen
[  1%] Built target astro
[  1%] Automatic MOC for target marblewidget
[  1%] Built target marblewidget_autogen
[  1%] Building CXX object src/lib/marble/CMakeFiles/marblewidget.dir/graphicsview/FrameGraphicsItem.cpp.o
/home/ros/projects/flightsim/marble/src/lib/marble/graphicsview/FrameGraphicsItem.cpp:206:51: error: return type ‘class QPainterPath’ is incomplete
  206 | QPainterPath FrameGraphicsItem::backgroundShape() const
      |                                                   ^~~~~
/home/ros/projects/flightsim/marble/src/lib/marble/graphicsview/FrameGraphicsItem.cpp: In member function ‘virtual void Marble::FrameGraphicsItem::backgroundShape() const’:
/home/ros/projects/flightsim/marble/src/lib/marble/graphicsview/FrameGraphicsItem.cpp:208:18: error: aggregate ‘QPainterPath path’ has incomplete type and cannot be defined
  208 |     QPainterPath path;
      |                  ^~~~
/home/ros/projects/flightsim/marble/src/lib/marble/graphicsview/FrameGraphicsItem.cpp: In member function ‘virtual void Marble::FrameGraphicsItem::paintBackground(QPainter*)’:
/home/ros/projects/flightsim/marble/src/lib/marble/graphicsview/FrameGraphicsItem.cpp:226:39: error: invalid use of void expression
  226 |     painter->drawPath( backgroundShape() );
      |                        ~~~~~~~~~~~~~~~^~
/home/ros/projects/flightsim/marble/src/lib/marble/graphicsview/FrameGraphicsItem.cpp: In member function ‘virtual void Marble::FrameGraphicsItem::paint(QPainter*)’:
/home/ros/projects/flightsim/marble/src/lib/marble/graphicsview/FrameGraphicsItem.cpp:239:75: warning: ‘static bool QPixmapCache::find(const QString&, QPixmap&)’ is deprecated: Use bool find(const QString &, QPixmap *) instead [-Wdeprecated-declarations]
  239 |         if ( !QPixmapCache::find( "marble/frames/shadowframe.png", shadow ) ) {
      |                                                                           ^
In file included from /usr/include/qt/QtGui/QPixmapCache:1,
                 from /home/ros/projects/flightsim/marble/src/lib/marble/graphicsview/FrameGraphicsItem.cpp:21:
/usr/include/qt/QtGui/qpixmapcache.h:81:17: note: declared here
   81 |     static bool find(const QString &key, QPixmap &pixmap);
      |                 ^~~~
make[2]: *** [src/lib/marble/CMakeFiles/marblewidget.dir/build.make:5594: src/lib/marble/CMakeFiles/marblewidget.dir/graphicsview/FrameGraphicsItem.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:2934: src/lib/marble/CMakeFiles/marblewidget.dir/all] Error 2
make: *** [Makefile:182: all] Error 2

SystemInfo:

                   -`                    ros@rosarch
                  .o+`                   -----------
                 `ooo/                   OS: Arch Linux x86_64
                `+oooo:                  Host: UX430UQ 1.0
               `+oooooo:                 Kernel: 5.8.6-arch1-1
               -+oooooo+:                Uptime: 17 days, 1 hour, 55 mins
             `/:-:++oooo+:               Packages: 1717 (pacman)
            `/++++/+++++++:              Shell: bash 5.0.18
           `/++++++++++++++:             Resolution: 1920x1080
          `/+++ooooooooooooo/`           DE: xinitrc
         ./ooosssso++osssssso+`          WM: i3
        .oossssso-````/ossssss+`         Theme: Adwaita [GTK2/3]
       -osssssso.      :ssssssso.        Icons: Adwaita [GTK2/3]
      :osssssss/        osssso+++.       Terminal: alacritty
     /ossssssss/        +ssssooo/-       CPU: Intel i7-7500U (4) @ 3.500GHz
   `/ossssso+/:-        -:/+osssso+-     GPU: Intel HD Graphics 620
  `+sso+:-`                 `.-/+oso:    GPU: NVIDIA GeForce 940MX
 `++:.                           `-/+/   Memory: 3464MiB / 15891MiB
 .`                                 `/
albar965 commented 3 years ago

I suppose you have to add the missing include to QPainterPath in FrameGraphicsItem.cpp. This can happen if you compile with other Qt versions than I do. I'm currently using 5.12.9.

meltinglava commented 3 years ago

Thanks. Did not realize that it was just missing an import. I have fixed those (PR-comes when all is compiled). @albar965 Can you check what version of libgps you have. Getting some errors from the latest (version 10.0).

albar965 commented 3 years ago

I disable libgps on build. LNM does not need it. I'm using the command line below to configure for a release build:

cd $APROJECTS/build-marble-release

cmake -DCMAKE_BUILD_TYPE=Release -DSTATIC_BUILD=TRUE -DQTONLY=TRUE -DBUILD_MARBLE_EXAMPLES=NO -DBUILD_INHIBIT_SCREENSAVER_PLUGIN=NO -DBUILD_MARBLE_APPS=NO -DBUILD_MARBLE_EXAMPLES=NO -DBUILD_MARBLE_TESTS=NO -DBUILD_MARBLE_TOOLS=NO -DBUILD_TESTING=NO -DBUILD_WITH_DBUS=NO -DMARBLE_EMPTY_MAPTHEME=YES -DMOBILE=NO -DWITH_DESIGNER_PLUGIN=NO -DWITH_Phonon=NO -DWITH_Qt5Location=NO -DWITH_Qt5Positioning=NO -DWITH_Qt5SerialPort=NO -DWITH_ZLIB=NO -DWITH_libgps=NO -DWITH_libshp=NO -DWITH_libwlocate=NO -DCMAKE_INSTALL_PREFIX=$APROJECTS/Marble-release -DEXEC_INSTALL_PREFIX=$APROJECTS/Marble-release -DCMAKE_PREFIX_PATH=/home/alex/Qt/5.12.9/gcc_64/ ../marble/