rdma: add missing symbols 89/21089/3
authorBenoît Ganne <bganne@cisco.com>
Tue, 6 Aug 2019 16:14:12 +0000 (18:14 +0200)
committerAndrew Yourtchenko <ayourtch@gmail.com>
Wed, 7 Aug 2019 15:53:12 +0000 (15:53 +0000)
rdma-core-25.0 move some symbol to another library, make sure we link
to it.

Type: fix
Fixes: ec757593859bd8c16839ea8a81a2ef4eb8b29539

Change-Id: I6b8a56ea5fc7787d3de0982015ed47b767557c06
Signed-off-by: Benoît Ganne <bganne@cisco.com>
build/external/packages/rdma-core.mk
src/plugins/rdma/CMakeLists.txt

index 9967338..71542d7 100644 (file)
@@ -32,6 +32,7 @@ RDMA_FILES := include/infiniband/verbs.h \
              include/infiniband/ib_user_ioctl_verbs.h \
              include/rdma/ib_user_verbs.h \
              lib/statics/libibverbs.a \
+             util/librdma_util.a \
              lib/statics/libmlx5.a
 
 define  rdma-core_config_cmds
@@ -43,12 +44,14 @@ define  rdma-core_config_cmds
 endef
 
 define  rdma-core_build_cmds
-       $(CMAKE) --build $(rdma-core_build_dir) -- libibverbs.a libmlx5.a > $(rdma-core_build_log)
+       $(CMAKE) --build $(rdma-core_build_dir) -- libibverbs.a librdma_util.a libmlx5.a > $(rdma-core_build_log)
 endef
 
 define  rdma-core_install_cmds
        mkdir -p $(rdma-core_install_dir)
        tar -C $(rdma-core_build_dir) --xform='s|/statics/|/|' -hc $(RDMA_FILES) | tar -C $(rdma-core_install_dir) -xv > $(rdma-core_install_log)
+       mv -v $(rdma-core_install_dir)/util/librdma_util.a $(rdma-core_install_dir)/lib >> $(rdma-core_install_log)
+       rmdir $(rdma-core_install_dir)/util
 endef
 
 $(eval $(call package,rdma-core))
index 7b6b37c..432330d 100644 (file)
@@ -19,9 +19,10 @@ if (NOT IBVERBS_INCLUDE_DIR)
 endif()
 
 vpp_plugin_find_library(rdma IBVERBS_LIB libibverbs.a)
+vpp_plugin_find_library(rdma RDMA_UTIL_LIB librdma_util.a)
 vpp_plugin_find_library(rdma MLX5_LIB libmlx5.a)
 
-if (NOT IBVERBS_LIB OR NOT MLX5_LIB)
+if (NOT IBVERBS_LIB OR NOT RDMA_UTIL_LIB OR NOT MLX5_LIB)
   message(WARNING "rdma plugin - ibverbs not found - rdma plugin disabled")
   return()
 endif()
@@ -30,7 +31,7 @@ if (MLX5_LIB)
   string_append(RDMA_LINK_FLAGS "-Wl,--whole-archive,${MLX5_LIB},--no-whole-archive")
 endif()
 
-set(CMAKE_REQUIRED_FLAGS "-fPIC -shared ${IBVERBS_LIB} ${RDMA_LINK_FLAGS}")
+set(CMAKE_REQUIRED_FLAGS "-fPIC -shared ${IBVERBS_LIB} ${RDMA_UTIL_LIB} ${RDMA_LINK_FLAGS}")
 CHECK_C_SOURCE_COMPILES("" IBVERBS_COMPILES_CHECK)
 
 if (NOT IBVERBS_COMPILES_CHECK)
@@ -58,4 +59,5 @@ add_vpp_plugin(rdma
 
   LINK_LIBRARIES
   ${IBVERBS_LIB}
+  ${RDMA_UTIL_LIB}
 )