From: Bruce Richardson <bruce.richardson@intel.com>
To: dev@dpdk.org
Cc: Bruce Richardson <bruce.richardson@intel.com>,
stable@dpdk.org, Kai Ji <kai.ji@intel.com>,
Pablo de Lara <pablo.de.lara.guarch@intel.com>,
Akhil Goyal <gakhil@marvell.com>,
Ciara Power <ciara.power@intel.com>, Ray Kinsella <mdr@ashroe.eu>,
Fan Zhang <fanzhang.oss@gmail.com>
Subject: [PATCH 2/3] crypto/ipsec_mb: fix build failures due to incompatible lib
Date: Thu, 31 Aug 2023 13:10:57 +0100 [thread overview]
Message-ID: <20230831121058.725577-3-bruce.richardson@intel.com> (raw)
In-Reply-To: <20230831121058.725577-1-bruce.richardson@intel.com>
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 <bruce.richardson@intel.com>
---
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
--
2.39.2
next prev parent reply other threads:[~2023-08-31 12:11 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20230831121058.725577-1-bruce.richardson@intel.com>
2023-08-31 12:10 ` [PATCH 1/3] vhost: fix build for powerpc Bruce Richardson
2023-09-01 14:59 ` Bruce Richardson
2023-09-12 18:30 ` David Christensen
2023-09-29 14:47 ` Maxime Coquelin
2023-08-31 12:10 ` Bruce Richardson [this message]
2023-08-31 13:18 ` [PATCH 2/3] crypto/ipsec_mb: fix build failures due to incompatible lib Power, Ciara
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230831121058.725577-3-bruce.richardson@intel.com \
--to=bruce.richardson@intel.com \
--cc=ciara.power@intel.com \
--cc=dev@dpdk.org \
--cc=fanzhang.oss@gmail.com \
--cc=gakhil@marvell.com \
--cc=kai.ji@intel.com \
--cc=mdr@ashroe.eu \
--cc=pablo.de.lara.guarch@intel.com \
--cc=stable@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).