You are not logged in.

#1 2008-10-13 08:43:15

Fletch
Member
From: Ukraine
Registered: 2007-09-03
Posts: 14

LDAP vendor version mismatch

Hi, everybody. When I try to use ldapadd I get this error.

[root@getaway schema]# ldapadd -x -D "cn=root,dc=unix" -W -f base.ldif
LDAP vendor version mismatch: library 20343, header 20340

libldap version is 2.3.43 and openldap itself is 2.3.40
It seems to me that the problem is in the core. But there is no new version in repos though there is 2.3.43 on the openldap.org

I think that i have only one solution - compile latest openldap on my own.

Am I right?

Offline

#2 2008-10-13 13:54:10

arno
Member
From: France
Registered: 2007-06-21
Posts: 18

Re: LDAP vendor version mismatch

Same here.
I had to manually tweak into ABS's openldap-clients PKGBUILD and do the following:
  * upgrade package to 2.3.43
  * add gentoo's patch to src to help compiling (see http://bugs.gentoo.org/show_bug.cgi?id=225369) by adding a patch -p1 < ${startdir}/src/openldap-2.3.41-r1-fixed-peercred-error.patch
  * update md5sums
  * rebuild, and install.

Hope it helps.

Offline

#3 2008-10-14 11:41:41

Fletch
Member
From: Ukraine
Registered: 2007-09-03
Posts: 14

Re: LDAP vendor version mismatch

Thank You, but can you tell more specific?

>upgrade package to 2.3.43
openldap or openldap-clients?

btw. could you share PKGBUILDs ?

Offline

#4 2008-10-15 10:27:19

Bengi
Member
Registered: 2005-10-25
Posts: 21

Re: LDAP vendor version mismatch

Same problem here, PKGBUILD would be great if possible!

Offline

#5 2008-10-16 05:19:05

arno
Member
From: France
Registered: 2007-06-21
Posts: 18

Re: LDAP vendor version mismatch

Hi.
I only needed to recompile openldap-clients in version 2.3.43. I assume that the openldap package is named 2.3.40, but contains a 2.3.43 version

As I don't know how to attach files, I put them in Code markups.
openldap-clients PKGBUILD:

# $Id: PKGBUILD 1725 2008-05-15 04:19:40Z eric $
# Maintainer: Judd Vinet <jvinet@zeroflux.org>
pkgname=openldap-clients
pkgver=2.3.43
pkgrel=1
pkgdesc="LDAP Client utilities"
arch=(i686 x86_64)
license=('custom')
url="http://www.openldap.org/"
depends=("libldap>=${pkgver}")
source=(ftp://ftp.openldap.org/pub/OpenLDAP/openldap-release/openldap-${pkgver}.tgz openldap-2.3.41-r1-fixed-peercred-error.patch)
options=('!makeflags')

build() {
  cd ${startdir}/src/openldap-${pkgver}
  patch -p1 < ${startdir}/src/openldap-2.3.41-r1-fixed-peercred-error.patch
  ./configure --prefix=/usr \
              --libexecdir=/usr/sbin \
              --sysconfdir=/etc \
              --localstatedir=/var/lib/openldap \
              --enable-crypt --enable-dynamic \
              --with-threads --enable-wrappers \
              --enable-spasswd --with-cyrus-sasl \
              --disable-bdb --disable-hdb

  find . -name 'Makefile' -exec \
        sed -e 's|$(LDAP_LIBDIR)/liblber/liblber.la|/usr/lib/liblber-2.3.so.0|g' \
            -e 's|$(LDAP_LIBDIR)/libldap/libldap.la|/usr/lib/libldap-2.3.so.0|g' \
            -e 's|$(LDAP_LIBDIR)/libldap_r/libldap_r.la|/usr/lib/libldap_r-2.3.so.0|g' \
            -i {} \;

  cd include
  make || return 1

  cd ../libraries
  for dir in liblutil librewrite liblunicode; do
    pushd ${dir}
    make depend || return 1
    make || return 1
    popd
  done
  cd ../clients
  make depend || return 1
  make || return 1

  make DESTDIR=${startdir}/pkg install

  cd ../doc/man/man1
  make || return 1
  make DESTDIR=${startdir}/pkg install
}
md5sums=('1b25281086eb146b8e11ebd33de086dc'
         'a68214b19bee704992d80322cac3ce49')

openldap-2.3.41-r1-fixed-peercred-error.patch file, which is supposed to stand side by side with PKGBUILD:

diff -Naur openldap-2.3.41/libraries/liblutil/getpeereid.c new/libraries/liblutil/getpeereid.c
--- ./libraries/liblutil/getpeereid.c   2008-02-12 00:24:13.000000000 +0100
+++ ./libraries/liblutil/getpeereid.c   2008-06-12 12:55:34.000000000 +0200
@@ -14,6 +14,8 @@
  * <http://www.OpenLDAP.org/license.html>.
  */

+#define _GNU_SOURCE
+
 #include "portable.h"

 #ifndef HAVE_GETPEEREID

Hope it helps

I will try notify the openldap maintainer about this issue.

Offline

#6 2008-10-16 14:51:58

Bengi
Member
Registered: 2005-10-25
Posts: 21

Re: LDAP vendor version mismatch

Thanks very much arno - works fine now!

Offline

#7 2008-10-17 06:05:54

arno
Member
From: France
Registered: 2007-06-21
Posts: 18

Re: LDAP vendor version mismatch

Glad to be helpful.

BTW, as Aarron Griffin suggested, the good way to let the maintain team know about such issue is to use the bug tracker (http://bugs.archlinux.org).

Good to know for the future and a better Archlinux.

Offline

#8 2008-10-17 09:06:56

Fletch
Member
From: Ukraine
Registered: 2007-09-03
Posts: 14

Re: LDAP vendor version mismatch

I have troubles. Can't build the package.
I've made directory /home/usr/abs/openldap, put there PKGBUILD, slapd, slapd.default, and patch in /home/usr/abs/openldap/src. When trying to makepkg it gives me this:

[root@getaway openldap]# makepkg -c --asroot
: command not found

==> ERROR: An unknown error has occured. Exiting...

[SOLVED] It was a problem with PKGBUILD's text format

To succesfully compile the package I had to modify this string in PKGBUILD:

./configure --prefix=/usr \

Changed to:

CPPFLAGS=-D_GNU_SOURCE ./configure --prefix=/usr \

Last edited by Fletch (2008-10-17 11:30:20)

Offline

#9 2008-10-17 16:04:41

arno
Member
From: France
Registered: 2007-06-21
Posts: 18

Re: LDAP vendor version mismatch

The official bug report about this trouble can be tracked here:

http://bugs.archlinux.org/task/11785

Fletch, maybe you can post your PKGBUILD modification into the bug report to help the official mantainer.

Offline

Board footer

Powered by FluxBB