patches for DPDK stable branches
 help / color / mirror / Atom feed
* [PATCH 21.11] build: detect backtrace availability
@ 2023-04-18  9:03 Kevin Traynor
  2023-04-21 14:14 ` Kevin Traynor
  0 siblings, 1 reply; 2+ messages in thread
From: Kevin Traynor @ 2023-04-18  9:03 UTC (permalink / raw)
  To: stable; +Cc: bluca, thomas, david.marchand, xuemingl, Bruce Richardson

From: Thomas Monjalon <thomas@monjalon.net>

[ upstream commit bc1db4f45af35c87e7d97db7a24d479674aa8a43 ]

Backtrace dump is available:
	- always on Windows
	- on Linux/BSD if execinfo.h is available (not anymore on Alpine)

The flag RTE_BACKTRACE was set unconditionally in rte_config.h.
It is now set only if the feature is available.

Note: Alpine Linux has decided to remove libexecinfo support,
so this change will allow to compile DPDK on recent Alpine Linux.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
This is need to fix Alpine Linux compile failure in 21.11 UNH CI [0]
Tested on 21.11-staging branch [1]

Thomas, any objection to backporting this patch?

[0] https://dpdkdashboard.iol.unh.edu/results/dashboard/tarballs/24280/#env-45

Project version: 21.11.4-rc1
C compiler for the host machine: ccache cc
(gcc 12.2.1 "cc (Alpine 12.2.1_git20220924-r4) 12.2.1 20220924")
...
[2604/2949] Compiling C object 'lib/76b5a35@@rte_eal@sta/eal_linux_eal_debug.c.o'.
../lib/eal/linux/eal_debug.c:6:10: fatal error: execinfo.h: No such file or directory
    6 | #include <execinfo.h>
      |          ^~~~~~~~~~~~
compilation terminated.

[1] https://dpdkdashboard.iol.unh.edu/results/dashboard/tarballs/24284/#env-45
---
 config/meson.build                | 3 ++-
 config/rte_config.h               | 1 -
 doc/guides/linux_gsg/sys_reqs.rst | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/config/meson.build b/config/meson.build
index cf3b68a5ce..a79a3ed39c 100644
--- a/config/meson.build
+++ b/config/meson.build
@@ -199,8 +199,9 @@ endif
 
 libexecinfo = cc.find_library('execinfo', required: false)
-if libexecinfo.found() and cc.has_header('execinfo.h')
+if libexecinfo.found()
     add_project_link_arguments('-lexecinfo', language: 'c')
     dpdk_extra_ldflags += '-lexecinfo'
 endif
+dpdk_conf.set('RTE_BACKTRACE', cc.has_header('execinfo.h') or is_windows)
 
 libarchive = dependency('libarchive', required: false, method: 'pkg-config')
diff --git a/config/rte_config.h b/config/rte_config.h
index cab4390a97..2f1a3ffb21 100644
--- a/config/rte_config.h
+++ b/config/rte_config.h
@@ -38,5 +38,4 @@
 #define RTE_MAX_TAILQ 32
 #define RTE_LOG_DP_LEVEL RTE_LOG_INFO
-#define RTE_BACKTRACE 1
 #define RTE_MAX_VFIO_CONTAINERS 64
 
diff --git a/doc/guides/linux_gsg/sys_reqs.rst b/doc/guides/linux_gsg/sys_reqs.rst
index cfaa2db301..63990cee86 100644
--- a/doc/guides/linux_gsg/sys_reqs.rst
+++ b/doc/guides/linux_gsg/sys_reqs.rst
@@ -44,5 +44,5 @@ Compilation of the DPDK
     * For RHEL/Fedora systems these can be installed using ``dnf groupinstall "Development Tools"``
     * For Ubuntu/Debian systems these can be installed using ``apt install build-essential``
-    * For Alpine Linux, ``apk add gcc libc-dev bsd-compat-headers libexecinfo-dev``
+    * For Alpine Linux, ``apk add gcc libc-dev bsd-compat-headers``
 
 *   Python 3.5 or later.
-- 
2.39.2


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

* Re: [PATCH 21.11] build: detect backtrace availability
  2023-04-18  9:03 [PATCH 21.11] build: detect backtrace availability Kevin Traynor
@ 2023-04-21 14:14 ` Kevin Traynor
  0 siblings, 0 replies; 2+ messages in thread
From: Kevin Traynor @ 2023-04-21 14:14 UTC (permalink / raw)
  To: stable; +Cc: bluca, thomas, david.marchand, xuemingl, Bruce Richardson

On 18/04/2023 10:03, Kevin Traynor wrote:
> From: Thomas Monjalon<thomas@monjalon.net>
> 
> [ upstream commit bc1db4f45af35c87e7d97db7a24d479674aa8a43 ]
> 
> Backtrace dump is available:
> 	- always on Windows
> 	- on Linux/BSD if execinfo.h is available (not anymore on Alpine)
> 
> The flag RTE_BACKTRACE was set unconditionally in rte_config.h.
> It is now set only if the feature is available.
> 
> Note: Alpine Linux has decided to remove libexecinfo support,
> so this change will allow to compile DPDK on recent Alpine Linux.
> 
> Signed-off-by: Thomas Monjalon<thomas@monjalon.net>
> Acked-by: Bruce Richardson<bruce.richardson@intel.com>
> ---
> This is need to fix Alpine Linux compile failure in 21.11 UNH CI [0]
> Tested on 21.11-staging branch [1]
> 
> Thomas, any objection to backporting this patch?
> 
> [0]https://dpdkdashboard.iol.unh.edu/results/dashboard/tarballs/24280/#env-45
> 
> Project version: 21.11.4-rc1
> C compiler for the host machine: ccache cc
> (gcc 12.2.1 "cc (Alpine 12.2.1_git20220924-r4) 12.2.1 20220924")
> ...
> [2604/2949] Compiling C object 'lib/76b5a35@@rte_eal@sta/eal_linux_eal_debug.c.o'.
> ../lib/eal/linux/eal_debug.c:6:10: fatal error: execinfo.h: No such file or directory
>      6 | #include <execinfo.h>
>        |          ^~~~~~~~~~~~
> compilation terminated.
> 
> [1]https://dpdkdashboard.iol.unh.edu/results/dashboard/tarballs/24284/#env-45
> ---
>   config/meson.build                | 3 ++-
>   config/rte_config.h               | 1 -
>   doc/guides/linux_gsg/sys_reqs.rst | 2 +-
>   3 files changed, 3 insertions(+), 3 deletions(-)

Applied, thanks.


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

end of thread, other threads:[~2023-04-21 14:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-18  9:03 [PATCH 21.11] build: detect backtrace availability Kevin Traynor
2023-04-21 14:14 ` Kevin Traynor

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 NNTP newsgroup(s).