summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2013-04-19 11:27:59 +0200
committerJakub Hrozek <jhrozek@redhat.com>2013-04-22 15:34:44 +0200
commit97bc9a1db9730f8a1875a62670c1a11a4c5e0844 (patch)
tree123bbe1d4f1fe31e20ae533e13adfe39890f7dba
parentedaa983d094c239c3e1ba667bcd20ed3934be3b8 (diff)
downloadsssd-97bc9a1db9730f8a1875a62670c1a11a4c5e0844.tar.gz
sssd-97bc9a1db9730f8a1875a62670c1a11a4c5e0844.tar.bz2
sssd-97bc9a1db9730f8a1875a62670c1a11a4c5e0844.zip
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
-rw-r--r--Makefile.am1
1 files changed, 1 insertions, 0 deletions
diff --git a/Makefile.am b/Makefile.am
index 09056b5d..ef180224 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) \