From 97bc9a1db9730f8a1875a62670c1a11a4c5e0844 Mon Sep 17 00:00:00 2001 From: Jakub Hrozek Date: Fri, 19 Apr 2013 11:27:59 +0200 Subject: tests: Link the simple access tests with -ldl In SSSD, we use dlopen() and dlsym() in two files src/providers/data_provider_be.c and src/providers/proxy/proxy_init.c. Hence we should explicitly link with -ldl also in simple_access-tests. SSSD can be compiled with two crypto libraries nss or libcrypto. NSS has dependency nspr which depends on "libdl and libpthread" This is a reason why compilation of test did not fail even if -ldl was not explicitly added to simple_access_tests_LDADD. But libcrypto doesn't depend on libdl, so in this case compilation of tests will not be successful. Upstream nspr 4.9 has two ways have to obtain metainformation about libraries pkg-config and own script nspr-config. First one doesn't list "-ldl" "-lpthread" but second one lists both "-ldl" "-lpthread" That's also why the Ubuntu maintainer found this bug -- Fedora has got patched version of nspr, but Debian (Ubuntu) doesn't --- Makefile.am | 1 + 1 file changed, 1 insertion(+) (limited to 'Makefile.am') diff --git a/Makefile.am b/Makefile.am index 09056b5d9..ef1802246 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1058,6 +1058,7 @@ simple_access_tests_CFLAGS = \ $(CHECK_CFLAGS) \ -DUNIT_TESTING simple_access_tests_LDADD = \ + -ldl \ $(SSSD_LIBS) \ $(CARES_LIBS) \ $(CHECK_LIBS) \ -- cgit