Subject: broken libldap.so (from openldap) under Solaris/zoularis
To: None <tech-pkg@netbsd.org>
From: Pierre Bourgin <pierre.bourgin@pcotech.fr>
List: tech-pkg
Date: 09/19/2002 11:24:10
Hi everyone,
I've got a *really* annoying problem with the zoularis package
openldap-2.0.25.
this package is built and installed succefully, but when I try to use the
libldap.so of this package (with ap-auth-ldap for instance), my apache
server is unable to start:
--------- httpd error message ------------------------------------------
Syntax error on line 1235 of /u_dev01/pbo/apache/conf/httpd.conf:
Cannot load /usr/pkg/lib/httpd/auth_ldap.so into server: ld.so.1:
/usr/pkg/sbin/httpd: fatal:
relocation error: file /usr/pkg/lib/libldap.so.2: symbol inet_aton:
referenced symbol not found
--------- httpd error message ------------------------------------------
the apache module is (really) linked against libldap.so.2:
% ldd /usr/pkg/lib/httpd/auth_ldap.so
libldap.so.2 => /usr/pkg/lib/libldap.so.2
liblber.so.2 => /usr/pkg/lib/liblber.so.2
libssl.so.300.0 => /usr/pkg/lib/libssl.so.300.0
libcrypto.so.300.0 => /usr/pkg/lib/libcrypto.so.300.0
libc.so.1 => /usr/lib/libc.so.1
libsocket.so.1 => /usr/lib/libsocket.so.1
libnsl.so.1 => /usr/lib/libnsl.so.1
libdl.so.1 => /usr/lib/libdl.so.1
libmp.so.2 => /usr/lib/libmp.so.2
/usr/platform/SUNW,Ultra-250/lib/libc_psr.so.1
and ths libldap.so has something wrong:
% nm /usr/pkg/lib/libldap.so.2 |grep inet_aton
[1186] | 0| 0|NOTY |GLOB |0 |UNDEF |inet_aton
I found that /usr/lib/libresolv.so has the missing symbol:
% nm /usr/lib/libresolv.so |grep inet_aton
[1055] | 25164| 632|FUNC |GLOB |0 |12 |inet_aton
So I modified the pkgsrc' Makefile of openldap in order to link with this
lib:
% cd /..../pkgsrc/database/openldap
% gdiff -bu Makefile.orig Makefile
--- Makefile.orig Mon Aug 26 12:08:02 2002
+++ Makefile Thu Sep 19 09:06:02 2002
@@ -35,7 +35,7 @@
.if ${OPSYS} == "SunOS"
.include "../../databases/db/buildlink2.mk"
CPPFLAGS+= -I${BUILDLINK_PREFIX.db}/include/db2
-LIBS= -ldb2 -lpthread -lrt
+LIBS= -ldb2 -lpthread -lrt -lresolv
.endif
Unfortunalty, after built and installed again the openldap & ap-auth-ldap
packages, I've got the same errors, and the libldap.so is *not* build
againt libresolv.so, so the same error appears.
I also checked the file
/..../pkgsrc/databases/openldap/work/openldap-2.0.25/librairies/libldap/libldap.la,
but it contains effectivly the '-lresolv' flag:
-------------------
# Libraries that this one depends upon.
dependency_libs=' -L/d_dev01/admin/14sept02/pkgsrc/databases/openldap/work/openldap-2.0.25/li
braries -L/admin/14sept02/pkgsrc/databases/openldap/work/.buildlink/lib
-lssl -lcrypto -lresolv'
-------------------
Did I do something wrong ? Forgot something ?
Thanks for any clue !
Regards,
Pierre Bourgin