Skip to content

Commit

Permalink
net/mana: support rdma-core via pkg-config in meson
Browse files Browse the repository at this point in the history
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: 517ed6e ("net/mana: add basic driver with build environment")
Cc: stable@dpdk.org

Signed-off-by: Shreesh Adiga <16567adigashreesh@gmail.com>
Acked-by: Long Li <longli@microsoft.com>
  • Loading branch information
tantei3 authored and ferruhy committed Sep 22, 2024
1 parent e4299cf commit 8d53753
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/net/mana/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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()
Expand Down

0 comments on commit 8d53753

Please sign in to comment.