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 4D6D3432B5 for ; Mon, 6 Nov 2023 05:12:52 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 41D04402E3; Mon, 6 Nov 2023 05:12:52 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id CF3EC4027F; Mon, 6 Nov 2023 05:12:49 +0100 (CET) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3A5LlU9B014930; Sun, 5 Nov 2023 20:12:48 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=pfpt0220; bh=znLfv1SSyCafngzoIjIFXYwa+5JhU21hH32DddjzDMg=; b=QsePii8yhHw6tbtVoitvH0yGp99pbezbaGfAS97STRuNA6UwNo/JedrkYTzTUxI8AK0J 400Eb+io7PYZyqsQR8bTQns8ifx4bcRoZ+upc6CPsKAh0yDxR4wQUcX852Oq4rOKCD56 t/gKgjK+XKC9d19w/5A7p54WOJKGJRDs/wzkEs0VeMGoMQe0ibA5mSrQOKaW2CwYqcUl ITHnudbjoR19iiivTWAr3+SKP2suO2yalGheTmIjcND7WLHlSqPEiS4P9oWNpoOm/NMd nyheGwETHL0usrbT0pukT1Eyu1Sb8dQ94M9cTHiywIg7dqs3zNDUPYtdGjd6YCG8qxl+ nw== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3u5kapkkr9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Sun, 05 Nov 2023 20:12:48 -0800 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Sun, 5 Nov 2023 20:12:46 -0800 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.48 via Frontend Transport; Sun, 5 Nov 2023 20:12:46 -0800 Received: from ml-host-33.caveonetworks.com (unknown [10.110.143.233]) by maili.marvell.com (Postfix) with ESMTP id B148A626766; Sun, 5 Nov 2023 20:12:46 -0800 (PST) From: Srikanth Yalavarthi To: Bruce Richardson , Aaron Conole , Igor Russkikh , David Marchand CC: , , , , , Subject: [PATCH v5 1/1] build: add libarchive to external deps Date: Sun, 5 Nov 2023 20:12:43 -0800 Message-ID: <20231106041243.13621-1-syalavarthi@marvell.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231020170135.18319-1-syalavarthi@marvell.com> References: <20231020170135.18319-1-syalavarthi@marvell.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-ORIG-GUID: ahzC22dwqHerzUWqXeuozUEHQZwQfb0p X-Proofpoint-GUID: ahzC22dwqHerzUWqXeuozUEHQZwQfb0p X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-06_01,2023-11-02_03,2023-05-22_02 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 In order to avoid linking with Libs.private, libarchive is not added to ext_deps during the meson setup stage. Since libarchive is not added to ext_deps, cross-compilation or native compilation with libarchive installed in non-standard location fails with errors related to "cannot find -larchive" or "archive.h: No such file or directory". In order to fix the build failures, user is required to define the 'c_args' and 'c_link_args' with '-I' and '-L'. This patch adds libarchive to ext_deps and further would not require setting c_args and c_link_args externally. Fixes: 40edb9c0d36b ("eal: handle compressed firmware") Cc: stable@dpdk.org Signed-off-by: Srikanth Yalavarthi --- v5: - Updated as per review comments v4: - Rebase over latest main v3: - Add to libarchive ext_deps v2: - Update ml/cnxk meson config v1: - Initial patch config/meson.build | 5 ----- lib/eal/meson.build | 3 +++ 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/config/meson.build b/config/meson.build index 0968351740..250833d0a4 100644 --- a/config/meson.build +++ b/config/meson.build @@ -241,11 +241,6 @@ dpdk_conf.set('RTE_BACKTRACE', cc.has_header('execinfo.h') or is_windows) libarchive = dependency('libarchive', required: false, method: 'pkg-config') if libarchive.found() dpdk_conf.set('RTE_HAS_LIBARCHIVE', 1) - # Push libarchive link dependency at the project level to support - # statically linking dpdk apps. Details at: - # https://inbox.dpdk.org/dev/20210605004024.660267a1@sovereign/ - add_project_link_arguments('-larchive', language: 'c') - dpdk_extra_ldflags += '-larchive' endif # check for libbsd diff --git a/lib/eal/meson.build b/lib/eal/meson.build index 9942104386..e1d6c4cf17 100644 --- a/lib/eal/meson.build +++ b/lib/eal/meson.build @@ -21,6 +21,9 @@ endif if dpdk_conf.has('RTE_USE_LIBBSD') ext_deps += libbsd endif +if dpdk_conf.has('RTE_HAS_LIBARCHIVE') + ext_deps += libarchive +endif if cc.has_function('getentropy', prefix : '#include ') cflags += '-DRTE_LIBEAL_USE_GETENTROPY' endif -- 2.42.0