patches for DPDK stable branches
 help / color / mirror / Atom feed
* [PATCH] examples/l2fwd-cat: check compatibility of dependency lib
@ 2025-09-23 16:58 Bruce Richardson
  0 siblings, 0 replies; only message in thread
From: Bruce Richardson @ 2025-09-23 16:58 UTC (permalink / raw)
  To: dev; +Cc: Bruce Richardson, stable

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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-09-23 16:58 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-09-23 16:58 [PATCH] examples/l2fwd-cat: check compatibility of dependency lib Bruce Richardson

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).