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 2802D43382; Wed, 22 Nov 2023 17:47:45 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CA22D410ED; Wed, 22 Nov 2023 17:47:44 +0100 (CET) Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id 217544028C for ; Wed, 22 Nov 2023 17:47:42 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1700671663; x=1732207663; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=I0qsEQ3CIHlQXeY3TzmNnH3NECgTFS5Hm4uJJDQkjgk=; b=LKxlfnDwQzGZsknZVZWZegGaAs+APYmhl9F4u5sUWaTa1v6YoMx318es Sr8MM7CkckBIkeyLvZ2szR4Y07MvWeINKIXtaiVpWeM1W7G/TV5MiR9/a h95UN27dsz1DvHGgYDoDZrLw4iwwgWMBXqvlXscMlMDSocGirOJ786nQg oFD18fWgvOPq82X9w+/kinib8EYPZBCIqQvA78Env2pBa/qpk/Vh/b4oE gGFvuP2YxQ0q+pFlp4m5w1APb3UDOd+KpAXJemAGFrPGukMUg5dI42Isv uaJRlR75w3lzJcOWhqlF+OE4A8hfpJMFb/nSu+2g5fYdhqd3M0zewJy0h Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10902"; a="382499348" X-IronPort-AV: E=Sophos;i="6.04,219,1695711600"; d="scan'208";a="382499348" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Nov 2023 08:47:14 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10902"; a="857810377" X-IronPort-AV: E=Sophos;i="6.04,219,1695711600"; d="scan'208";a="857810377" Received: from silpixa00401385.ir.intel.com ([10.237.214.22]) by FMSMGA003.fm.intel.com with ESMTP; 22 Nov 2023 08:47:09 -0800 From: Bruce Richardson To: dev@dpdk.org Cc: Bruce Richardson , brian.dooley@intel.com, Kai Ji , Pablo de Lara , Ciara Power Subject: [PATCH] common/qat: fix build errors with incompatible IPSec lib Date: Wed, 22 Nov 2023 16:46:51 +0000 Message-Id: <20231122164651.1320497-1-bruce.richardson@intel.com> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 Since "find_library()" is used to find the libipsec_mb library, there is a chance that an incompatible library will be found e.g. when doing cross-builds. To fix this, we copy the logic from the crypto/ipsec_mb driver to actually do a link-check on the library before deciding it can be used. Fixes: ca0ba0e48129 ("crypto/qat: default to IPsec MB for computations") Cc: brian.dooley@intel.com Signed-off-by: Bruce Richardson --- drivers/common/qat/meson.build | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/common/qat/meson.build b/drivers/common/qat/meson.build index edc793ba95..5c36fbb270 100644 --- a/drivers/common/qat/meson.build +++ b/drivers/common/qat/meson.build @@ -43,7 +43,8 @@ else IMB_required_ver = '1.4.0' IMB_header = '#include' libipsecmb = cc.find_library('IPSec_MB', required: false) - if libipsecmb.found() + if libipsecmb.found() and meson.version().version_compare('>=0.60') and cc.links( + 'int main(void) {return 0;}', dependencies: libipsecmb) # version comes with quotes, so we split based on " and take the middle imb_ver = cc.get_define('IMB_VERSION_STR', prefix : IMB_header).split('"')[1] -- 2.40.1