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 02D2E4327C; Fri, 3 Nov 2023 17:51:13 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 634F342DE4; Fri, 3 Nov 2023 17:51:12 +0100 (CET) Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.93]) by mails.dpdk.org (Postfix) with ESMTP id 2FD964014F; Fri, 3 Nov 2023 17:51:10 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1699030270; x=1730566270; h=date:from:to:cc:subject:message-id:references: in-reply-to:mime-version; bh=KXg/ZG4wRhowMPZxl5kZuo9WHOoo7lbSse45/maCafU=; b=D1JWMDSV3GN8XtsEE7d4djZf4wjhQnMUdsUaGekFh01J+Vb5dtSZg74p SIcgoTXoRAyA9mxMcFOMwbd6cGdnJKJuB0y2A331bhD/W64GILsmPhEIM crnd3Lygja+wyZm+Ei93efeGchwMODo6jaWBwtcd0LtFfIuNKLIuIUFMz dtoFly01TSDDebcl2hstVc7aUbCj/JO8R3ygr0GrVJSvJ3hIgq9r6nRNG CgqVMNT6eFoRPKT34idhe5knKN8tnp5LzN9Ko5QURG31t6ekJUurbnVsP PonUkS3vptxhRIryDIuCDE2ZfQ4n/0scZfBJtguG6RFyxj+0DvUnVm3ds w==; X-IronPort-AV: E=McAfee;i="6600,9927,10883"; a="386152265" X-IronPort-AV: E=Sophos;i="6.03,273,1694761200"; d="scan'208";a="386152265" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Nov 2023 09:51:09 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10883"; a="852318891" X-IronPort-AV: E=Sophos;i="6.03,273,1694761200"; d="scan'208";a="852318891" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by FMSMGA003.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 03 Nov 2023 09:51:09 -0700 Received: from fmsmsx612.amr.corp.intel.com (10.18.126.92) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.34; Fri, 3 Nov 2023 09:51:08 -0700 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx612.amr.corp.intel.com (10.18.126.92) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.34; Fri, 3 Nov 2023 09:51:08 -0700 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.34 via Frontend Transport; Fri, 3 Nov 2023 09:51:08 -0700 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.168) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.34; Fri, 3 Nov 2023 09:51:07 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=oACsO7eqwRJEmJBFDwJJVs4yzvs6QiIjpKJvDL6tvrm8eWkQ0p7gs8Mh2jui+Vqa+5+B6+jRUFPua9zGnupjXH92q2B1+/WKJF1N9469KUQIk+ZZ/0hUBHKxJF+cXiCyIDjfLWXesHIf4WAH53fS8qocmTZzmwDC3NHsi/xtpyI/lcHwP8s6utf/UnO7jMqqKJiLFRXKV1VXMdm7pviifj/atErCNDZplzKCvHuaoFd8Cj6ACvbeyitAx1/N0j5SCS41upALOzdP2M6d574HDAzhXIXfCPjf8uJkGsi/HYXp4qSRna8RC07fEdd+i929yKK/tBv3IHGS2K3UXdFD1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Ayq8siAncEjJ7dcrj7l2VHUln/GBmnTRVbEzJx8TsW4=; b=hq6B8e+5F8zkqoeZxKP8n0JdvE2oHJWU94j9quZA1ozP7lvqK3lhc4MvvVV331tIf00qdQ2/kK/e78naNblYPgynt+AIpgBRuMTRqfxS3pT//gyVpj6DqkQiYcMeR5hY0FCu22LrHIuftN8grDkkye3iBQ9VCRCWI5m04QT0N3DdobeW7tuJm+XGwe9dnrJmbtYjNZU+dKdkjlZYqlcjoZUzX/qNyaIceASXQfLeW/A3l9cgLerBu6Ox4BGyWw8ZdAtmvKF6X2EUzuuYEck5JGAzyQJShd0eG9bZAUHoznbaJEipRjhxoTks1BZFs4Fp7NhmH7HF8d0mnEBvlpe2zA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from DS0PR11MB7309.namprd11.prod.outlook.com (2603:10b6:8:13e::17) by SN7PR11MB6922.namprd11.prod.outlook.com (2603:10b6:806:2a9::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6907.33; Fri, 3 Nov 2023 16:51:05 +0000 Received: from DS0PR11MB7309.namprd11.prod.outlook.com ([fe80::d70b:11a0:d28f:ec44]) by DS0PR11MB7309.namprd11.prod.outlook.com ([fe80::d70b:11a0:d28f:ec44%6]) with mapi id 15.20.6954.021; Fri, 3 Nov 2023 16:51:04 +0000 Date: Fri, 3 Nov 2023 16:50:58 +0000 From: Bruce Richardson To: Srikanth Yalavarthi CC: David Marchand , Aaron Conole , Igor Russkikh , , , , , Subject: Re: [PATCH v4 1/1] build: add libarchive to external deps Message-ID: References: <20231020170135.18319-1-syalavarthi@marvell.com> <20231103163853.29576-1-syalavarthi@marvell.com> Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20231103163853.29576-1-syalavarthi@marvell.com> X-ClientProxiedBy: DB8PR06CA0045.eurprd06.prod.outlook.com (2603:10a6:10:120::19) To DS0PR11MB7309.namprd11.prod.outlook.com (2603:10b6:8:13e::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS0PR11MB7309:EE_|SN7PR11MB6922:EE_ X-MS-Office365-Filtering-Correlation-Id: 6533589f-b3ae-408b-766d-08dbdc8d113a X-LD-Processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 6mEP68HY0UfFUNeoaCJn1PYyxX8ibEG6MmhYsZYY8u5OxsvWMlEkqCvLIRRpJ86wnX5pkBnuMj5w4qsNQ0n2KvC3nPxuJsd3sN+UoteJtdsQWx5o01VZN/B5Cj3yAnCTYC9iw/jIRVFlk0Id7jPgbkZnCAZO7apIftP2djqJuYpX6JBeltPv/hsvZAzN3oZ/DGVjq/qQxjkTXh6kx3Kw3pNgxc7TVxqQCJuHkAeAWgOf+6C1guszQEn08eXk/efzKOxF46PoU/NmES+US4xmdYB1Dw4/gFBNnI9nOI8eiD/0Cy5F4/o8I5cyUkxT6fHYXwPzVRR1u/ND+pMMZX2wo7Bq6EdXTQSrZlFN69MyfYIy+Q2vNbQnnlDjV3jtAirIrTDvGHub1QLN8jU7KiA+opYdqm6tMj3tg68T9YLR/SXE3beQzmiaHoBciVY7w78HuEs/+c/kBZmHDhV2tMuQlZ1bjL2xYH9uAlXu8/lq5R8OhxwehtfRWlkna8RyBwf+JO+1TYGoVefieG1u8QONm7PORi9kFLq/4ugHPsz5+ovJ/ST8Dd+L7S8QfT/M4m0YkPnym8zP7JfaqeAAjw7u+8dqiltQVJgMgESnxYX1NgDeADUGIA3gqFGhOjAm05Ca X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DS0PR11MB7309.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(136003)(376002)(396003)(346002)(39860400002)(366004)(230922051799003)(230273577357003)(230173577357003)(451199024)(1800799009)(64100799003)(186009)(83380400001)(26005)(6506007)(6512007)(86362001)(82960400001)(38100700002)(478600001)(316002)(6916009)(8936002)(8676002)(4326008)(6666004)(44832011)(6486002)(5660300002)(41300700001)(966005)(2906002)(66556008)(66946007)(66476007)(54906003); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?NVMTUqrvqssg6LjDZmnXsTKncxCIblf5LQbSZQpoLoQouLo9e0PABKIlrZDp?= =?us-ascii?Q?8yrfoJ5PLBJuEtw3imVhxUZeSYWzZKYe6G4RYLDuagJn54vAJK68rkxX8jLZ?= =?us-ascii?Q?GX2IhUGKr6rExBsZ9KwofFOpQ2j+LYBug9yzn6imyQoSZ6XS6c9bcHd+22XQ?= =?us-ascii?Q?spQsDWMgzq3DUyws8KnXdaITvBHTYuB1YOrGDxsHwYntBQ0J8as5YzeyuHMi?= =?us-ascii?Q?SoB7sOEBVRVscuwciX0+Kr1HygZKhb0ruNY1ut2y4fyfdPcZ0g7xlDZyrjHq?= =?us-ascii?Q?HqeRgbaZmtSkrlXNhUBMOAHVc1QRzurY2y9vMAKaaabyUQSM9Ujk1hDWcW5n?= =?us-ascii?Q?C8fQNshXK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+hRmu9tva7GZawK?= =?us-ascii?Q?3Y/dx5tunFj637yQzaUrNh1n81V3tUYOiBf3zX3y53vf+eG5ACBFzW658LuL?= =?us-ascii?Q?SxJsrCewfIZGP4QW21E3FWm3nAyQBuc2tlSUmSGeMGv2IIyX345SLn7qkO4m?= =?us-ascii?Q?dn2PfPClHyWcabT2olO/r3bQFbfh0yI4M1N0n1EvBY5+0xbPP1a1cuuOLcME?= =?us-ascii?Q?7J1EiH3lIXwA7cOfMEzwWVfPq8LDTHz9hhtBhLx9/dqUGW56dULy7sC+3NUi?= =?us-ascii?Q?DUN1eCvV8ZL4LoPZutFNdo2oQJQTszxW/VMh2+aJ3DzvJQUbZU41GyYvT4rQ?= =?us-ascii?Q?XjDUYgCrkc88QnD/cPnX7jWEgeE54U4lQzl0+vujHwlF1EWYpgOeTzhgpeLz?= =?us-ascii?Q?Bg=3D=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: 6533589f-b3ae-408b-766d-08dbdc8d113a X-MS-Exchange-CrossTenant-AuthSource: DS0PR11MB7309.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Nov 2023 16:51:04.2780 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: sKEzthUR3TIwvHvaR00FdgfYLq01Cn3JrM1Oowb+0perWusYehUFn24aQe4pZ2/T+oxO/EEgOBXijjd7gRtoluJA+xiKiU+3snIKnBRSYEQ= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN7PR11MB6922 X-OriginatorOrg: intel.com 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 On Fri, Nov 03, 2023 at 09:38:53AM -0700, Srikanth Yalavarthi wrote: > 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 I think this is the cleanest solution to the problem you were having. Acked-by: Bruce Richardson One minor comment below. Patch is ok without taking it on board if you like. > --- > 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 minor nit - I don't think this is necessary. If libarchive is found, then DPDK eal will be linked against it, and so all other drivers should simply have that as a transitive dependency. Same probably applies to jansson. > 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 >