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 46DFC4297B for ; Tue, 18 Apr 2023 11:03:54 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 40CF640EDF; Tue, 18 Apr 2023 11:03:54 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 7592140698 for ; Tue, 18 Apr 2023 11:03:52 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1681808631; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FnB5oQnTwTH1UDUcPs8TXkwsPttwkZ1NhA1sXtx/H7I=; b=JYIvsI1iTGVIy+2Cl/OuliH07f0nNUU/ODDHDU4vh3ua1nvQGtcRx0/YaUEFCr1Avzu31g wYDYVvEZPudBvza6uH+uDC9M+KLUwrLldSYXaAld04diyt2VIL4QdwXJg7ht38fMLhi5ED RBdjpj6AIhNL8EQWhAd6bvTVwgqIfoE= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-570-KfG4Ip4uMxe87eIztACVdA-1; Tue, 18 Apr 2023 05:03:46 -0400 X-MC-Unique: KfG4Ip4uMxe87eIztACVdA-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 829F780CDAD; Tue, 18 Apr 2023 09:03:46 +0000 (UTC) Received: from rh.Home (unknown [10.39.194.133]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5EC5D40C83A9; Tue, 18 Apr 2023 09:03:45 +0000 (UTC) From: Kevin Traynor To: stable@dpdk.org Cc: bluca@debian.org, thomas@monjalon.net, david.marchand@redhat.com, xuemingl@nvidia.com, Bruce Richardson Subject: [PATCH 21.11] build: detect backtrace availability Date: Tue, 18 Apr 2023 10:03:23 +0100 Message-Id: <20230418090323.154351-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org From: Thomas Monjalon [ 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 Acked-by: Bruce Richardson --- 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 | ^~~~~~~~~~~~ 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