build: detect backtrace availability
PATCH 1/1 build: detect backtrace availability
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 unconditionnaly 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.
--- config/meson.build | 3 ++- config/rte_config.h | 1 - doc/guides/linux_gsg/sys_reqs.rst | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
config/meson.build +2 -1
@@ -200,10 +200,11 @@ if fdt_dep.found() and cc.has_header('fdt.h') endif libexecinfo = cc.find_library('libexecinfo', 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') if libarchive.found()
config/rte_config.h +0 -1
@@ -37,7 +37,6 @@#define RTE_MAX_MEMZONE 2560#define RTE_MAX_TAILQ 32#define RTE_LOG_DP_LEVEL RTE_LOG_INFO -#define RTE_BACKTRACE 1#define RTE_MAX_VFIO_CONTAINERS 64/* bsd module defines */
doc/guides/linux_gsg/sys_reqs.rst +1 -1
@@ -32,7 +32,7 @@ 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 alpine-sdk bsd-compat-headers libexecinfo-dev`` + * For Alpine Linux, ``apk add alpine-sdk bsd-compat-headers`` .. note::
Signature · 1 line
2.39.0
Quoted 4 lines · Thomas Monjalon
Backtrace dump is available:
- always on Windows
- on Linux/BSD ifexecinfo.his available (not anymore on Alpine)
Quoted 8 lines
The flag
RTE_BACKTRACEwas set unconditionnaly inrte_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 <[email protected]>---
Thomas Monjalon
Applied09/01/2023 10:08, Bruce Richardson:
Quoted 8 lines · Thomas Monjalon
Quoted 7 lines
Backtrace dump is available:
- always on Windows
- on Linux/BSD ifexecinfo.his available (not anymore on Alpine)The flag
RTE_BACKTRACEwas set unconditionnaly inrte_config.h. It is now set only if the feature is available.
Quoted 6 lines
Quoted 4 lines
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 <[email protected]>Acked-by Bruce Richardson <[email protected]>
Applied