[SSSD] [PATCH] AUTOMAKE: Don't build libsss_test_common every time

Lukas Slebodnik lslebodn at redhat.com
Wed Nov 27 15:52:08 UTC 2013


On (17/09/13 10:18), Lukas Slebodnik wrote:
>On (10/09/13 09:57), Lukas Slebodnik wrote:
>>On (10/09/13 09:50), Lukas Slebodnik wrote:
>>>On (10/09/13 09:48), Lukas Slebodnik wrote:
>>>>ehlo,
>>>>
>>>>Although static library libsss_test_common was used only in tests,
>>>>It was also built with command "make all".
>>>>
>>>>Simple patch is attached.
>>>My hands was fast and now with patch
>>>>
>>>>LS
>>>>_______________________________________________
>>>>sssd-devel mailing list
>>>>sssd-devel at lists.fedorahosted.org
>>>>https://lists.fedorahosted.org/mailman/listinfo/sssd-devel
>>
>>self NACK
>>
>>There is problem with linking. I had to some files cached on first time.
>>
>>libtool: link: cannot find the library `libsss_test_common.la' or unhandled
>>argument `libsss_test_common.la'
>>make[2]: *** [dyndns-tests] Error 1
>>make[2]: *** Waiting for unfinished jobs....
>>libtool: link: cannot find the library `libsss_test_common.la' or unhandled
>>argument `libsss_test_common.la'
>>
>Problem was with parallel build. (make -j)
>Make tries to link dyndns-tests with library libsss_test_common.a, but library
>libsss_test_common.a has not been completed yet.
>
>If we wanted to fix this, we would need to add libsss_test_common.la as a
>dependency to each test. <test>_DEPENDENCIES = libsss_test_common.la
>
>libsss_test_common.la can be build without test libraries (check. cmocka),
>so it can be build within make rule "all".
>
>If there aren't any objections, we can ignore this issue.
>

Problem was not in the patch itself, but because we had disabled automated
computation of build delenpencies for some tests (sysdb_tests, sysdb_ssh_tests,
nss_srv_tests. dyndns_tests). Sumit fixed this problem with patch
https://git.fedorahosted.org/cgit/sssd.git/commit/?id=16c351625346b3193e1762027e5215ab76042127
        s/prog_DEPENDENCIES/EXTRA_prog_DEPENDENCIES/

So, libsss_test_common can be safely moved into check_LTLIBRARIES and parallel
build will not be broken. I think it will be  an advantage for other
distributions, because they don't run tests usually.

Rebased patch is attached.

LS
-------------- next part --------------
>From bc6dec71d7ccf6d149069a110392266779c185d9 Mon Sep 17 00:00:00 2001
From: Lukas Slebodnik <lslebodn at redhat.com>
Date: Tue, 10 Sep 2013 09:39:27 +0200
Subject: [PATCH] AUTOMAKE: Don't build libsss_test_common every time

Although static library libsss_test_common was used only in tests,
it was also built with command "make all"

Resolves:
https://fedorahosted.org/sssd/ticket/2097
---
 Makefile.am | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index d0543d9fbf2b204cd81c46d2eaa9ebe9e28b37ed..d582b9cd6d29165a5321c615549d1a82e32bba79 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -898,7 +898,7 @@ ldb_mod_test_dir: memberof.la
 	mkdir -p $(builddir)/ldb_mod_test_dir
 	cp $(builddir)/.libs/memberof.so $(builddir)/ldb_mod_test_dir
 
-noinst_LTLIBRARIES += \
+check_LTLIBRARIES = \
     libsss_test_common.la
 
 libsss_test_common_la_SOURCES = \
@@ -914,7 +914,7 @@ if HAVE_CHECK
 libsss_test_common_la_SOURCES += \
     src/tests/common_check.c
 
-check_LTLIBRARIES = \
+check_LTLIBRARIES += \
     libdlopen_test_providers.la
 
 libdlopen_test_providers_la_SOURCES = \
-- 
1.8.4.2



More information about the sssd-devel mailing list