|
57 | 57 |
|
58 | 58 |
|
59 | 59 |
|
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." |
70 | 86 | #endif
|
71 | 87 |
|
| 88 | + |
72 | 89 | /*
|
73 | 90 | * Information for interface to gpsd daemon.
|
74 | 91 | */
|
@@ -168,6 +185,22 @@ static void * read_gpsd_thread (void *arg);
|
168 | 185 | * can't find it there. Solution is to define environment variable:
|
169 | 186 | *
|
170 | 187 | * 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 | + * |
171 | 204 | */
|
172 | 205 |
|
173 | 206 |
|
|
0 commit comments