Closed autumnjolitz closed 10 months ago
@autumnjolitz it seems that this commit did the trick for openldap24-server but that piece of code disappeared later for 25 and 26 versions, I don't know why.
I found another way of fixing the port using the following patch for building with the LDAP option enabled, that I could include easily include in the DeltaPorts.
--- acinclude.m4.orig 2022-12-12 11:23:45.629913000 +0100
+++ acinclude.m4 2022-12-12 11:23:56.130090000 +0100
@@ -222,7 +222,7 @@ if ( test [ "x$lookforldap" != "xno" ] |
dnl See if we already have the paths we need in the environment.
dnl ...but only if --with-ldap was given without a specific path.
if ( test [ "x$lookforldap" = "xyes" ] || test [ "x$lookforauthldap" = "xyes" ] ); then
- AC_CHECK_HEADERS([ldap.h],[LDAPLIB="-lldap_r"], [LDAPLIB="failed"])
+ AC_CHECK_HEADERS([ldap.h],[LDAPLIB="-lldap"], [LDAPLIB="failed"])
if test [ "x$LDAPLIB" != "xfailed" ]; then
break
fi
@@ -234,7 +234,7 @@ if ( test [ "x$lookforldap" != "xno" ] |
SAVE_CFLAGS=$CFLAGS
dnl The headers might be in a funny place, so we need to use -Ipath
CFLAGS="$CFLAGS -L$TEST_PATH $LDAPINC"
- AC_CHECK_HEADERS([ldap.h],[LDAPLIB="-L$TEST_PATH -lldap_r"], [LDAPLIB="failed"])
+ AC_CHECK_HEADERS([ldap.h],[LDAPLIB="-L$TEST_PATH -lldap"], [LDAPLIB="failed"])
CFLAGS=$SAVE_CFLAGS
if test [ "x$LDAPLIB" != "xfailed" ]; then
break 2
Because the issue that I see with the solution you provided is that someone will have to also create that libldap_r.so file after installing as that file isn't shipped by openldap26-client anymore. In the built package at least /usr/local/lib/dbmail/libauth_ldap.so
will depend on that file.
I don't see the libdap_r.so
file in the client's plist in the FreeBSD port. Where is that _r file coming from?
@tuxillo it was shipped by net/openldap24-client as you can see in https://github.com/freebsd/freebsd-ports/blob/537a9c13bf1ea73564aa51f91d805927e32f7401/net/openldap24-server/pkg-plist.client#L36 but that file has disappeared from next releases such as https://github.com/freebsd/freebsd-ports/blob/main/net/openldap26-server/pkg-plist.client, because of the piece of code in the commit I linked before that created that libldap_r.so for openldap24-server that hasn't been kept in next releases (see the Makefiles of net/openldap25-server and net/openldap26-server lacking this loop).
So as for now there's no libldap_r.so installed anymore, that's why I changed the -lldap_r to -lldap in the patch file provided.
What do we do with that one ?
As of version 3.3.1 of mail/dbmail, there should be no problem with the LDAP option as they don't try to link with lldap_r anymore.
It seems openldap26-client deprecated the
libdap_r.so
.A build error looks like
A workaround is (given DragonFly uses a GNU compatible linker) is:
With that the port builds correctly.