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 270464327C for ; Fri, 3 Nov 2023 17:39:05 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1EC1540EDC; Fri, 3 Nov 2023 17:39:05 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id AAD594014F; Fri, 3 Nov 2023 17:39:02 +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 3A3BVjDt028141; Fri, 3 Nov 2023 09:39:01 -0700 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=CBva29lv3qrVY8RVEsD/MibJHZTn8TF6acn25sc7Ihs=; b=ETtgwXHxyl27jSna42iZjRlY2Ws0vzab/XoYcH5Pj8dc9mqq7hVikWDMmYNz6n3aLzh3 8FAncFDM4Vf1Pykg1fD8Nbx69f6n4abEIdDoAP3nRFAJqrOBayttpnI5EP/FaYtnkjee EScK4BDaVZJCgAnAgBd/FajAvGPHfhUTy98Y+r/EjTD0yBNAyazble8qfjwh9aGmxe4a KVMRp1THD4KIkNUbsK9sl9g6V/7Qj5w1vwKGcmotCxBHH7F/jRZ+RRMhdgDNUjj5gYQ0 2Txz2YNqaOk7ENCUrCmJFXhSmdHYvLdT90ZhQueMqMPPg0UbESyMsE4or7yfQlB9gr6r fw== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3u4upkhqw4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Fri, 03 Nov 2023 09:39:01 -0700 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Fri, 3 Nov 2023 09:39:00 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.48 via Frontend Transport; Fri, 3 Nov 2023 09:39:00 -0700 Received: from ml-host-33.caveonetworks.com (unknown [10.110.143.233]) by maili.marvell.com (Postfix) with ESMTP id B9B4C3F70B2; Fri, 3 Nov 2023 09:38:59 -0700 (PDT) From: Srikanth Yalavarthi To: Bruce Richardson , Srikanth Yalavarthi , David Marchand , "Aaron Conole" , Igor Russkikh CC: , , , , Subject: [PATCH v4 1/1] build: add libarchive to external deps Date: Fri, 3 Nov 2023 09:38:53 -0700 Message-ID: <20231103163853.29576-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: pv_RuBl0sm_dA9PuJoUdywoKCWIdVr69 X-Proofpoint-GUID: pv_RuBl0sm_dA9PuJoUdywoKCWIdVr69 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-03_15,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 --- v4: - Rebase over latest main v3: - Add to libarchive ext_deps v2: - Update ml/cnxk meson config v1: - Initial patch config/meson.build | 5 ----- drivers/ml/cnxk/meson.build | 1 + lib/eal/meson.build | 3 +++ 3 files changed, 4 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/drivers/ml/cnxk/meson.build b/drivers/ml/cnxk/meson.build index 0680a0faa5..921dc7e89b 100644 --- a/drivers/ml/cnxk/meson.build +++ b/drivers/ml/cnxk/meson.build @@ -67,6 +67,7 @@ sources += files( 'mvtvm_ml_model.c', ) +ext_deps += libarchive ext_deps += jansson_dep ext_deps += dlpack_dep ext_deps += dmlc_dep 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