Skip to content

Commit ea44b40

Browse files
authored
Merge pull request #27 from johndale88/CSCwo32699
Fix RPATH and enable compiling with libfabric 2.0
2 parents a67ba09 + 42ac029 commit ea44b40

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

configure.ac

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,22 +61,23 @@ AS_IF([test "$with_libfabric" = "yes"],
6161
AS_IF([test "$with_libfabric" = "no"],
6262
[AC_MSG_WARN([Cannot specify --without-libfabric])
6363
AC_MSG_ERROR([Cannot continue])])
64+
fab_libdir=
6465
AS_IF([test "x$with_libfabric" != "x"],
6566
[include_happy=0
6667
lib_happy=0
6768
AS_IF([test -d "$with_libfabric/include"], [include_happy=1])
6869
AS_IF([test -d "$with_libfabric/lib64"],
69-
[fab_libdir=lib64
70+
[fab_libdir=$(readlink -f $with_libfabric/lib64)
7071
lib_happy=1])
7172
AS_IF([test -d "$with_libfabric/lib"],
72-
[fab_libdir=lib
73+
[fab_libdir=$(readlink -f $with_libfabric/lib)
7374
lib_happy=1])
7475
AS_IF([test $include_happy -eq 0 || test $lib_happy -eq 0],
7576
[AC_MSG_WARN([Could not find include or lib dir in $with_libfabric])
7677
AC_MSG_ERROR([Cannot continue])])
7778
7879
CPPFLAGS="-I$with_libfabric/include $CPPFLAGS"
79-
LDFLAGS="-L$with_libfabric/$fab_libdir $LDFLAGS"
80+
LDFLAGS="-L$fab_libdir $LDFLAGS"
8081
])
8182

8283
dnl Checks for libraries
@@ -116,7 +117,7 @@ AC_CHECK_LIB([fabric], fi_version,
116117
LDFLAGS=$LDFLAGS_save])
117118

118119
# If RPATH works, see if RUNPATH works, too
119-
AS_IF([test $rpath_works -eq 1],
120+
AS_IF([test $rpath_works -eq 1 && test -n "$fab_libdir"],
120121
[LDFLAGS_save2=$LDFLAGS
121122
LDFLAGS="$LDFLAGS_save -Wl,-rpath -Wl,$fab_libdir -Wl,--enable-new-dtags"
122123
AC_CHECK_LIB([fabric], fi_log, [],

usnic_devinfo.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,9 @@ int main(int argc, char *argv[]) {
241241
hints->ep_attr->type = FI_EP_DGRAM;
242242

243243
hints->caps = FI_MSG;
244-
hints->mode = FI_LOCAL_MR;
244+
#if FI_MAJOR_VERSION < 2
245+
hints->mode = FI_LOCAL_MR;
246+
#endif
245247
hints->addr_format = FI_SOCKADDR;
246248

247249
if (devno != -1) {

0 commit comments

Comments
 (0)