Tested compatibility with gpsd 3.25.

This commit is contained in:
wb2osz 2023-01-15 21:55:08 +00:00
parent 17d3d0a621
commit 1d452fe1ab
1 changed files with 41 additions and 8 deletions

View File

@ -57,18 +57,35 @@
// An incompatibility was introduced with version 7 // An API incompatibility was introduced with API version 7.
// and again with 9 and again with 10. // and again with 9.
// and again with 10.
// We deal with it by using a bunch of conditional code such as:
// #if GPSD_API_MAJOR_VERSION >= 9
// release lib version API Raspberry Pi OS
// 3.22 28 11 bullseye
// 3.23 29 12
// 3.24 14 Not tested yet.
#if GPSD_API_MAJOR_VERSION < 5 || GPSD_API_MAJOR_VERSION > 12 // release lib version API Raspberry Pi OS Testing status
#error libgps API version might be incompatible. // 3.22 28 11 bullseye OK.
// 3.23 29 12 OK.
// 3.25 30 14 OK, Jan. 2023
// Previously the compilation would fail if the API version was later
// than the last one tested. Now it is just a warning because it changes so
// often but more recent versions have not broken backward compatibility.
#define MAX_TESTED_VERSION 14
#if (GPSD_API_MAJOR_VERSION < 5) || (GPSD_API_MAJOR_VERSION > MAX_TESTED_VERSION)
#pragma message "Your version of gpsd might be incompatible with this application."
#pragma message "The libgps application program interface (API) often"
#pragma message "changes to be incompatible with earlier versions."
// I could not figure out how to do value substitution here.
#pragma message "You have libgpsd API version GPSD_API_MAJOR_VERSION."
#pragma message "The last that has been tested is MAX_TESTED_VERSION."
#pragma message "Even if this builds successfully, it might not run properly."
#endif #endif
/* /*
* Information for interface to gpsd daemon. * Information for interface to gpsd daemon.
*/ */
@ -168,6 +185,22 @@ static void * read_gpsd_thread (void *arg);
* can't find it there. Solution is to define environment variable: * can't find it there. Solution is to define environment variable:
* *
* export LD_LIBRARY_PATH=/use/local/lib * export LD_LIBRARY_PATH=/use/local/lib
*
* January 2023: Now using 64 bit Raspberry Pi OS, bullseye.
* See https://gitlab.com/gpsd/gpsd/-/blob/master/build.adoc
* Try to install in proper library place so we don't have to mess with LD_LIBRARY_PATH.
*
* (Remove any existing gpsd first so we are not mixing mismatched pieces.)
*
* sudo apt-get install libncurses5-dev
* sudo apt-get install gtk+-3.0
*
* git clone https://gitlab.com/gpsd/gpsd.git gpsd-gitlab
* cd gpsd-gitlab
* scons prefix=/usr libdir=lib/aarch64-linux-gnu
* [ scons check ]
* sudo scons udev-install
*
*/ */