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 05CBA43233; Sun, 29 Oct 2023 09:20:13 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8E1454027E; Sun, 29 Oct 2023 09:20:12 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id 48FEE4026B; Sun, 29 Oct 2023 09:20:10 +0100 (CET) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 39T6mN3F003612; Sun, 29 Oct 2023 01:20:09 -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=1QZznHm13cfBn/Hz4uMdhojW7TWww+IMWokNgGybk8c=; b=Q74EvxiaIqJ8VCiOa6TEq7+UoRIv8vy7fG99OmBHIwe96+uJTXWsdgpgbQJhxdnYONk0 NG8Lkh/dIvY0BpzmUUoPp2KyNdQBQniFDki3i89vH7Tu55ykzNe1kjzAqpdA2EJVrunB hTIdeIjOuAlD56QZFRtEL2vUATiCMgc4zzTSQ5NCIbEM3WAHDJy19KE/dxZJcuoHJMQS pFg5vY86e3rKGTayz3LXhnVrL+z6+SQsPOEvJiRNmr2r7GfR5EdVCLYgvgvKv2lkyvoB sHZkQvBMtOLCdtE85iBT2oEIMYopgRN1Nt/NrQCmPbIoKWpePBGwxANIXqmUaL1Y5fOr rg== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3u11tp2896-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Sun, 29 Oct 2023 01:20:09 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Sun, 29 Oct 2023 01:20:07 -0700 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, 29 Oct 2023 01:20:07 -0700 Received: from ml-host-33.caveonetworks.com (unknown [10.110.143.233]) by maili.marvell.com (Postfix) with ESMTP id 3CEE83F70A6; Sun, 29 Oct 2023 01:20:07 -0700 (PDT) From: Srikanth Yalavarthi To: Bruce Richardson , Srikanth Yalavarthi , David Marchand , "Aaron Conole" , Igor Russkikh CC: , , , , Subject: [PATCH v3 1/1] build: add libarchive to external deps Date: Sun, 29 Oct 2023 01:20:04 -0700 Message-ID: <20231029082004.5576-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-GUID: mZmHA9q9JqQLLGW0qrkLTvmDeN4TJqe5 X-Proofpoint-ORIG-GUID: mZmHA9q9JqQLLGW0qrkLTvmDeN4TJqe5 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-10-28_24,2023-10-27_01,2023-05-22_02 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 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 --- Depends-on: series-30002 ("Implementation of revised ml/cnxk driver") v3: - Updated depends on series information v2: - Updated patch to include libarchive to ext_deps v1: - Initial changes 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 d56b0f9bce..4ff101767e 100644 --- a/config/meson.build +++ b/config/meson.build @@ -236,11 +236,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