Bug 269165 - [Patch] kdeedu-marble doesn't build with gpsd 2.96
Summary: [Patch] kdeedu-marble doesn't build with gpsd 2.96
Status: RESOLVED FIXED
Alias: None
Product: marble
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Arch Linux Linux
: NOR normal
Target Milestone: 1.0 (KDE 4.6)
Assignee: marble-bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-22 18:53 UTC by Andrea Scarpino
Modified: 2011-09-17 12:20 UTC (History)
9 users (show)

See Also:
Latest Commit:
Version Fixed In: 1.2.2 (KDE 4.7.2)
Sentry Crash Report:


Attachments
marble patch, to accomodate for the sillyness in gpsd-2.96 (1.61 KB, patch)
2011-04-12 05:26 UTC, Vincent Batts
Details
buildfix against gpsd-3.0 (1.63 KB, patch)
2011-08-24 20:07 UTC, Rex Dieter
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrea Scarpino 2011-03-22 18:53:53 UTC
Version:           unspecified (using KDE 4.6.1) 
OS:                Linux

Marble fails to build with gpsd 2.96, output:


Scanning dependencies of target plasma_applet_worldclock                                                                                                                    
[ 73%] Building CXX object marble/src/plasmoid/CMakeFiles/plasma_applet_worldclock.dir/plasma_applet_worldclock_automoc.o                                                   
[ 73%] Building CXX object marble/src/plasmoid/CMakeFiles/plasma_applet_worldclock.dir/worldclock.o                                                                         
[ 73%] Built target YoursPlugin                                                                                                                                             
[ 73%] Building CXX object marble/src/plugins/positionprovider/gpsd/CMakeFiles/GpsdPositionProviderPlugin.dir/GpsdPositionProviderPlugin.o
[ 73%] Building CXX object marble/src/plugins/runner/monav/CMakeFiles/MonavPlugin.dir/MonavPlugin.o                                                                         
[ 73%] Building CXX object marble/src/plugins/network/qnam/CMakeFiles/QNamNetworkPlugin.dir/QNamNetworkPlugin.o                                                             
/build/src/kdeedu-4.6.1/marble/src/plugins/positionprovider/gpsd/GpsdConnection.cpp: In constructor 'Marble::GpsdConnection::GpsdConnection(QObject*)':                     
/build/src/kdeedu-4.6.1/marble/src/plugins/positionprovider/gpsd/GpsdConnection.cpp:23:18: error: no matching function for call to 'gpsmm::gpsmm()'
/usr/include/libgpsmm.h:21:3: note: candidates are: gpsmm::gpsmm(const char*, const char*)
/usr/include/libgpsmm.h:15:13: note:                 gpsmm::gpsmm(const gpsmm&)
/build/src/kdeedu-4.6.1/marble/src/plugins/positionprovider/gpsd/GpsdConnection.cpp: In member function 'void Marble::GpsdConnection::initialize()':
/build/src/kdeedu-4.6.1/marble/src/plugins/positionprovider/gpsd/GpsdConnection.cpp:38:31: error: 'class gpsmm' has no member named 'open'
/build/src/kdeedu-4.6.1/marble/src/plugins/positionprovider/gpsd/GpsdConnection.cpp: In member function 'void Marble::GpsdConnection::update()':
/build/src/kdeedu-4.6.1/marble/src/plugins/positionprovider/gpsd/GpsdConnection.cpp:85:25: error: no matching function for call to 'gpsmm::waiting()'
/usr/include/libgpsmm.h:36:8: note: candidate is: bool gpsmm::waiting(int)
/build/src/kdeedu-4.6.1/marble/src/plugins/positionprovider/gpsd/GpsdConnection.cpp:86:35: error: 'class gpsmm' has no member named 'poll'
make[2]: *** [marble/src/plugins/positionprovider/gpsd/CMakeFiles/GpsdPositionProviderPlugin.dir/GpsdConnection.o] Error 1
make[2]: *** Waiting for unfinished jobs....
[ 73%] Building CXX object marble/src/plasmoid/CMakeFiles/plasma_applet_worldclock.dir/qrc_marble.o
make[1]: *** [marble/src/plugins/positionprovider/gpsd/CMakeFiles/GpsdPositionProviderPlugin.dir/all] Error 2                                                               
make[1]: *** Waiting for unfinished jobs....
[ 73%] Building CXX object marble/src/plugins/runner/monav/CMakeFiles/MonavPlugin.dir/MonavMap.o
[ 73%] Linking CXX shared module ../../../../../lib/QNamNetworkPlugin.so                                                                                                    
Building CXX object marble/src/plugins/runner/monav/CMakeFiles/MonavPlugin.dir/MonavMapsModel.o                                                                             
[ 73%] Built target QNamNetworkPlugin                                                                                                                                       
[ 73%] Building CXX object marble/src/plugins/runner/monav/CMakeFiles/MonavPlugin.dir/MonavConfigWidget.o
[ 73%] Building CXX object marble/src/plugins/runner/monav/CMakeFiles/MonavPlugin.dir/qrc_monav.o                                                                           
Linking CXX shared module ../../../lib/plasma_applet_worldclock.so                                                                                                          
[ 73%] Built target plasma_applet_worldclock                                                                                                                                
Linking CXX shared module ../../../../../lib/MonavPlugin.so
[ 73%] Built target MonavPlugin                                                                                                                                             
make: *** [all] Error 2

