Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 696800 - sci-geosciences/gpsd-3.19 - driver_ubx.c:796:33: error: 'struct gps_context_t' has no member named 'leap_notify'
Summary: sci-geosciences/gpsd-3.19 - driver_ubx.c:796:33: error: 'struct gps_context_t...
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: Sci-geo Project
Depends on:
Reported: 2019-10-05 18:03 UTC by John Bowler
Modified: 2021-08-09 23:51 UTC (History)
6 users (show)

See Also:
Package list:
Runtime testing required: ---

emerge --info '=sci-geosciences/gpsd-3.19::gentoo' output (emerge--info.gpsd-3.19.txt,7.23 KB, text/plain)
2019-10-05 18:03 UTC, John Bowler
emerge -pqv '=sci-geosciences/gpsd-3.19::gentoo' output (emerge-gpsd-3.1.9-environment.txt,164.58 KB, text/plain)
2019-10-05 18:07 UTC, John Bowler
emerge -pqv '=sci-geosciences/gpsd-3.19::gentoo' output (emerge-pqv-gpsd-3.19.txt,458 bytes, text/plain)
2019-10-05 18:08 UTC, John Bowler
'/var/tmp/portage/sci-geosciences/gpsd-3.19/temp/environment' (emerge-gpsd-3.1.9-environment.txt,164.58 KB, text/plain)
2019-10-05 18:10 UTC, John Bowler
build.log (emerge-gpsd-3.1.9-build.log,57.63 KB, text/plain)
2019-10-05 18:12 UTC, John Bowler

Note You need to log in before you can comment on or make changes to this bug.
Description John Bowler 2019-10-05 18:03:49 UTC
Created attachment 591912 [details]
emerge --info '=sci-geosciences/gpsd-3.19::gentoo' output

The UBlox driver (driver_ubx.c) fails to compile when the configuration #define TIMEHINT_ENABLE is *not* set.  The code uses gps_context_t::leap_notify and the various LEAP_* #defines even though they are protected by TIMEHINT_ENABLE in gpsd.h.

Apparently the other drivers all have appropriate support for TIMEHINT_ENABLE.

Since I don't know what changed; I don't know why TIMEHINT_ENABLE is not defined, since it seems like the leap second handling should be turned on if available, I just disabled the UBlox driver and gpsd_protocals_isync (which depends on it) using the following in package.use:

=sci-geosciences/gpsd-3.19     -gpsd_protocols_ublox -gpsd_protocols_isync
Comment 1 John Bowler 2019-10-05 18:07:53 UTC
Created attachment 591914 [details]
emerge -pqv '=sci-geosciences/gpsd-3.19::gentoo' output
Comment 2 John Bowler 2019-10-05 18:08:59 UTC
Created attachment 591916 [details]
emerge -pqv '=sci-geosciences/gpsd-3.19::gentoo' output
Comment 3 John Bowler 2019-10-05 18:10:07 UTC
Created attachment 591918 [details]
Comment 4 John Bowler 2019-10-05 18:12:02 UTC
Created attachment 591920 [details]
Comment 5 John Bowler 2019-10-05 18:14:15 UTC
Since that build.log is from make --jobs these are the first couple of error lines:

driver_ubx.c: In function 'ubx_msg_nav_timels':
driver_ubx.c:796:33: error: 'struct gps_context_t' has no member named 'leap_notify'
  796 |                 session->context->leap_notify = LEAP_ADDSECOND;
      |                                 ^~
driver_ubx.c:796:49: error: 'LEAP_ADDSECOND' undeclared (first use in this function)
  796 |                 session->context->leap_notify = LEAP_ADDSECOND;
      |                                                 ^~~~~~~~~~~~~~
Comment 6 Sandi (Sandy) Vujaković 2019-10-06 21:28:29 UTC
I concur that the issue is present and that the workaround presented above works.
Comment 7 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2019-12-30 22:42:43 UTC
TIMEHINT_ENABLE is hidden by the NTPSHM option. 

If USE=-ntp, then TIMEHINT_ENABLE is not set. I'll work on a patch for upstream.
Comment 8 Dennis Schridde 2020-01-27 21:23:36 UTC
(In reply to John Bowler from comment #0)
> =sci-geosciences/gpsd-3.19     -gpsd_protocols_ublox -gpsd_protocols_isync

Workaround makes gpsd-3.19 build here.  Thanks!
Comment 9 James Browning 2020-08-09 14:31:58 UTC
This seems to be fixed upstream as of 3.20
Comment 10 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-08-09 23:51:49 UTC
(In reply to James Browning from comment #9)
> This seems to be fixed upstream as of 3.20