patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Bruce Richardson <bruce.richardson@intel.com>
To: dev@dpdk.org
Cc: Bruce Richardson <bruce.richardson@intel.com>, stable@dpdk.org
Subject: [PATCH] examples/l2fwd-cat: check compatibility of dependency lib
Date: Tue, 23 Sep 2025 17:58:30 +0100	[thread overview]
Message-ID: <20250923165830.527416-1-bruce.richardson@intel.com> (raw)

The meson find_library() function can sometimes return incompatible
libraries which are unsuitable for linking. For example, after
installing the native x86 pqos library on my system, arm64 builds
started trying (and failing) to build the l2fwd-cat example app. Fix
this incorrect detection in our build files by checking that the found
pqos library can actually be used to link apps.

Fixes: dd25c80b4f48 ("examples/l2fwd-cat: make build dependent on pqos lib")
Cc: stable@dpdk.org

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 examples/l2fwd-cat/meson.build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/examples/l2fwd-cat/meson.build b/examples/l2fwd-cat/meson.build
index ebcc3f66f2..be29657ebb 100644
--- a/examples/l2fwd-cat/meson.build
+++ b/examples/l2fwd-cat/meson.build
@@ -7,7 +7,7 @@
 # DPDK instance, use 'make'
 
 pqos = cc.find_library('pqos', required: false)
-build = pqos.found()
+build = (pqos.found() and cc.links('int main(void) { return 0; }', dependencies: pqos))
 if not build
     subdir_done()
 endif
-- 
2.48.1


                 reply	other threads:[~2025-09-23 16:58 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20250923165830.527416-1-bruce.richardson@intel.com \
    --to=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --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).