Skip to content

Commit 1d452fe

Browse files
committedJan 15, 2023
Tested compatibility with gpsd 3.25.
1 parent 17d3d0a commit 1d452fe

File tree

1 file changed

+43
-10
lines changed

1 file changed

+43
-10
lines changed
 

‎src/dwgpsd.c

+43-10
Original file line numberDiff line numberDiff line change
@@ -57,18 +57,35 @@
5757

5858

5959

60-
// An incompatibility was introduced with version 7
61-
// and again with 9 and again with 10.
62-
63-
// release lib version API Raspberry Pi OS
64-
// 3.22 28 11 bullseye
65-
// 3.23 29 12
66-
// 3.24 14 Not tested yet.
67-
68-
#if GPSD_API_MAJOR_VERSION < 5 || GPSD_API_MAJOR_VERSION > 12
69-
#error libgps API version might be incompatible.
60+
// An API incompatibility was introduced with API version 7.
61+
// and again with 9.
62+
// and again with 10.
63+
// We deal with it by using a bunch of conditional code such as:
64+
// #if GPSD_API_MAJOR_VERSION >= 9
65+
66+
67+
// release lib version API Raspberry Pi OS Testing status
68+
// 3.22 28 11 bullseye OK.
69+
// 3.23 29 12 OK.
70+
// 3.25 30 14 OK, Jan. 2023
71+
72+
// Previously the compilation would fail if the API version was later
73+
// than the last one tested. Now it is just a warning because it changes so
74+
// often but more recent versions have not broken backward compatibility.
75+
76+
#define MAX_TESTED_VERSION 14
77+
78+
#if (GPSD_API_MAJOR_VERSION < 5) || (GPSD_API_MAJOR_VERSION > MAX_TESTED_VERSION)
79+
#pragma message "Your version of gpsd might be incompatible with this application."
80+
#pragma message "The libgps application program interface (API) often"
81+
#pragma message "changes to be incompatible with earlier versions."
82+
// I could not figure out how to do value substitution here.
83+
#pragma message "You have libgpsd API version GPSD_API_MAJOR_VERSION."
84+
#pragma message "The last that has been tested is MAX_TESTED_VERSION."
85+
#pragma message "Even if this builds successfully, it might not run properly."
7086
#endif
7187

88+
7289
/*
7390
* Information for interface to gpsd daemon.
7491
*/
@@ -168,6 +185,22 @@ static void * read_gpsd_thread (void *arg);
168185
* can't find it there. Solution is to define environment variable:
169186
*
170187
* export LD_LIBRARY_PATH=/use/local/lib
188+
*
189+
* January 2023: Now using 64 bit Raspberry Pi OS, bullseye.
190+
* See https://gitlab.com/gpsd/gpsd/-/blob/master/build.adoc
191+
* Try to install in proper library place so we don't have to mess with LD_LIBRARY_PATH.
192+
*
193+
* (Remove any existing gpsd first so we are not mixing mismatched pieces.)
194+
*
195+
* sudo apt-get install libncurses5-dev
196+
* sudo apt-get install gtk+-3.0
197+
*
198+
* git clone https://gitlab.com/gpsd/gpsd.git gpsd-gitlab
199+
* cd gpsd-gitlab
200+
* scons prefix=/usr libdir=lib/aarch64-linux-gnu
201+
* [ scons check ]
202+
* sudo scons udev-install
203+
*
171204
*/
172205

173206

0 commit comments

Comments
 (0)