log: geoclue-gpsd.c:43:27: error: ‘gps_data’ redeclared as different kind of symbol /usr/include/gps.h:1713:35: note: previous declaration of ‘gps_data’ was here geoclue-gpsd.c: In function ‘geoclue_gpsd_start_gpsd’: geoclue-gpsd.c:400:2: error: too few arguments to function ‘gps_open’ /usr/include/gps.h:1705:12: note: declared here geoclue-gpsd.c:402:57: error: ‘POLL_NONBLOCK’ undeclared (first use in this function) geoclue-gpsd.c:402:57: note: each undeclared identifier is reported only once for each function it appears in geoclue-gpsd.c:403:3: error: implicit declaration of function ‘gps_set_raw_hook’ [-Werror=implicit-function-declaratio geoclue-gpsd.c: In function ‘gpsd_poll’: geoclue-gpsd.c:416:3: error: implicit declaration of function ‘gps_poll’ [-Werror=implicit-function-declaration] cc1: all warnings being treated as errors packages: gcc 4.6.1 gpsd 3.1.1 geoclue-git Linux 3.0-ARCH i686 other: I spoke to lind-@irc.freenode.net/gpsd who suggested the implementation http://lindi.iki.fi/lindi/gpsd/gpsd-test3.c might be better than parsing nmea strings (though there might be a reason to insist on nmea) ... (geoclue-gpsd.c) gps_stream(self->gpsdata, WATCH_ENABLE | WATCH_NMEA | POLL_NONBLOCK, NULL); gps_set_raw_hook (self->gpsdata, gpsd_raw_hook); ... Whatever the case, fixing this is probably more complex than drop-in replacements, so filing here.
Parsing NMEA strings is definitely the wrong way. IMHO the whole gpsd provider needs to be rewritten from scratch. lindi's implementation is not uptodate for API v5 anymore, too. gps_poll is gone for good.
Created attachment 54418 [details] [review] Transition to use of new libgps API I hit this bug whilst transitioning packages to the new libgps API. The attached patch refactors the codebase to support the new API whilst maintaining backwards compatibility.
Looking at the patch I'd think it should work, I'll give it a try later. But on the long run the whole code should be rewritten to avoid parsing NMEA strings as this is prone to errors. Just take the code as suggested in comment #1
(In reply to comment #3) > Looking at the patch I'd think it should work, I'll give it a try later. > > But on the long run the whole code should be rewritten to avoid parsing NMEA > strings as this is prone to errors. Just take the code as suggested in comment > #1 actually not in the comment but in the bug report... http://lindi.iki.fi/lindi/gpsd/gpsd-test3.c
Closing all bugs on old geoclue. If your bug still applies to new geoclue, please do re-open, I really don't have time to go through each and every bug and evaluate separately. :( Apologies for any inconvenience caused by this change.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.