[PATCH i-g-t] lib/igt_aux.c: since procps-ng 4.0.5, PIDS_VAL() takes 3 arguments, not 4

Kamil Konieczny kamil.konieczny at linux.intel.com
Thu Jan 9 14:45:17 UTC 2025


Hi Lucas,
On 2025-01-06 at 11:42:32 -0600, Lucas De Marchi wrote:
> On Sat, Jan 04, 2025 at 10:44:29PM +0100, Thomas Petazzoni wrote:
> > 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?
> 
> ugh... but the soname is about linking to the library, which is
> unrelated to linking.
> 
> I'd rather wait on that discussion to settle.
> 
> > 
> > > 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.
> 
> agreed, that would be the next best alternative
> 
> Lucas De Marchi
> 

I merged this as is, if there will be any better solution
it could replace this patch.

Regards,
Kamil

> > 
> > 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