Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 696800

Summary: sci-geosciences/gpsd-3.19 - driver_ubx.c:796:33: error: 'struct gps_context_t' has no member named 'leap_notify'
Product: Gentoo Linux Reporter: John Bowler <jbowler>
Component: Current packagesAssignee: Sci-geo Project <sci-geosciences>
Status: RESOLVED UPSTREAM    
Severity: normal CC: dennis.lissov, dschridde+gentoobugs, maintainer-needed, phobosk, treecleaner, whissi
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: emerge --info '=sci-geosciences/gpsd-3.19::gentoo' output
emerge -pqv '=sci-geosciences/gpsd-3.19::gentoo' output
emerge -pqv '=sci-geosciences/gpsd-3.19::gentoo' output
'/var/tmp/portage/sci-geosciences/gpsd-3.19/temp/environment'
build.log

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]
'/var/tmp/portage/sci-geosciences/gpsd-3.19/temp/environment'
Comment 4 John Bowler 2019-10-05 18:12:02 UTC
Created attachment 591920 [details]
build.log
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

Thanks!