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 BBA43431BC; Fri, 20 Oct 2023 19:01:57 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3A6C1402A2; Fri, 20 Oct 2023 19:01:57 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id 60D834027C; Fri, 20 Oct 2023 19:01:55 +0200 (CEST) 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 39KAoS2x014085; Fri, 20 Oct 2023 10:01:54 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding : content-type; s=pfpt0220; bh=1vZe6R0augbbJ4pPoT+DyB+veUPjlwYgRFDXLlNUbuo=; b=LQtQ1PdjYkc4gQmyMBd4dhPUu+DjBHT1yQNF1Yctyutumyk8kWXjiU0xjzUwX2wDHpCO 6K6Bt8zD6Y003GWuDvdaHDiG1yw6nsWv7VdSBjjdPWHAk0Q3naXhxA+cyPwTqXswqgCW /ODByxODz9K8eRkixeNXiu2VFe+RZZTqIpjk3kpBH+UJWpmZ54Qfan1qoQJ3Pv6iBG48 Fv/zBmIOsMwM74+O/vXKf7IxEg2MlCDO2IzSQ5X/xzduc2nbPJ9ybS74I5uOt/sz7LyS T4m3EO9Sfwtgvf+dakxr/jEo/eps6qylLHgt7jZm4ZFPPc4vXIiTvVgntt5cOkznCcEG Xg== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3tubwykhyc-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Fri, 20 Oct 2023 10:01:53 -0700 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Fri, 20 Oct 2023 10:01:46 -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, 20 Oct 2023 10:01:46 -0700 Received: from ml-host-33.caveonetworks.com (unknown [10.110.143.233]) by maili.marvell.com (Postfix) with ESMTP id 93E8C3F7040; Fri, 20 Oct 2023 10:01:46 -0700 (PDT) From: Srikanth Yalavarthi To: Bruce Richardson , Aaron Conole , Igor Russkikh , David Marchand CC: , , , , Subject: [PATCH 1/1] build: update link args and includes for libarchive Date: Fri, 20 Oct 2023 10:01:35 -0700 Message-ID: <20231020170135.18319-1-syalavarthi@marvell.com> X-Mailer: git-send-email 2.42.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-ORIG-GUID: PeSVdWg6RzhVJWHcV7NI5OccuUWV0u0H X-Proofpoint-GUID: PeSVdWg6RzhVJWHcV7NI5OccuUWV0u0H X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.980,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-10-20_10,2023-10-19_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 all libraries listed as Libs.private in libarchive.pc, libarchive is not added to ext_deps during meson setup. 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 updates meson build files to add libarchive's includedir and libdir to compiler flags and 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 --- config/meson.build | 1 + lib/eal/meson.build | 3 +++ 2 files changed, 4 insertions(+) diff --git a/config/meson.build b/config/meson.build index d56b0f9bce..1bacea74ab 100644 --- a/config/meson.build +++ b/config/meson.build @@ -239,6 +239,7 @@ if libarchive.found() # 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('-L' + libarchive.get_variable(pkgconfig: 'libdir'), language: 'c') add_project_link_arguments('-larchive', language: 'c') dpdk_extra_ldflags += '-larchive' endif diff --git a/lib/eal/meson.build b/lib/eal/meson.build index 9942104386..741a5cd088 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') + includes += include_directories(libarchive.get_variable(pkgconfig: 'includedir')) +endif if cc.has_function('getentropy', prefix : '#include ') cflags += '-DRTE_LIBEAL_USE_GETENTROPY' endif -- 2.42.0