From: Thomas Petazzoni via buildroot <buildroot@buildroot.org>
To: Scott Fan <fancp2007@gmail.com>
Cc: buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH] package/procps-ng: fix pidfd_open checking
Date: Thu, 31 Oct 2024 19:18:44 +0100 [thread overview]
Message-ID: <20241031191844.60ba9a59@windsurf> (raw)
In-Reply-To: <20241030002020.73963-1-fancp2007@gmail.com>
Hello Scott,
On Wed, 30 Oct 2024 08:20:18 +0800
Scott Fan <fancp2007@gmail.com> wrote:
> The previous build setup would check for pidfd_open using
> AC_CHECK_FUNC and would be incorrectly reported as true.
>
> Also, if pidfd_open() and __NR_pidfd_open were not present,
> pidwait would silently not be built.
>
> So, changes:
> compile a small programin using pidfd_open to test it properly
> conditionally try to find NR_pidfd_open if the function fails
> complain if neither are present
> have --disable-pidwait configure option so you are explicit in
> not wanting and knowing you wont get pidwait
>
> Backport patch from upstream:
> https://gitlab.com/procps-ng/procps/-/commit/2507bc475782ff5e0541d37c780dff1e293c9553
>
> Signed-off-by: Scott Fan <fancp2007@gmail.com>
So you're no longer setting --disable-pidwait... but that will cause a
failure:
> ++AS_IF([[test "x$enable_pidwait" = xyes -a "x$have_pidfd_open" = xno]],
> ++ AC_MSG_CHECKING([for __NR_pidfd_open])
> ++ AC_COMPILE_IFELSE([AC_LANG_SOURCE([
> ++#include <sys/syscall.h>
> ++#ifndef __NR_pidfd_open
> ++#error __NR_pidfd_open not defined
> ++#endif
> ++ ])],
> ++ AC_MSG_RESULT([yes]),
> ++ AC_MSG_RESULT([no])
> ++ AC_MSG_ERROR([Neither pidfd_open or __NR_pidfd_open found. Disable pidwait with configure option --disable-pidwait])
... here.
So I'm not sure my previous review was clear enough: what is wrong is
the procps-ng patch itself, it shouldn't AC_MSG_ERROR(), but instead it
should automatically disable pidwait, as if the user had passed
--disable-pidwait.
Or am I missing something here?
Thanks!
Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next prev parent reply other threads:[~2024-10-31 18:18 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-30 0:20 [Buildroot] [PATCH] package/procps-ng: fix pidfd_open checking Scott Fan
2024-10-31 18:18 ` Thomas Petazzoni via buildroot [this message]
2024-11-01 1:31 ` Scott Fan
2024-11-04 13:23 ` Scott Fan
2024-11-24 16:29 ` Thomas Petazzoni via buildroot
2024-11-26 1:50 ` Scott Fan
2024-11-26 13:57 ` Thomas Petazzoni via buildroot
2024-11-27 0:35 ` Scott Fan
2024-11-27 1:01 ` Scott Fan
2024-11-27 7:44 ` Thomas Petazzoni via buildroot
2024-11-28 3:50 ` Scott Fan
2024-12-05 16:57 ` Peter Korsgaard
2024-12-07 9:47 ` Peter Korsgaard
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241031191844.60ba9a59@windsurf \
--to=buildroot@buildroot.org \
--cc=fancp2007@gmail.com \
--cc=thomas.petazzoni@bootlin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.