Libpbs does not depend on libcrypto nor libpthread

As initially reported at 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 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/ b/src/lib/Libpbs/
index ea695ee..b7d6752 100755
--- a/src/lib/Libpbs/
+++ b/src/lib/Libpbs/
@@ -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 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:

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


Thanks !
i made to fix this