OpenLDAP 2.6.0 module libraries not loading

This forum is for discussion about general software issues.

OpenLDAP 2.6.0 module libraries not loading

Postby MrDuck » Sun Jan 16, 2022 6:49 pm

Seem to have an issue with /usr/lib/openldap libraries not loading with OpenLDAP version 2.6.0

Working fine with 2.4.59-2.

Example with 2.6.0-2:

Code: Select all
pacman -U openldap-2.6.0-2-aarch64.pkg.tar.xz libldap-2.6.0-2-aarch64.pkg.tar.xz


After starting slapd.service:

Code: Select all
Jan 16 18:27:04 manjaro-pi4 systemd[1]: Starting OpenLDAP server daemon...
Jan 16 18:27:04 manjaro-pi4 slapd[373603]: @(#) $OpenLDAP: slapd 2.6.0 (Nov 19 2021 02:38:53) $
                                                   openldap
Jan 16 18:27:04 manjaro-pi4 slapd[373603]: daemon: bind(10) failed errno=22 (Invalid argument)
Jan 16 18:27:05 manjaro-pi4 slapd[373603]: daemon: bind(12) failed errno=22 (Invalid argument)
Jan 16 18:27:05 manjaro-pi4 slapd[373603]: lt_dlopenext failed: (syncprov) file not found
Jan 16 18:27:05 manjaro-pi4 slapd[373603]: olcModuleLoad: value #0: <olcModuleLoad> handler exited with 1!
Jan 16 18:27:05 manjaro-pi4 slapd[373603]: config error processing cn=module{0},cn=config: <olcModuleLoad> handler exited with 1
Jan 16 18:27:05 manjaro-pi4 slapd[373603]: DIGEST-MD5 common mech free
Jan 16 18:27:05 manjaro-pi4 slapd[373603]: DIGEST-MD5 common mech free
Jan 16 18:27:05 manjaro-pi4 slapd[373603]: slapd stopped.
Jan 16 18:27:05 manjaro-pi4 slapd[373603]: connections_destroy: nothing to destroy.
Jan 16 18:27:05 manjaro-pi4 systemd[1]: slapd.service: Control process exited, code=exited, status=1/FAILURE
Jan 16 18:27:05 manjaro-pi4 systemd[1]: slapd.service: Failed with result 'exit-code'.
Jan 16 18:27:05 manjaro-pi4 systemd[1]: Failed to start OpenLDAP server daemon.


To test further, compiled openldap 2.6.0 manually and installed locally under user folder (prefix), then changed slapd.conf to refer to user openldap library folder for modules and this worked. Also tested 2.6.0-2 on Arch x86/64 and found no library issues.

Noticed ldd differences with library files - example, working is lower (user) version:

Code: Select all
[root@manjaro-pi4 pkg]# ldd /usr/lib/openldap/syncprov.so.2.0.200
   linux-vdso.so.1 (0x0000ffffabb93000)
   libldap-2.4.so.2 => not found
   liblber.so.2 => /usr/lib/liblber.so.2 (0x0000ffffabafd000)
   libc.so.6 => /usr/lib/libc.so.6 (0x0000ffffab989000)
   /usr/lib/ld-linux-aarch64.so.1 (0x0000ffffabb62000)
[root@manjaro-pi4 pkg]# ldd ~jim/Downloads/openldap/install/libexec/openldap/syncprov.so.2.0.200
   linux-vdso.so.1 (0x0000ffffb7f2b000)
   libldap.so.2 => /home/jim/Downloads/openldap/install/lib/libldap.so.2 (0x0000ffffb7e6a000)
   libsasl2.so.3 => /usr/lib/libsasl2.so.3 (0x0000ffffb7e17000)
   libssl.so.1.1 => /usr/lib/libssl.so.1.1 (0x0000ffffb7d70000)
   libcrypto.so.1.1 => /usr/lib/libcrypto.so.1.1 (0x0000ffffb7a9a000)
   liblber.so.2 => /home/jim/Downloads/openldap/install/lib/liblber.so.2 (0x0000ffffb7a7b000)
   libresolv.so.2 => /usr/lib/libresolv.so.2 (0x0000ffffb7a54000)
   libpthread.so.0 => /usr/lib/libpthread.so.0 (0x0000ffffb7a24000)
   libc.so.6 => /usr/lib/libc.so.6 (0x0000ffffb78b0000)
   /usr/lib/ld-linux-aarch64.so.1 (0x0000ffffb7efa000)
   libdl.so.2 => /usr/lib/libdl.so.2 (0x0000ffffb789c000)


So there seems to be an issue with the PKGBUILD version of the aarch64 OpenLDAP 2.6.0 libraries.
Last edited by MrDuck on Mon Jan 17, 2022 6:39 pm, edited 1 time in total.
MrDuck
 
Posts: 2
Joined: Sun Jan 16, 2022 6:22 pm

Re: OpenLDAP 2.6.0 module libraries not loading

Postby MrDuck » Mon Jan 17, 2022 6:19 pm

The following PKGBUILD changes seem to have fixed the issue:

Modules now load:

Code: Select all
Jan 17 17:53:14 manjaro-pi4 systemd[1]: Starting OpenLDAP server daemon...
Jan 17 17:53:14 manjaro-pi4 slapd[501669]: @(#) $OpenLDAP: slapd 2.6.0 (Jan 17 2022 03:32:41) $
                                                   openldap
Jan 17 17:53:14 manjaro-pi4 slapd[501669]: daemon: bind(10) failed errno=22 (Invalid argument)
Jan 17 17:53:14 manjaro-pi4 slapd[501669]: daemon: bind(12) failed errno=22 (Invalid argument)
Jan 17 17:53:14 manjaro-pi4 slapd[501670]: syncprov_db_open: starting syncprov for suffix cn=config
Jan 17 17:53:14 manjaro-pi4 slapd[501670]: conn=-1 op=0 syncprov_findcsn: mode=FIND_MAXCSN csn=
Jan 17 17:53:14 manjaro-pi4 slapd[501670]: syncprov_db_open: starting syncprov for suffix dc=XXX,dc=XXX,dc=XXX
Jan 17 17:53:14 manjaro-pi4 slapd[501670]: syncprov_db_open: starting syncprov for suffix cn=accesslog
Jan 17 17:53:14 manjaro-pi4 slapd[501670]: slapd starting
Jan 17 17:53:14 manjaro-pi4 slapd[501670]: accesslog_db_root: setting up minCSN with 3 values
Jan 17 17:53:14 manjaro-pi4 systemd[1]: Started OpenLDAP server daemon.


Summary:

1. Added "!buildflags" to PKGBUILD options array
2. Added "make depend" to build() function
3. Commented out "make test" to speed up package compilation
4. Modified "pkgrel" to "4"

Code: Select all
diff -u PKGBUILD-orig PKGBUILD
--- PKGBUILD-orig   2022-01-17 18:04:30.429766311 +0000
+++ PKGBUILD   2022-01-17 03:32:10.029726196 +0000
@@ -4,12 +4,12 @@
 pkgbase=openldap
 pkgname=('openldap' 'libldap')
 pkgver=2.6.0
-pkgrel=2
-arch=('x86_64')
+pkgrel=4
+arch=('aarch64')
 url="https://www.openldap.org/"
 license=('custom')
 makedepends=('libtool' 'libsasl' 'e2fsprogs' 'util-linux' 'chrpath' 'unixodbc' 'libsodium' 'systemd')
-options=('!makeflags' 'emptydirs')
+options=('!makeflags' '!buildflags' 'emptydirs')
 source=(
   https://www.openldap.org/software/download/OpenLDAP/openldap-release/${pkgbase}-${pkgver}.tgz{,.asc}
   openldap.tmpfiles
@@ -69,6 +69,8 @@

   sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool

+  make depend
+
   make

   # build extra modules
@@ -83,7 +85,7 @@

 check() {
   cd ${pkgbase}-${pkgver}
-  make test
+  #make test
 }

 package_libldap() {


ldd output:

Code: Select all
ldd /usr/lib/openldap/syncprov.so.2.0.200
   linux-vdso.so.1 (0x0000ffffb9df4000)
   libldap.so.2 => /usr/lib/libldap.so.2 (0x0000ffffb9d0e000)
   liblber.so.2 => /usr/lib/liblber.so.2 (0x0000ffffb9cef000)
   libc.so.6 => /usr/lib/libc.so.6 (0x0000ffffb9b7b000)
   /usr/lib/ld-linux-aarch64.so.1 (0x0000ffffb9dc3000)
   libresolv.so.2 => /usr/lib/libresolv.so.2 (0x0000ffffb9b54000)
   libsasl2.so.3 => /usr/lib/libsasl2.so.3 (0x0000ffffb9b25000)
   libssl.so.1.1 => /usr/lib/libssl.so.1.1 (0x0000ffffb9a7e000)
   libcrypto.so.1.1 => /usr/lib/libcrypto.so.1.1 (0x0000ffffb97a8000)
   libpthread.so.0 => /usr/lib/libpthread.so.0 (0x0000ffffb9778000)
   libdl.so.2 => /usr/lib/libdl.so.2 (0x0000ffffb9764000)


Hope this helps!
MrDuck
 
Posts: 2
Joined: Sun Jan 16, 2022 6:22 pm


Return to General

Who is online

Users browsing this forum: No registered users and 5 guests