From patchwork Thu Aug 31 12:10:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruce Richardson X-Patchwork-Id: 130974 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 57A4441FDD; Thu, 31 Aug 2023 14:11:30 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0696440299; Thu, 31 Aug 2023 14:11:28 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.93]) by mails.dpdk.org (Postfix) with ESMTP id A6E6340293; Thu, 31 Aug 2023 14:11:25 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1693483886; x=1725019886; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=TzUf+AsTXV4a4UU+n60cTM7BgW3pcl5CUYEU0i50M70=; b=Xc48u/J+8aPh5I2WC8OlPXpIeTK5ik4SLhRUv8s4/MSaYjisPs5u4Ktp j0QDF4XnKOV9fU/+K4ftESf4z/IG9YRQp5TfIT9jCyr01+NMB0dQP31Pd JlyWh8yEtHMmd4GK+nTvl3n5hFvOHbovRFP9bM1QvdtCXWFFZZWYpuqeF foejz3vyh9Te/ueuarM5LotmibShXbKmciqS1KUGBhcFco8GChEwkJWAr PXTYel/dWn1rpotvG3985oBzmxMDvWy86+vkhBxPdYY5gewM5Xmpek+tK K9/rZkQB98j6H0marZxqUGMwj+o5vPmRrS6oksjQfyeMXdCZ/x+sjinWN g==; X-IronPort-AV: E=McAfee;i="6600,9927,10818"; a="373320714" X-IronPort-AV: E=Sophos;i="6.02,216,1688454000"; d="scan'208";a="373320714" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Aug 2023 05:11:24 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10818"; a="1070238932" X-IronPort-AV: E=Sophos;i="6.02,216,1688454000"; d="scan'208";a="1070238932" Received: from silpixa00401385.ir.intel.com ([10.237.214.14]) by fmsmga005.fm.intel.com with ESMTP; 31 Aug 2023 05:11:22 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: Bruce Richardson , stable@dpdk.org, Kai Ji , Pablo de Lara , Akhil Goyal , Ciara Power , Ray Kinsella , Fan Zhang Subject: [PATCH 2/3] crypto/ipsec_mb: fix build failures due to incompatible lib Date: Thu, 31 Aug 2023 13:10:57 +0100 Message-Id: <20230831121058.725577-3-bruce.richardson@intel.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230831121058.725577-1-bruce.richardson@intel.com> References: <20230831121058.725577-1-bruce.richardson@intel.com> MIME-Version: 1.0 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 When cross-compiling for PowerPC on Ubuntu, the x86 IPSec_MB library was getting found by the build system for use in the PPC build. This led to failures at compile time due to the library not being linkable. We can avoid these failures by checking the discovered library for compatibility at configuration time. This needs a version check as it is supported only from version 0.60 of meson onwards. Fixes: c75542ae4200 ("crypto/ipsec_mb: introduce IPsec_mb framework") Cc: stable@dpdk.org Signed-off-by: Bruce Richardson Acked-by: Ciara Power --- drivers/crypto/ipsec_mb/meson.build | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/crypto/ipsec_mb/meson.build b/drivers/crypto/ipsec_mb/meson.build index 3057e6fd10..87bf965554 100644 --- a/drivers/crypto/ipsec_mb/meson.build +++ b/drivers/crypto/ipsec_mb/meson.build @@ -16,6 +16,11 @@ lib = cc.find_library('IPSec_MB', required: false) if not lib.found() build = false reason = 'missing dependency, "libIPSec_MB"' +# if the lib is found, check it's the right format +elif meson.version().version_compare('>=0.60') and not cc.links( + 'int main(void) {return 0;}', dependencies: lib) + build = false + reason = 'incompatible dependency, "libIPSec_MB"' else ext_deps += lib