Skip to content

Commit

Permalink
Tested compatibility with gpsd 3.25.
Browse files Browse the repository at this point in the history
  • Loading branch information
wb2osz committed Jan 15, 2023
1 parent 17d3d0a commit 1d452fe
Showing 1 changed file with 43 additions and 10 deletions.
53 changes: 43 additions & 10 deletions src/dwgpsd.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,18 +57,35 @@



// An incompatibility was introduced with version 7
// and again with 9 and again with 10.

// 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
#error libgps API version might be incompatible.
// An API incompatibility was introduced with API version 7.
// 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 Testing status
// 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


/*
* Information for interface to gpsd daemon.
*/
Expand Down Expand Up @@ -168,6 +185,22 @@ static void * read_gpsd_thread (void *arg);
* can't find it there. Solution is to define environment variable:
*
* 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
*
*/


Expand Down

0 comments on commit 1d452fe

Please sign in to comment.