public inbox for libabigail@sourceware.org
 help / color / mirror / Atom feed
* [PATCH, RFC] configure: Fix detection of BTF header to enable the BTF front-end
@ 2024-05-15 11:47 Dodji Seketeli
  2024-05-15 13:15 ` Čestmír Kalina
  0 siblings, 1 reply; 3+ messages in thread
From: Dodji Seketeli @ 2024-05-15 11:47 UTC (permalink / raw)
  To: ckalina; +Cc: libabigail

Hello,

Cestmir Kalina reported that running configure with --enable-btf with
no BTF header present on the system wrongly leads to the BTF
front-end of libabigail being enabled, and later leads to
compilation/installation errors.

This patch fixes that by ensuring that the ENABLE_BTF variable set by
the --enable-btf option handling code is not reused later during
actual btf.h header file detection code.

	* configure.ac: Use a new HAS_BTF_HEADERS to store the detection
	status for the btf.h header.  Emit a better notice message when
	the BTF header file is found.

OK to apply to the mainline if it passes the CI tests?
Thanks.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
---
 configure.ac | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/configure.ac b/configure.ac
index c6e1ad64..e118a9c0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -391,10 +391,10 @@ dnl configure BTF usage
 BPF_LIBS=
 if test x$ENABLE_BTF != xno; then
   AC_CHECK_HEADER([bpf/btf.h],
-		  [ENABLE_BTF=yes],
+		  [HAS_BTF_HEADERS=yes],
 		  [AC_MSG_NOTICE([could not find bpf/btf.h])])
-  if test x$ENABLE_BTF = xyes; then
-    AC_MSG_NOTICE([enable BTF support])
+  if test x$HAS_BTF_HEADERS = xyes; then
+    AC_MSG_NOTICE([found BTF header file so enabling BTF support])
     ENABLE_BTF=yes
     AC_DEFINE([WITH_BTF], 1,
 	     [Defined if user enabled BTF usage])
-- 
2.39.3


-- 
		Dodji


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH, RFC] configure: Fix detection of BTF header to enable the BTF front-end
  2024-05-15 11:47 [PATCH, RFC] configure: Fix detection of BTF header to enable the BTF front-end Dodji Seketeli
@ 2024-05-15 13:15 ` Čestmír Kalina
  2024-05-15 13:23   ` [PATCH, applied] " Dodji Seketeli
  0 siblings, 1 reply; 3+ messages in thread
From: Čestmír Kalina @ 2024-05-15 13:15 UTC (permalink / raw)
  To: Dodji Seketeli; +Cc: libabigail

On Wed, May 15, 2024 at 01:47:37PM GMT, Dodji Seketeli wrote:
> Hello,
> 
> Cestmir Kalina reported that running configure with --enable-btf with
> no BTF header present on the system wrongly leads to the BTF
> front-end of libabigail being enabled, and later leads to
> compilation/installation errors.
> 
> This patch fixes that by ensuring that the ENABLE_BTF variable set by
> the --enable-btf option handling code is not reused later during
> actual btf.h header file detection code.
> 
> 	* configure.ac: Use a new HAS_BTF_HEADERS to store the detection
> 	status for the btf.h header.  Emit a better notice message when
> 	the BTF header file is found.
> 
> OK to apply to the mainline if it passes the CI tests?
> Thanks.

Tested-by: Cestmir Kalina <ckalina@redhat.com>

> 
> Signed-off-by: Dodji Seketeli <dodji@redhat.com>
> ---
>  configure.ac | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/configure.ac b/configure.ac
> index c6e1ad64..e118a9c0 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -391,10 +391,10 @@ dnl configure BTF usage
>  BPF_LIBS=
>  if test x$ENABLE_BTF != xno; then
>    AC_CHECK_HEADER([bpf/btf.h],
> -		  [ENABLE_BTF=yes],
> +		  [HAS_BTF_HEADERS=yes],
>  		  [AC_MSG_NOTICE([could not find bpf/btf.h])])
> -  if test x$ENABLE_BTF = xyes; then
> -    AC_MSG_NOTICE([enable BTF support])
> +  if test x$HAS_BTF_HEADERS = xyes; then
> +    AC_MSG_NOTICE([found BTF header file so enabling BTF support])
>      ENABLE_BTF=yes
>      AC_DEFINE([WITH_BTF], 1,
>  	     [Defined if user enabled BTF usage])
> -- 
> 2.39.3
> 
> 
> -- 
> 		Dodji
> 


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH, applied] configure: Fix detection of BTF header to enable the BTF front-end
  2024-05-15 13:15 ` Čestmír Kalina
@ 2024-05-15 13:23   ` Dodji Seketeli
  0 siblings, 0 replies; 3+ messages in thread
From: Dodji Seketeli @ 2024-05-15 13:23 UTC (permalink / raw)
  To: Čestmír Kalina; +Cc: libabigail

Čestmír Kalina <ckalina@redhat.com> writes:

> On Wed, May 15, 2024 at 01:47:37PM GMT, Dodji Seketeli wrote:
>> Hello,
>> 
>> Cestmir Kalina reported that running configure with --enable-btf with
>> no BTF header present on the system wrongly leads to the BTF
>> front-end of libabigail being enabled, and later leads to
>> compilation/installation errors.
>> 
>> This patch fixes that by ensuring that the ENABLE_BTF variable set by
>> the --enable-btf option handling code is not reused later during
>> actual btf.h header file detection code.
>> 
>> 	* configure.ac: Use a new HAS_BTF_HEADERS to store the detection
>> 	status for the btf.h header.  Emit a better notice message when
>> 	the BTF header file is found.
>> 
>> OK to apply to the mainline if it passes the CI tests?
>> Thanks.
>
> Tested-by: Cestmir Kalina <ckalina@redhat.com>

Thanks!  Incidentally, the CI build did pass.  So I have applied the
patch to the mainline.

Many thanks for taking the time to report the issue and for testing the
patch.

[...]

Cheers,

-- 
		Dodji


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-05-15 13:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-15 11:47 [PATCH, RFC] configure: Fix detection of BTF header to enable the BTF front-end Dodji Seketeli
2024-05-15 13:15 ` Čestmír Kalina
2024-05-15 13:23   ` [PATCH, applied] " Dodji Seketeli

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).