Closed chenrui333 closed 1 year ago
@chenrui333, thank you - may we have still an compile error? As of the buildtest following environment / libs are been installed:
Get:1 http://azure.archive.ubuntu.com/ubuntu jammy/main amd64 libgps28 amd64 3.[22](https://github.com/OLSR/olsrd/pull/119/checks#step:3:23)-4ubuntu2 [58.3 kB]
Get:2 http://azure.archive.ubuntu.com/ubuntu jammy/main amd64 libgps-dev amd64 3.22-4ubuntu2 [113 kB]
@chenrui333, thank you - may we have still an compile error? As of the buildtest following environment / libs are been installed:
Get:1 http://azure.archive.ubuntu.com/ubuntu jammy/main amd64 libgps28 amd64 3.[22](https://github.com/OLSR/olsrd/pull/119/checks#step:3:23)-4ubuntu2 [58.3 kB] Get:2 http://azure.archive.ubuntu.com/ubuntu jammy/main amd64 libgps-dev amd64 3.22-4ubuntu2 [113 kB]
are you referring to the CI failure?
@chenrui333 correct, the CI pipeline build test is failing. Did not yet had time for my own compile check.
Build successful via Darwin 22 / Ventura and Debian 11.
e.g.
apt install flex bison libc6-dev libgps-dev
git clone https://github.com/chenrui333/olsrd.git
cd olsrd; make build_all
I might check on this today. Sorry about the delay. (we did use the patch to ship gpsd 3.25 though)
The build failure in the CI is due to the image used to do the build: ubuntu-latest (presumably either one of 22.10 or 22.04LTS) still only ship gpsd 3.22, so it is going to miss that struct defintion in its exported headers.
If we want to have olsrd support gpsd 3.24 or older as well as 3.25 or later, then we must detect at build time whether struct fixsource_t
is present in gpsd headers or not, and if not define the fallback as it was done before.
olsrd has no configure (or similar), so we can't easily detect features before building; we'll have to resort to testing stuff in the C preprocessor instead. gps.h
does not define the gpsd version (only its API), so we shouldn't rely on a version comparison to decide whether to do fallback; however, struct fixsource_t
was moved for API version 14, so maybe that would be good enough: API 14 onward have it, so we do not define it, otherwise we do define it?
I'm testing a patch: https://github.com/yann-morin-1998/olsrd/tree/yem/issue-118-gpsd-3.25
closes #118
relates to https://github.com/Homebrew/homebrew-core/pull/120328
cc @mathiashro