Dear Maintainer,
I tried to gather some more information to this issue and
found below difference [1] [2] in sizes of struct gps_data_t,
by inspecting a running process in different stack frames.
Also I found that the current navit 0.5.3+dfsg.1-2+b1 was
built against libgps-dev 3.19-2 [6].
The current libgps-dev 3.20-1 seems to have added members
to struct gps_data_t [4] [7].
Additionally the timespec_t members differ in size.
Unfortunately I was not able to rebuild navit in a
minimal bullseye VM because of this error [5].
Therefore I guess ABI got broken
between libgps25 3.19-3 and 3.20-1?
When repeating the test with libgps25 3.19-3 [8] installed,
the struct sizes match and no differenences in
gdb's ptype output exist.
Kind regards,
Bernhard
[1]
Breakpoint 1, gps_open (host=host@entry=0x5555556bc137 "localhost", port=0x0,
gpsdata=0x5555556d4a50) at libgps_core.c:73
73 if (!gpsdata)
(gdb) print sizeof(struct gps_data_t)
$3 = 24008
[2]
#1 0x00007ffff56555c3 in vehicle_gpsd_try_open
(priv=priv@entry=0x55555568f510) at ./navit/vehicle/gpsd/vehicle_gpsd.c:225
225 if (gps_open(source + 7, port, priv->gps)) {
(gdb) print sizeof(struct gps_data_t)
$6 = 20800
$ diff -ty /tmp/libgps25-ptype-struct-gps_data_t.txt
/tmp/navit-ptype-struct-gps_data_t.txt | head -n 20
/* offset | size */ type = struct gps_data_t { /* offset
| size */ type = struct gps_data_t {
/* 0 | 8 */ gps_mask_t set; /* 0
| 8 */ gps_mask_t set;
/* 8 | 16 */ timespec_t online; | /* 8
| 8 */ timestamp_t online; <<< [3] different size
/* 24 | 4 */ socket_t gps_fd; | /* 16
| 4 */ socket_t gps_fd;
/* XXX 4-byte hole */ /* XXX
4-byte hole */
...
/* 96 | 8 */ double altitude; | /* 80
| 8 */ double altitude;
/* 104 | 8 */ double altHAE; | /* 88
| 8 */ double epv; <<< [4] new member
...
[5]
<<PKGBUILDDIR>>/navit/vehicle/gpsd/vehicle_gpsd.c: In function
‘vehicle_gpsd_callback’:
<<PKGBUILDDIR>>/navit/vehicle/gpsd/vehicle_gpsd.c:177:26: error: incompatible
types when assigning to type ‘time_t’ {aka ‘long int’} from type ‘timespec_t’
{aka ‘struct timespec’}
177 | priv->fix_time = data->fix.time;
| ^~~~
[6]
https://buildd.debian.org/status/fetch.php?pkg=navit&arch=amd64&ver=0.5.3%2Bdfsg.1-2%2Bb1&stamp=1571055435&raw=0
[7]
https://sources.debian.org/src/gpsd/3.19-2%7Ebpo10+1/gps.h/#L97
https://sources.debian.org/src/gpsd/3.20-1/gps.h/#L123
[8]
https://snapshot.debian.org/package/gpsd/3.19-3/