Libpbs does not depend on libcrypto nor libpthread

As initially reported at https://www.mail-archive.com/users@lists.open-mpi.org/msg31288.html it is necessary to manually add some libraries in order to use libpbs.
on my centos 7 box, a minimal program like this one

#include <tm.h>

int main (int argc, char *argv[])
{
    struct tm_roots *roots;
    void * info;

    return tm_init (info, roots);
}

needs to be linked with -lcrypto -lpthread on top of -lpbs

is there any reason why libpbs.so does not depend on libcrypto and libpthread ?

fwiw, the inline patch below fixes this (e.g. no more need for -lcrypto -lpthread)

diff --git a/src/lib/Libpbs/Makefile.am b/src/lib/Libpbs/Makefile.am
index ea695ee..b7d6752 100755
--- a/src/lib/Libpbs/Makefile.am
+++ b/src/lib/Libpbs/Makefile.am
@@ -47,6 +47,10 @@ libpbs_la_CPPFLAGS = -I$(top_srcdir)/src/include
 #
 libpbs_la_LDFLAGS = -version-info 0:0:0
 
+libpbs_la_LIBADD= \
+       -lcrypto \
+       -lpthread
+
 libpbs_la_SOURCES = \
        ../Libattr/attr_fn_arst.c \
        ../Libattr/attr_fn_b.c \

I think it comes from the history of libpbs being distributed as an archive library, which means only necessary code was pulled into executables from libpbs.a and some of them might have needed crypto or libpthread, but not all.

Of course, now that it is a shared library, it would be way more beneficial for libpbs.so to itself record the dependencies on these two.

This topic was discussed in the PBS forums here: Compile OpenMPI with PBSpro 14.1.10
and a bug had been logged here: https://pbspro.atlassian.net/browse/PP-360

You are very welcome to submit a fix to this bug.

Thanks

Thanks !
i made https://github.com/PBSPro/pbspro/pull/331 to fix this