Bug#949214: Bug#948388: navit: fails to connect to gpsd
Control: merge 948388 949214 Hi Mattia, thanks for the official FTBS report. It appears this issue has already been reported in #948388 so I'm merging the 2 bugs. if you don't mind. Hi guys, thanks for the report, investigation and patching. On Fri, Jan 17, 2020 at 5:18 PM Peter Green wrote: > I just took what has been discussed into this > bugreport so-far and put it all together into a > debdiff. If I get confirmation from users that the > resulting package works and noone objects to me > doing so I will likely NMU this later. No need for an NMU. I'll coordinate the change with upstream to make sure we're not missing anything with this patch and do an upload over the weekend. Thanks for your help! Joseph
Bug#948388: navit: fails to connect to gpsd
tags 948388 +patch thanks yes, your fix is correct, just needs a ckeck if the api version is >= 9. Makes sense. Maybe better would be to add following to navit to allow building while qtbase5-dev is installed. Building that way produces equal .deb packages. Seems very sensible to me, it's not good for users to run into strange failures when they try to work on a package. I just took what has been discussed into this bugreport so-far and put it all together into a debdiff. If I get confirmation from users that the resulting package works and noone objects to me doing so I will likely NMU this later. diff -Nru navit-0.5.3+dfsg.1/debian/changelog navit-0.5.3+dfsg.1/debian/changelog --- navit-0.5.3+dfsg.1/debian/changelog 2019-08-12 10:36:32.0 + +++ navit-0.5.3+dfsg.1/debian/changelog 2020-01-18 00:37:31.0 + @@ -1,3 +1,14 @@ +navit (0.5.3+dfsg.1-2.1) unstable; urgency=medium + + * Non-maintainer upload. + * Fix FTBFS with new gpsd (Closes: 948388) +(thanks to Bernhard Übelacker for the basic fix, and Bernd Zeimetz for +suggesting putting it behind a version check). + * Explicitly disable QT, to fix FTBFS when qtbase5-dev is installed. +(thanks to Bernhard Übelacker for the fix) + + -- Peter Michael Green Sat, 18 Jan 2020 00:37:31 + + navit (0.5.3+dfsg.1-2) unstable; urgency=medium * New patch gpsd-7.patch to support the new gps_read implementation diff -Nru navit-0.5.3+dfsg.1/debian/patches/gpsd-9.patch navit-0.5.3+dfsg.1/debian/patches/gpsd-9.patch --- navit-0.5.3+dfsg.1/debian/patches/gpsd-9.patch 1970-01-01 00:00:00.0 + +++ navit-0.5.3+dfsg.1/debian/patches/gpsd-9.patch 2020-01-18 00:37:31.0 + @@ -0,0 +1,20 @@ +Description: Update for change in gpsd api 9 + thanks to Bernhard Übelacker for the basic fix, and Bernd Zeimetz for + suggesting putting it behind a version check. +Author: Peter Michael Green +Bug-Debian: https://bugs.debian.org/948388 + +--- navit-0.5.3+dfsg.1.orig/navit/vehicle/gpsd/vehicle_gpsd.c navit-0.5.3+dfsg.1/navit/vehicle/gpsd/vehicle_gpsd.c +@@ -174,7 +174,11 @@ vehicle_gpsd_callback(struct gps_data_t + data->set &= ~MODE_SET; + } + if (data->set & TIME_SET) { ++#if GPSD_API_MAJOR_VERSION >= 9 ++priv->fix_time = data->fix.time.tv_sec; ++#else + priv->fix_time = data->fix.time; ++#endif + data->set &= ~TIME_SET; + } + #ifdef HAVE_LIBGPS19 diff -Nru navit-0.5.3+dfsg.1/debian/patches/series navit-0.5.3+dfsg.1/debian/patches/series --- navit-0.5.3+dfsg.1/debian/patches/series2019-08-12 10:36:04.0 + +++ navit-0.5.3+dfsg.1/debian/patches/series2020-01-18 00:37:31.0 + @@ -1,3 +1,4 @@ path_max dpkg-cross.patch gpsd-7.patch +gpsd-9.patch diff -Nru navit-0.5.3+dfsg.1/debian/rules navit-0.5.3+dfsg.1/debian/rules --- navit-0.5.3+dfsg.1/debian/rules 2018-09-01 10:16:52.0 + +++ navit-0.5.3+dfsg.1/debian/rules 2020-01-18 00:37:31.0 + @@ -75,6 +75,9 @@ # Enable libspeechd CMAKEFLAGS += -Dspeech/speech_dispatcher=TRUE +# Disable Qt explicitly to allow building while qtbase5-dev is installed +CMAKEFLAGS += -DDISABLE_QT=TRUE + # Avoid floating point calculation for armel ifeq ($(DEB_HOST_ARCH), armel) CMAKEFLAGS += -DAVOID_FLOAT=TRUE
Bug#948388: navit: fails to connect to gpsd
Hello Bernd, I could further isolate the cmake failing issue. It starts failing when the package qtbase5-dev is installed. This gets installed as build dependency for libgps26. A workaround would be to temporarily uninstall qtbase5-dev. Maybe better would be to add following to navit to allow building while qtbase5-dev is installed. Building that way produces equal .deb packages. Kind regards, Bernhard --- navit-0.5.3+dfsg.1.orig/debian/rules2018-09-01 12:16:52.0 +0200 +++ navit-0.5.3+dfsg.1/debian/rules2020-01-15 23:57:58.840074000 +0100 @@ -75,6 +75,9 @@ CMAKEFLAGS += -Dsupport/shapefile=TRUE # Enable libspeechd CMAKEFLAGS += -Dspeech/speech_dispatcher=TRUE +# Disable Qt explicitly to allow building while qtbase5-dev is installed +CMAKEFLAGS += -DDISABLE_QT=TRUE + # Avoid floating point calculation for armel ifeq ($(DEB_HOST_ARCH), armel) CMAKEFLAGS += -DAVOID_FLOAT=TRUE
Bug#948388: navit: fails to connect to gpsd
Hi Bernhard, yes, your fix is correct, just needs a ckeck if the api version is >= 9. But unfortunately cmake fails here, and I was not able to figure out why... Otherwise I would have created a patch already. Bernd On 2020-01-15 12:07, Bernhard Übelacker wrote: Hello Bernd, my navit know-how is also limited, but I remebered I saw this while having build-deps of navit and libgps installed. Below are the packages which got installed additionally in a minimal test VM on top of navit's build-deps. If there are just build-deps's of navit installed the build runs fine until the compile error given in message 18. For this I made this (to be checked) change: -priv->fix_time = data->fix.time; +priv->fix_time = data->fix.time.tv_sec; Kind regards, Bernhard apt build-dep libgps26 asciidoc asciidoc-base asciidoc-common bc dh-apparmor dh-buildinfo dh-exec dh-python docbook-xml docbook-xsl libbluetooth-dev libbluetooth3 libdouble-conversion3 libegl-dev libegl-mesa0 libegl1 libevdev2 libgbm1 libgudev-1.0-0 libinput-bin libinput10 libmtdev1 libncurses-dev libpython3-all-dbg libpython3-all-dev libpython3-dbg libpython3-dev libpython3.7-dbg libpython3.7-dev libpython3.8 libpython3.8-dbg libpython3.8-dev libpython3.8-minimal libpython3.8-stdlib libqt5concurrent5 libqt5core5a libqt5dbus5 libqt5gui5 libqt5network5 libqt5printsupport5 libqt5sql5 libqt5test5 libqt5widgets5 libqt5xml5 libusb-1.0-0-dev libvulkan-dev libvulkan1 libwacom-common libwacom2 libwayland-client0 libwayland-server0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-shape0 libxcb-util0 libxcb-xfixes0 libxcb-xinerama0 libxcb-xinput0 libxcb-xkb1 libxkbcommon-x11-0 libxkbcommon0 libxslt1.1 makedev pps-tools python3-all python3-all-dbg python3-all-dev python3-dbg python3-dev python3.7-dbg python3.7-dev python3.8 python3.8-dbg python3.8-dev python3.8-minimal qt5-qmake qt5-qmake-bin qtbase5-dev qtbase5-dev-tools qtchooser scons sgml-base sgml-data xml-core xsltproc -- Bernd ZeimetzDebian GNU/Linux Developer http://bzed.dehttp://www.debian.org GPG Fingerprint: ECA1 E3F2 8E11 2432 D485 DD95 EB36 171A 6FF9 435F
Bug#948388: navit: fails to connect to gpsd
Hello Bernd, my navit know-how is also limited, but I remebered I saw this while having build-deps of navit and libgps installed. Below are the packages which got installed additionally in a minimal test VM on top of navit's build-deps. If there are just build-deps's of navit installed the build runs fine until the compile error given in message 18. For this I made this (to be checked) change: -priv->fix_time = data->fix.time; +priv->fix_time = data->fix.time.tv_sec; Kind regards, Bernhard apt build-dep libgps26 asciidoc asciidoc-base asciidoc-common bc dh-apparmor dh-buildinfo dh-exec dh-python docbook-xml docbook-xsl libbluetooth-dev libbluetooth3 libdouble-conversion3 libegl-dev libegl-mesa0 libegl1 libevdev2 libgbm1 libgudev-1.0-0 libinput-bin libinput10 libmtdev1 libncurses-dev libpython3-all-dbg libpython3-all-dev libpython3-dbg libpython3-dev libpython3.7-dbg libpython3.7-dev libpython3.8 libpython3.8-dbg libpython3.8-dev libpython3.8-minimal libpython3.8-stdlib libqt5concurrent5 libqt5core5a libqt5dbus5 libqt5gui5 libqt5network5 libqt5printsupport5 libqt5sql5 libqt5test5 libqt5widgets5 libqt5xml5 libusb-1.0-0-dev libvulkan-dev libvulkan1 libwacom-common libwacom2 libwayland-client0 libwayland-server0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-shape0 libxcb-util0 libxcb-xfixes0 libxcb-xinerama0 libxcb-xinput0 libxcb-xkb1 libxkbcommon-x11-0 libxkbcommon0 libxslt1.1 makedev pps-tools python3-all python3-all-dbg python3-all-dev python3-dbg python3-dev python3.7-dbg python3.7-dev python3.8 python3.8-dbg python3.8-dev python3.8-minimal qt5-qmake qt5-qmake-bin qtbase5-dev qtbase5-dev-tools qtchooser scons sgml-base sgml-data xml-core xsltproc
Bug#948388: navit: fails to connect to gpsd
Hi, On 1/9/20 12:43 AM, Paul Wise wrote: > On Wed, 2020-01-08 at 23:45 +0100, Bernd Zeimetz wrote: > >> If necessary I can upload 3.19 to unstable again as 3.20-1+3.19 or so. > > Personally, I think just go ahead with the transition, inform the > release team of the ABI break and file the needed FTBFS RC bugs. that happened. I've tried to rebuild navit, but the current version FTBFS for me, it fails to link libpthreads (with s..). Somebody with more navit know-how needs to fix that, then I'm happy to help with the gpsd api changes. Bernd -- Bernd ZeimetzDebian GNU/Linux Developer http://bzed.dehttp://www.debian.org GPG Fingerprint: ECA1 E3F2 8E11 2432 D485 DD95 EB36 171A 6FF9 435F
Bug#948388: navit: fails to connect to gpsd
On Wed, 2020-01-08 at 23:45 +0100, Bernd Zeimetz wrote: > If necessary I can upload 3.19 to unstable again as 3.20-1+3.19 or so. Personally, I think just go ahead with the transition, inform the release team of the ABI break and file the needed FTBFS RC bugs. -- bye, pabs https://wiki.debian.org/PaulWise signature.asc Description: This is a digitally signed message part
Bug#948388: navit: fails to connect to gpsd
Hi, thanks for your debugging! The soname bump was just forgotten by upstream and I did not check the gory details of all the structs. Usually gpsd upstream does the right thing. Building a new package right now, has to go trough new unfortunately. If necessary I can upload 3.19 to unstable again as 3.20-1+3.19 or so. Please let me know. Bernd On 1/8/20 11:28 PM, Bernhard Übelacker wrote: > Sorry, forgot to attach details. > -- Bernd ZeimetzDebian GNU/Linux Developer http://bzed.dehttp://www.debian.org GPG Fingerprint: ECA1 E3F2 8E11 2432 D485 DD95 EB36 171A 6FF9 435F
Bug#948388: navit: fails to connect to gpsd
Sorry, forgot to attach details. # Bullseye/testing amd64 qemu VM 2020-01-08 apt update apt dist-upgrade apt install systemd-coredump xserver-xorg sddm openbox xterm net-tools mc fakeroot gdb navit navit-dbgsym libgps25-dbgsym apt build-dep navit reboot mkdir /home/benutzer/source/libgps25/orig -p cd/home/benutzer/source/libgps25/orig apt source libgps25 cd mkdir /home/benutzer/source/navit/orig -p cd/home/benutzer/source/navit/orig apt source navit cd systemctl start gpsd.service export DISPLAY=:0 gdb -q --args navit set width 0 set pagination off set breakpoint pending on directory /home/benutzer/source/libgps25/orig/gpsd-3.20 directory /home/benutzer/source/navit/orig/navit-0.5.3+dfsg.1/navit/vehicle/gpsd b gps_open run print gpsdata print sizeof(*gpsdata) print sizeof(struct gps_data_t) up print priv->gps print sizeof(*priv->gps) print sizeof(struct gps_data_t) down set logging file /tmp/libgps25-ptype-struct-gps_data_t.txt set logging on ptype /o struct gps_data_t set logging off up set logging file /tmp/navit-ptype-struct-gps_data_t.txt set logging on ptype /o struct gps_data_t set logging off benutzer@debian:~$ gdb -q --args navit Reading symbols from navit... Reading symbols from /usr/lib/debug/.build-id/ad/4c802fbe455074f8a5eb217f3ade9bddb73bd5.debug... (gdb) set width 0 (gdb) set pagination off (gdb) set breakpoint pending on (gdb) directory /home/benutzer/source/libgps25/orig/gpsd-3.20 Source directories searched: /home/benutzer/source/libgps25/orig/gpsd-3.20:$cdir:$cwd (gdb) directory /home/benutzer/source/navit/orig/navit-0.5.3+dfsg.1/navit/vehicle/gpsd Source directories searched: /home/benutzer/source/navit/orig/navit-0.5.3+dfsg.1/navit/vehicle/gpsd:/home/benutzer/source/libgps25/orig/gpsd-3.20:$cdir:$cwd (gdb) b gps_open Function "gps_open" not defined. Breakpoint 1 (gps_open) pending. (gdb) run Starting program: /usr/bin/navit [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". Breakpoint 1, gps_open (host=host@entry=0x556bc137 "localhost", port=0x0, gpsdata=0x556d4a50) at libgps_core.c:73 73 if (!gpsdata) (gdb) print gpsdata $1 = (struct gps_data_t *) 0x556d4a50 (gdb) print sizeof(*gpsdata) $2 = 24008 (gdb) print sizeof(struct gps_data_t) $3 = 24008 (gdb) up #1 0x756555c3 in vehicle_gpsd_try_open (priv=priv@entry=0x5568f510) at ./navit/vehicle/gpsd/vehicle_gpsd.c:225 warning: Source file is more recent than executable. 225 if (gps_open(source + 7, port, priv->gps)) { (gdb) print priv->gps $4 = (struct gps_data_t *) 0x556d4a50 (gdb) print sizeof(*priv->gps) $5 = 20800 (gdb) print sizeof(struct gps_data_t) $6 = 20800 (gdb) benutzer@debian:~$ 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; /* 24 | 4 */socket_t gps_fd; | /* 16 | 4 */socket_t gps_fd; /* XXX 4-byte hole */ /* XXX 4-byte hole */ /* 32 | 360 */struct gps_fix_t { | /* 24 | 256 */struct gps_fix_t { /* 32 |16 */timespec_t time; | /* 24 | 8 */timestamp_t time; /* 48 | 4 */int mode;| /* 32 | 4 */int mode; /* XXX 4-byte hole */ | /* XXX 4-byte hole */ /* 56 | 8 */double ept; | /* 40 | 8 */double ept; /* 64 | 8 */double latitude; | /* 48 | 8 */double latitude; /* 72 | 8 */double epy; | /* 56 | 8 */double epy; /* 80 | 8 */double longitude;| /* 64 | 8 */double longitude; /* 88 | 8 */double epx; | /* 72 | 8 */double epx; /* 96 | 8 */double altitude; | /* 80 | 8 */double altitude; /* 104 | 8 */double altHAE; | /* 88 | 8 */double epv; /* 112 | 8 */double altMSL; | /* 96 | 8 */double track; /* 120 | 8 */double epv; | /* 104 | 8 */double epd; /* 128 | 8 */double track;| /* 112 | 8 */double speed; /* 136 |
Bug#948388: navit: fails to connect to gpsd
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=0x556bc137 "localhost", port=0x0, gpsdata=0x556d4a50) at libgps_core.c:73 73 if (!gpsdata) (gdb) print sizeof(struct gps_data_t) $3 = 24008 [2] #1 0x756555c3 in vehicle_gpsd_try_open (priv=priv@entry=0x5568f510) 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] <>/navit/vehicle/gpsd/vehicle_gpsd.c: In function ‘vehicle_gpsd_callback’: <>/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=amd64=0.5.3%2Bdfsg.1-2%2Bb1=1571055435=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/
Bug#948388: navit: fails to connect to gpsd
On Tue, 07 Jan 2020 21:10:15 -0500 Daniel Peter Chokola wrote: > Navit fails to connect to gpsd What happens if you rebuild Navit from source? -- bye, pabs https://wiki.debian.org/PaulWise signature.asc Description: This is a digitally signed message part
Bug#948388: navit: fails to connect to gpsd
Package: navit Version: 0.5.3+dfsg.1-2+b1 Severity: important Dear Maintainer, Navit fails to connect to gpsd, giving the log messages below: debug:vehicle_gpsd:vehicle_gpsd_try_open:Trying to connect to localhost:2947 error:vehicle_gpsd:vehicle_gpsd_try_open:Warning: gps_fd is 0, most likely you have used a gps.h incompatible to libgps debug:vehicle_gpsd:vehicle_gpsd_try_open:Connected to gpsd fd=0 evwatch=0x55b82d8e5460 xgps, gpsmon, cgps, and a test program work fine: #include #include "gps.h" int main() { int ret; struct gps_data_t gps; ret = gps_open("localhost", "2947", ); printf("Opened FD %d, return code %d\n", gps.gps_fd, ret); return 0; } $ gcc foo.c -o foo -lgps $ ./foo Opened FD 3, return code 0 -- System Information: Debian Release: bullseye/sid APT prefers unstable APT policy: (500, 'unstable'), (1, 'experimental') Architecture: amd64 (x86_64) Foreign Architectures: i386, arm64 Kernel: Linux 5.3.0-2-amd64 (SMP w/8 CPU cores) Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_WARN, TAINT_FIRMWARE_WORKAROUND, TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) LSM: AppArmor: enabled Versions of packages navit depends on: ii libc6 2.29-6 ii libdbus-1-3 1.12.16-2 ii libdbus-glib-1-20.110-5 ii libfontconfig1 2.13.1-2+b1 ii libfreetype62.10.1-2 ii libfribidi0 1.0.8-2 ii libgarmin0 0~svn320-6 ii libglib2.0-02.62.4-1 ii libgps253.20-1 ii libspeechd2 0.9.1-3 ii navit-data 0.5.3+dfsg.1-2 ii navit-gui-internal 0.5.3+dfsg.1-2+b1 ii zlib1g 1:1.2.11.dfsg-1+b1 Versions of packages navit recommends: ii gpsd 3.20-1 Versions of packages navit suggests: pn maptool -- Configuration Files: /etc/navit/navit.xml changed [not included] (added port number explicitly) -- no debconf information