From 1a8f8b789c1a001c7b7815a5f290c061d80a2726 Mon Sep 17 00:00:00 2001 From: Minh Diep Date: Tue, 11 May 2021 22:58:28 -0700 Subject: [PATCH] EX-3124 build: liblnetconfig.so.4 is needed by liblustreapi.so Need to include llnetconfig libssh >= 0.8.0 does not provide libssh_thread.so anymore Change-Id: Ia3884dd1c45712c099ab1e03739f6ba684c11ae1 Signed-off-by: Minh Diep Reviewed-on: https://review.whamcloud.com/43670 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Jian Yu Reviewed-by: John L. Hammond --- lipe/configure.ac | 8 +++++++- lipe/src/Makefile.am | 6 +++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/lipe/configure.ac b/lipe/configure.ac index 1e76a0c..d0b214c 100644 --- a/lipe/configure.ac +++ b/lipe/configure.ac @@ -119,7 +119,7 @@ AC_DEFINE([HAVE_LAZY_SIZE_ON_MDT], 1, # -------- check for llapi_changelog_in_buf() -------- AC_MSG_CHECKING([Lustre have llapi_changelog_in_buf()]) saved_libs=$LIBS -LIBS="-llustreapi" +LIBS="-llustreapi -llnetconfig" AC_LINK_IFELSE([AC_LANG_SOURCE([ #include @@ -208,6 +208,12 @@ AC_CHECK_LIB([ssh], [ssh_new], [ libssh library is needed for lpurge. Install libssh please.]) ]) +PKG_CHECK_MODULES([libssh_threads], [libssh_threads], + [have_lssh_threads=yes], + [have_lssh_threads=no], +) +AM_CONDITIONAL([HAVE_SSH_THREADS], [test x$have_lssh_threads = xyes]) + # -------- check whether enable zfs support -------- AC_MSG_CHECKING([whether enable zfs support]) AC_ARG_ENABLE([zfs], diff --git a/lipe/src/Makefile.am b/lipe/src/Makefile.am index 9ce6b9a..a953616 100644 --- a/lipe/src/Makefile.am +++ b/lipe/src/Makefile.am @@ -67,7 +67,11 @@ lipe_ssh_SOURCES = lipe_ssh.c lipe_ssh.h lamigo_SOURCES = lamigo.c lamigo.h lamigo_alr.c lamigo_hash.c lamigo_hash.h \ $(LIPE_SOURCES) $(lipe_ssh_SOURCES) lamigo_CFLAGS = $(LIPE_CFLAGS) -lamigo_LDFLAGS = $(LIPE_LDFLAGS) -lssh -lssh_threads +lamigo_LDFLAGS = $(LIPE_LDFLAGS) -lssh + +if HAVE_SSH_THREADS +lamigo_LDFLAGS += -lssh_threads +endif lpurge_SOURCES = lpurge.c $(LIPE_SOURCES) lpurge_CFLAGS = $(LIPE_CFLAGS) -- 1.8.3.1