From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 2C0B8418B6; Sun, 8 Jan 2023 10:59:46 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EF00940687; Sun, 8 Jan 2023 10:59:44 +0100 (CET) Received: from wout5-smtp.messagingengine.com (wout5-smtp.messagingengine.com [64.147.123.21]) by mails.dpdk.org (Postfix) with ESMTP id 73A6E4067C for ; Sun, 8 Jan 2023 10:59:42 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id CE35932007E8; Sun, 8 Jan 2023 04:59:40 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Sun, 08 Jan 2023 04:59:41 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:cc:content-transfer-encoding:date:date:from:from:in-reply-to :message-id:mime-version:reply-to:sender:subject:subject:to:to; s=fm3; t=1673171980; x=1673258380; bh=2f+Xd+Z4MAbqgqGqYk1+HkkR5 VwQvDXztoT8OWKHajg=; b=SHBGZpsb/wIs4EoU/gpdlnKQzuOGZxY9fKR+YdsQg Pwt/6hsno0WnNbSnVluOmghfR+lKBu6H1kRypo2pNCsQunLxs8Cu1CSen9WzC8Jm siYEm/SfaoZqBsyKv4N7CyqLBTdV6EPQnDeVS8DWIZVhYxc7pzxson6uIHbKBQqm 2SmljzSN3RDUI0+lH0OcyGo8jCaMSUz3h5C7c4h4KuHO5QLgAhU5D/O2Rs+mwdtX uDxIeHG5E+pSY261Pamp3dGkbq9Cb81982gsP6/CylykQXw9kbA2xFGEeSIrMFgK Uu9Mg7YJZgnEahMqqyKfBY2i+sAKCFQMWABMXYcd9rREA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding:date:date :feedback-id:feedback-id:from:from:in-reply-to:message-id :mime-version:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t= 1673171980; x=1673258380; bh=2f+Xd+Z4MAbqgqGqYk1+HkkR5VwQvDXztoT 8OWKHajg=; b=FsqR8REHKEKphzhEhTnJ94Oju9CEOjtNcjcBSMBDYSwD7H9AVY9 Cv8GaEnHt1aoZ/p/K8LNKkPFMztsacdm9ek4Lynh43bi0dVjliMm6TDIHH1Trd1f kzxDGGFE/XZ5EyRy+s/kaK2WoeCQA7zz+g911DFiCQnlCim7i4Sb3FFVhbOG7bEl iZQMmTZ7H8RZb9Z+Yd1VDpHUcyEiqI/+j8M2tOHh/dALaVpoi23vW0Meg2xv0CPt sx20AW6iVhTRvNBJSVBzkH5rBfsmCVDh4+MrxEaNHLW/ZqII28NJ3umDobwCuNDS ewHt1D5PY/IVfSgnlEosj4kB2/wOSI0bwVA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrkeeggddutdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvfevufffkffoggfgsedtkeertdertddtnecuhfhrohhmpefvhhhomhgrshcu ofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecuggftrf grthhtvghrnhepveevfeevieeihfetudekgeekleeigeffueekveduteeuffeiudevteei udekfeelnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomh epthhhohhmrghssehmohhnjhgrlhhonhdrnhgvth X-ME-Proxy: Feedback-ID: i47234305:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 8 Jan 2023 04:59:39 -0500 (EST) From: Thomas Monjalon To: Bruce Richardson Cc: dev@dpdk.org, David Marchand Subject: [PATCH] build: detect backtrace availability Date: Sun, 8 Jan 2023 10:59:20 +0100 Message-Id: <20230108095920.327672-1-thomas@monjalon.net> X-Mailer: git-send-email 2.39.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org 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. Signed-off-by: Thomas Monjalon --- 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 80564eec52..0c4d1f06e5 100644 --- a/config/meson.build +++ b/config/meson.build @@ -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() diff --git a/config/rte_config.h b/config/rte_config.h index 3c4876d434..7b8c85e948 100644 --- a/config/rte_config.h +++ b/config/rte_config.h @@ -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 */ diff --git a/doc/guides/linux_gsg/sys_reqs.rst b/doc/guides/linux_gsg/sys_reqs.rst index e4f9b41251..2a7988cf46 100644 --- a/doc/guides/linux_gsg/sys_reqs.rst +++ b/doc/guides/linux_gsg/sys_reqs.rst @@ -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:: -- 2.39.0