Skip to contentSkip to conversation

openldap and icu

PATCH New Marcin Juszkiewicz 2 participants 3 messages Apr 18, 2013 – Apr 26, 2013

lore
Share & tools
lore
#0 lore raw

Hi

As one of our Linaro builds failed in nasty way I decided to take a look and discovered something ugly.

bitbake -ccleansstate openldap
bitbake icu
bitbake openldap
rm -rf TMPDIR
bitbake openldap

99% that it will fail...

Where the problem is? in openldap sources: build/openldap.m4 has this:

-----
dnl International Components for Unicode (ICU) AC_DEFUN([OL_ICU],
[ol_icu=no
AC_CHECK_HEADERS( unicode/utypes.h )
if test $ac_cv_header_unicode_utypes_h = yes ; then

	dnl OL_ICULIBS="-licui18n -licuuc -licudata"
	OL_ICULIBS="-licuuc -licudata"

	AC_CACHE_CHECK([for ICU libraries], [ol_cv_lib_icu], [
		ol_LIBS="$LIBS"
		LIBS="$OL_ICULIBS $LIBS"
		AC_LINK_IFELSE([AC_LANG_PROGRAM([[

#include <unicode/utypes.h>
]], [[
(void) u_errorName(0);
]])],[ol_cv_lib_icu=yes],[ol_cv_lib_icu=no])

		LIBS="$ol_LIBS"

])

	if test $ol_cv_lib_icu != no ; then
		ol_icu="$OL_ICULIBS"
		AC_DEFINE(HAVE_ICU,1,[define if you actually have ICU])
	fi

fi
])
-----

which is called by configure.in:

-----
dnl International Components for Unicode
OL_ICU
if test "$ol_icu" = no ; then
AC_MSG_WARN([ICU not available])
else

	ICU_LIBS="$ol_icu"

fi
-----

Now the question is: will we kill ICU dependency or will we add it into build dependencies?

#1 lore raw

PATCH 1/1 openldap: do not link to ICU

---
 .../openldap/openldap-2.4.23/kill-icu.patch        | 30 ++++++++++++++++++++++
 .../recipes-support/openldap/openldap_2.4.23.bb    |  1 +
 2 files changed, 31 insertions(+)
 create mode 100644 meta-oe/recipes-support/openldap/openldap-2.4.23/kill-icu.patch
meta-oe/recipes-support/openldap/openldap-2.4.23/kill-icu.patch new file +30 -0
new file mode 100644
index 0000000..dcf5411
@@ -0,0 +1,30 @@
+From: Marcin Juszkiewicz <[email protected]>
+
+slapd depends on ICU if it was built first.
+
+Upstream-status: inappropiate [embedded specific]
+---
+ configure.in |    8 --------
+ 1 file changed, 8 deletions(-)
+
+--- openldap-2.4.23.orig/configure.in
++++ openldap-2.4.23/configure.in
+@@ -2045,18 +2045,10 @@ if test $ol_enable_ndb != no ; then
+ 		SLAPD_LIBS="$SLAPD_LIBS \$(SLAPD_NDB_LIBS)"
+ 	fi
+ fi
+ 
+ dnl ----------------------------------------------------------------
+-dnl International Components for Unicode
+-OL_ICU
+-if test "$ol_icu" = no ; then
+-	AC_MSG_WARN([ICU not available])
+-else
+-	ICU_LIBS="$ol_icu"
+-fi
+-dnl ----------------------------------------------------------------
+ dnl
+ dnl Check for Cyrus SASL
+ dnl
+ WITH_SASL=no
+ ol_link_sasl=no
meta-oe/recipes-support/openldap/openldap_2.4.23.bb +1 -0
index 1c6c32f..9a7c118 100644
@@ -15,6 +15,7 @@ LDAP_VER = "${@'.'.join(d.getVar('PV',1).split('.')[0:2])}"
 
 SRC_URI = "ftp://ftp.openldap.org/pub/OpenLDAP/openldap-release/${P}.tgz"
 SRC_URI += "file://openldap-m4-pthread.patch"
+SRC_URI += "file://kill-icu.patch"
 SRC_URI += "file://initscript"
 SRC_URI[md5sum] = "90150b8c0d0192e10b30157e68844ddf"
 SRC_URI[sha256sum] = "5a5ede91d5e8ab3c7f637620aa29a3b96eb34318a8b26c8eef2d2c789fc055e3"
Signature · 1 line
1.8.1.2
#2 lore raw
In reply to Marcin Juszkiewicz
Quoted 11 lines · Marcin Juszkiewicz

dnl International Components for Unicode
OL_ICU
if test "$ol_icu" = no ; then
AC_MSG_WARN([ICU not available])
else

	ICU_LIBS="$ol_icu"

fi
-----

Now the question is: will we kill ICU dependency or will we add it into build dependencies?

force ice dependency using DEPENDS