Reproducible: Always
Comment 1 Vincent Batts 2011-04-12 05:26:00 UTC
Created attachment 58819 [details]
marble patch, to accomodate for the sillyness in gpsd-2.96
Comment 2 Vincent Batts 2011-04-12 05:26:19 UTC
I've confirmed the same issue on KDE-4.5.5.

The gpsd version 2.95 works just fine. That project made some fundamental changes in the version bump to version 2.96, like straight removing the open() member of the gpsmm class and a couple of other such things.

Attached is a patch that should apply to 4.6.1 and newer, and still allow gpsd 2.95 to compile.
Comment 3 Dennis Nienhüser 2011-04-27 08:40:23 UTC
Hey Vincent, thanks for the patch. I'll try to get a hold on gpsd 2.96 and test it. These API changes are cumbersome.
Comment 4 Andrea Scarpino 2011-04-28 13:07:41 UTC
Hi Vincent, I applied your patch to marble 4.6.2, but it doesn't work.
When I choice gpsd under "Position Tracking" I get:
"Error when determining current location: Unknown error when opening gpsd connection".

Using xgps or qlandkartegt everything work.

KDE 4.6.2
kdeedu-marble 4.6.2
gpsd 2.96
Comment 5 meyerm 2011-06-11 22:53:49 UTC
Still valid for marble-4.6.4
Comment 6 Geoff Madden 2011-07-12 11:09:33 UTC
still valid for 4.6.5   When is this problem going away ??????
Comment 7 Vincent Batts 2011-08-23 02:10:50 UTC
This is frustrating indeed. These API changes make it difficult to work around. It is tempting to set a sticky dependency on the 2.95 version of gpsd, because they've stated in their goals, that the API will continue to change in drastic ways as they approach 3.0

I've put 5-10hrs into working on a patch for this, and still have nothing good to show for it. I even tried working with the gps.h, instead of their C++ implementation. Same results.

