[SSSD] [PATCH] BUILD: Fix cmocka

Lukas Slebodnik lslebodn at redhat.com
Mon Mar 11 17:03:52 UTC 2013


On (11/03/13 12:38), Stephen Gallagher wrote:
>-----BEGIN PGP SIGNED MESSAGE-----
>Hash: SHA1
>
>We were not properly detecting that cmocka was unavailable. It was
>expecting an empty value and getting "no" instead. This patch
>corrects the expectation, so we will now skip building and running
>cmocka tests on platforms that do not have it available.
>
>Also, the common_cmocka.h header was missing from the distribution
>tarball, causing 'make distcheck' to fail.
>
>
>
>
>
>Note: the nss cmocka test is consistently segfaulting for me during
>'make distcheck' on F18 x86_64. I haven't had time to look into why,
>yet. It works fine in normal 'make check', so I suspect there's likely
>something going on with permissions (since 'make check' sets $libdir
>as read-only). But that's just a guess.

Another solution to proper detection of libcmocka is attached in my
patch. I am not very familiar with autotools, so I am not sure which 
solution is more suitable.

LS
-------------- next part --------------
>From 04498cb6c35768d6bb7830610cb145d7842a3044 Mon Sep 17 00:00:00 2001
From: Lukas Slebodnik <lslebodn at redhat.com>
Date: Mon, 11 Mar 2013 17:55:44 +0100
Subject: [PATCH] Fixed libcmocka detection.

---
 src/external/libcmocka.m4 | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/external/libcmocka.m4 b/src/external/libcmocka.m4
index c57327612e2eec2411f18b640c4e2eaed2b31bc1..e653884eccd7b46efb249afcbffe36453f4257fe 100644
--- a/src/external/libcmocka.m4
+++ b/src/external/libcmocka.m4
@@ -7,8 +7,7 @@ AC_CHECK_HEADERS(
     [AC_CHECK_LIB([cmocka], [_will_return],
                   [ CMOCKA_LIBS="-lcmocka"
                     have_cmocka="yes" ],
-                  [AC_MSG_WARN([No libcmocka library found])
-                    have_cmocka="no" ])],
+                  [AC_MSG_WARN([No libcmocka library found])])],
     [AC_MSG_WARN([libcmocka header files not installed])],
     [[ #include <stdarg.h>
      # include <stddef.h>
-- 
1.8.1.4



More information about the sssd-devel mailing list