[PATCH i-g-t] lib/igt_aux.c: since procps-ng 4.0.5, PIDS_VAL() takes 3 arguments, not 4
Thomas Petazzoni
thomas.petazzoni at bootlin.com
Sat Jan 4 21:44:29 UTC 2025
Hello Jonathan,
Thanks for the quick feedback!
On Fri, 3 Jan 2025 23:33:27 +0000
"Cavitt, Jonathan" <jonathan.cavitt at intel.com> wrote:
> "HAVE_LIBPROC2_POST_4_0_5_API" works as a name for this new tag,
> though I wonder if "HAVE_LIBPROC2_NO_INFO" would also work?
I don't have a strong opinion on the macro name, but "NO_INFO" sounds
very generic. Here we're just talking about the "info" argument of this
specific PIDS_VAL() macro.
It is worth mentioning that I had reported the issue to upstream
procps-ng and they don't consider it as a bug:
https://gitlab.com/procps-ng/procps/-/issues/366
Also, they said that the SONAME has changed. Which they indeed did in:
https://gitlab.com/procps-ng/procps/-/commit/f8d20531f840e280fcbe1f3a0634ab72c9b4e74d
So maybe our macro name should be based somehow on this SONAME, which
identifies the API version?
> I don't see any other granular version checks in the meson build file (at
> least, I don't see any that aren't strict version requirements for certain
> dependencies), so AFAICT this type of tag is fairly novel. So whatever
> name we end up choosing may end up inadvertently becoming a
> standard naming convention for future tags like this one.
Note that I am not entirely happy with it being a version check.
Ideally, we shouldn't check the version, but rather test the feature
itself: build a simple program that uses the 4 argument variant of
PIDS_VAL() and decide depending on the success/failure which variant we
should use. This is generally less fragile than a version check, at
least IMO.
Best regards,
Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
More information about the igt-dev
mailing list