From: Shreesh Adiga <16567adigashreesh@gmail.com>
To: Long Li <longli@microsoft.com>, Wei Hu <weh@microsoft.com>
Cc: dev@dpdk.org, stable@dpdk.org, thomas@monjalon.net
Subject: [PATCH] net/mana: support rdma-core via pkg-config in meson
Date: Fri, 20 Sep 2024 16:41:16 +0530 [thread overview]
Message-ID: <20240920111116.1486095-1-16567adigashreesh@gmail.com> (raw)
Currently building with custom rdma-core installed in /opt/rdma-core
after setting PKG_CONFIG_PATH=/opt/rdma-core/lib64/pkgconfig/ results
in the below meson logs:
Run-time dependency libmana found: YES 1.0.54.0
Header "infiniband/manadv.h" has symbol "manadv_set_context_attr" : NO
Thus to fix this, the libs is updated in meson.build and is passed to
the cc.has_header_symbol call using dependencies. After this change,
the libmana header files are getting included and net/mana is
successfully enabled.
Fixes: 517ed6e2d590 ("net/mana: add basic driver with build environment")
Cc: longli@microsoft.com
Cc: stable@dpdk.org
Signed-off-by: Shreesh Adiga <16567adigashreesh@gmail.com>
---
drivers/net/mana/meson.build | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net/mana/meson.build b/drivers/net/mana/meson.build
index 2d72eca5a8..3ddc230ab4 100644
--- a/drivers/net/mana/meson.build
+++ b/drivers/net/mana/meson.build
@@ -19,12 +19,14 @@ sources += files(
)
libnames = ['ibverbs', 'mana']
+libs = []
foreach libname:libnames
lib = dependency('lib' + libname, required:false)
if not lib.found()
lib = cc.find_library(libname, required:false)
endif
if lib.found()
+ libs += lib
ext_deps += lib
else
build = false
@@ -43,7 +45,7 @@ required_symbols = [
]
foreach arg:required_symbols
- if not cc.has_header_symbol(arg[0], arg[1])
+ if not cc.has_header_symbol(arg[0], arg[1], dependencies: libs, args: cflags)
build = false
reason = 'missing symbol "' + arg[1] + '" in "' + arg[0] + '"'
subdir_done()
--
2.44.2
next reply other threads:[~2024-09-20 11:11 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-20 11:11 Shreesh Adiga [this message]
2024-09-20 17:14 ` Long Li
2024-09-22 0:15 ` Ferruh Yigit
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=20240920111116.1486095-1-16567adigashreesh@gmail.com \
--to=16567adigashreesh@gmail.com \
--cc=dev@dpdk.org \
--cc=longli@microsoft.com \
--cc=stable@dpdk.org \
--cc=thomas@monjalon.net \
--cc=weh@microsoft.com \
/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).