Skip to content

Commit 712b818

Browse files
nspringmeta-codesync[bot]
authored andcommitted
make libibverbs/rdma-core in getdeps buildable from source
Summary: X-link: https://github.com/facebookexternal/rdma_gen/pull/16 Recent changes expect rdma-core-60 as an available build dependency, so : 1. alter the libibverbs manifest to enable building from source, where the trickiness of building from source is that we need to configure the runtime path for ibacm to be shorter than the getdeps default hash-including path. 2. include rdma-core in libibverbs since a from-source build would create it and we shouldn't have to build from source twice if we want both packages. 3. update the github actions without allow-system-deps so we're more likely to build. Reviewed By: anikravesh, ccanel Differential Revision: D88520301 fbshipit-source-id: 66cecc410e89d224594ba30170df06ef925657bb
1 parent 57f84ee commit 712b818

File tree

2 files changed

+49
-0
lines changed

2 files changed

+49
-0
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Find the ibverbs libraries
2+
#
3+
# The following variables are optionally searched for defaults
4+
# IBVERBS_ROOT_DIR: Base directory where all ibverbs components are found
5+
# IBVERBS_INCLUDE_DIR: Directory where ibverbs headers are found
6+
# IBVERBS_LIB_DIR: Directory where ibverbs libraries are found
7+
8+
# The following are set after configuration is done:
9+
# IBVERBS_FOUND
10+
# IBVERBS_INCLUDE_DIRS
11+
# IBVERBS_LIBRARIES
12+
13+
find_path(IBVERBS_INCLUDE_DIRS
14+
NAMES infiniband/verbs.h
15+
HINTS
16+
${IBVERBS_INCLUDE_DIR}
17+
${IBVERBS_ROOT_DIR}
18+
${IBVERBS_ROOT_DIR}/include)
19+
20+
find_library(IBVERBS_LIBRARIES
21+
NAMES ibverbs
22+
HINTS
23+
${IBVERBS_LIB_DIR}
24+
${IBVERBS_ROOT_DIR}
25+
${IBVERBS_ROOT_DIR}/lib)
26+
27+
include(FindPackageHandleStandardArgs)
28+
find_package_handle_standard_args(ibverbs DEFAULT_MSG IBVERBS_INCLUDE_DIRS IBVERBS_LIBRARIES)
29+
mark_as_advanced(IBVERBS_INCLUDE_DIRS IBVERBS_LIBRARIES)

build/fbcode_builder/manifests/libibverbs

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,26 @@ name = libibverbs
33

44
[debs]
55
libibverbs-dev
6+
rdma-core
67

78
[rpms]
89
libibverbs
10+
rdma-core-devel
11+
12+
[download]
13+
url = https://github.com/linux-rdma/rdma-core/releases/download/v60.0/rdma-core-60.0.tar.gz
14+
sha256 = 9b1b892e4eaaaa5dfbade07a290fbf5079e39117724fa1ef80d0ad78839328de
15+
16+
[build]
17+
builder = cmake
18+
subdir = rdma-core-60.0
19+
20+
[dependencies]
21+
libnl
22+
23+
[cmake.defines]
24+
NO_MAN_PAGES=1
25+
NO_PYVERBS=1
26+
ENABLE_RESOLVE_NEIGH=0
27+
# Use absolute short path for runtime dir to avoid Unix socket path length limit (108 chars)
28+
CMAKE_INSTALL_RUNDIR=/tmp/ibacm

0 commit comments

Comments
 (0)