Version: trunk rev 1067146 (using Devel) Compiler: cmake version 2.6-patch 4 OS: Linux Installed from: Compiled sources I'm on Fedora 12 and building kdeedu from svn-trunk. While building kdeedu today, built failed with [100%] Built target GpsdPositionProviderPlugin_automoc [100%] Building CXX object marble/src/plugins/positionprovider/gpsd/CMakeFiles/GpsdPositionProviderPlugin.dir/GpsdConnection.o /home/kde-devel/kde/src/trunk/KDE/kdeedu/marble/src/plugins/positionprovider/gpsd/GpsdConnection.cpp: In constructor 'Marble::GpsdConnection::GpsdConnection(QObject*)': /home/kde-devel/kde/src/trunk/KDE/kdeedu/marble/src/plugins/positionprovider/gpsd/GpsdConnection.cpp:29: error: 'class gpsmm' has no member named 'stream' /home/kde-devel/kde/src/trunk/KDE/kdeedu/marble/src/plugins/positionprovider/gpsd/GpsdConnection.cpp:29: error: 'WATCH_ENABLE' was not declared in this scope /home/kde-devel/kde/src/trunk/KDE/kdeedu/marble/src/plugins/positionprovider/gpsd/GpsdConnection.cpp: In member function 'void Marble::GpsdConnection::update()': /home/kde-devel/kde/src/trunk/KDE/kdeedu/marble/src/plugins/positionprovider/gpsd/GpsdConnection.cpp:43: error: 'POLICY_SET' was not declared in this scope make[2]: *** [marble/src/plugins/positionprovider/gpsd/CMakeFiles/GpsdPositionProviderPlugin.dir/GpsdConnection.o] Error 1 The class gpsmm has a member "stream" since version 2.90, but not in the version 2.39 that I have installed. A proper check has to be made before compiling. cmake for kdeedu always shows "-- Building with gpsd position provider" even if I don't have gpsd-devel installed (then the build fails while including non-existent libgpsmm.h).
Created attachment 39424 [details] Increment needed version of gpsd for cmake check The Problem with gpsd being found even when it is not installed at all went away after starting again with fresh sources. But still 2.35 is sufficient for the check although 2.90 seems to be needed. I attached a patch to check for libgps>=2.90 instead of >=2.35.
The problem is that the check for the api version in /kdeedu/marble/src/plugins/positionprovider/gpsd/GpsdConnection.cpp is not correct. in gps.h #define GPSD_API_MAJOR_VERSION 3 /* bump on incompatible changes */ #define GPSD_API_MINOR_VERSION 1 /* bump on compatible changes */ appears first in 2.39 and is unchanged in 2.90. So this is no proper way to distinguish 2.39 from 2.90 and build fails with 2.39.
Same for marble in subversion and libgps from Kubuntu. The test in GpsdConnection.cpp should not rely on GPSD_API_MAJOR_VERSION, but check whether e.g. WATCH_ENABLE or POLICY_SET are available.
SVN commit 1068583 by nienhueser: Fix compiliatin for libgps < 2.90. libgps sets GPSD_API_MAJOR_VERSION=3 for both version 2.3x and 2.90. Check whether WATCH_ENABLE and POLICY_SET are defined to distinguish both. BUG: 220489 M +2 -2 GpsdConnection.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=1068583