Anyone else one to try their hand at a fix?
Comment 8 Geoff Madden 2011-08-23 10:18:12 UTC
Hi Vincent,I can confirm that the problem has been fixed as far as 4.7.0 is concerned,on Gentoo.
Previously I had applied tha patch,with modded headers to versions 4.6.2 4.6.3 & 4.6.4 all successful,I automatically applied the patch to 4.7.0 which complained and fell over. By removing the patch from the files dir and doing a resync and recompile no problems,I dont specifically call gpsd nor do I use position reporting under Marble,It is used by Xastir but there are no problems with the running of this program
Comment 9 Andreas K. Huettel 2011-08-23 11:20:35 UTC
(In reply to comment #8)
> Hi Vincent,I can confirm that the problem has been fixed as far as 4.7.0 is
> concerned,on Gentoo.

No. Gentoo kde team here. The patch should not have been applied in Gentoo, that was an oversight. It only fixes compilation, but the resulting binary does not work properly with gpsd-2.96. :(
Comment 10 Vincent Batts 2011-08-23 12:44:40 UTC
besides having hot-new-stuff, is there a particular reason to move to gpsd-2.96?
Comment 11 Andrea Scarpino 2011-08-23 15:07:29 UTC
(In reply to comment #10)
> besides having hot-new-stuff, is there a particular reason to move to
> gpsd-2.96?
In Arch Linux we already are using the 3.0 released some day ago with systemd support[1]

[1] http://lists.berlios.de/pipermail/gpsd-dev/2011-April/009309.html
Comment 12 Vincent Batts 2011-08-23 15:32:39 UTC
WOOT. Let me get to testing this. I'll post back here shortly.
Comment 13 Geoff Madden 2011-08-24 05:46:59 UTC
(In reply to comment #12)
> WOOT. Let me get to testing this. I'll post back here shortly.

I'm having trouble getting this patch/diff from comment10 to do anything.
do you know which files it refers to ?? ,I'm currently trying it on gpsd-2.96 from my mirror, or is it a case of retrieving version 3 from git
Geoff
Comment 14 Rex Dieter 2011-08-24 20:06:19 UTC
confirmed patch works as advertised, attaching one that applies against master/kde-4.7
Comment 15 Rex Dieter 2011-08-24 20:07:26 UTC
Created attachment 63128 [details]
buildfix against gpsd-3.0
Comment 16 Ismail Donmez 2011-08-31 11:33:40 UTC
Buildfix is fine but does it actually work? Did anyone test on a machine with GPS?
Comment 17 Christoph Feck 2011-09-16 00:59:55 UTC
Patch fails to apply on master.
Comment 18 Dennis Nienhüser 2011-09-17 12:06:37 UTC
Git commit 9aa0e1e73301ec58210988732de78f17798dc1ef by Dennis Nienhüser.
Committed on 17/09/2011 at 13:54.
Pushed by nienhueser into branch 'master'.

Support gpsd 2.96 and 3.1.

Patch based on Vincent Batts patch submitted in bug 269165, thanks!
Tested with gpsd 2.96 (berlios tarball), gpsd 3.1 (berlios tarball)
and 2.95 (ubuntu package).
BUG: 269165

M  +15   -1    src/plugins/positionprovider/gpsd/GpsdConnection.cpp

http://commits.kde.org/marble/9aa0e1e73301ec58210988732de78f17798dc1ef
Comment 19 Dennis Nienhüser 2011-09-17 12:15:55 UTC
Git commit 7fd1dd92e421ca6e0b8755a9aa2e47b5fa8c3ac0 by Dennis Nienhüser.
Committed on 17/09/2011 at 13:54.
Pushed by nienhueser into branch 'kde-4.7'.

Support gpsd 2.96 and 3.1.

Patch based on Vincent Batts patch submitted in bug 269165, thanks!
Tested with gpsd 2.96 (berlios tarball), gpsd 3.1 (berlios tarball)
and 2.95 (ubuntu package).
CCBUG: 269165
FIXED-IN: KDE-4.7.2/Marble-1.2.2
(cherry picked from commit 9aa0e1e73301ec58210988732de78f17798dc1ef)

M  +15   -1    src/plugins/positionprovider/gpsd/GpsdConnection.cpp

http://commits.kde.org/marble/7fd1dd92e421ca6e0b8755a9aa2e47b5fa8c3ac0