We help IT Professionals succeed at work.

error when building LDAP_AUTH module on Apache

tooki asked
I need to install LDAP_AUTH module on Apache 1.3.28 on my Solaris 10 server. I can start apache (LDAP authntication part commented out) without issues.

Now I downloaded the  LDAP_AUTH module from http://www.rudedog.org/auth_ldap.
I configure using command::
CC=gcc ./configure --with-apxs=/usr2/apache1.3.28/bin/apxs --with-ldap-sdk=openldap --with-sdk-headers=/usr/sfw/include/mozilla/ldap --with-sdk-libs=/usr/sfw/lib/mozilla --with-shared-cache --with-activate --with-ssl
Now I get the Makefile. Now make command gives error:
# make
gcc -c -o auth_ldap.o -DSOLARIS2=2100 -DMOD_SSL=208115 -DUSE_HSREGEX -DEAPI -fPI
ULE -I/usr2/apache1.3.28/include -I/usr/sfw/include/OpenSP auth_ldap.c
In file included from auth_ldap.c:20:
auth_ldap.h:53:22: ldap_ssl.h: No such file or directory
In file included from auth_ldap.c:20:
auth_ldap.h:139: error: conflicting types for 'ldap_search_ext_s'
/usr/include/ldap.h:615: error: previous declaration of 'ldap_search_ext_s' was
auth_ldap.h:139: error: conflicting types for 'ldap_search_ext_s'
/usr/include/ldap.h:615: error: previous declaration of 'ldap_search_ext_s' was
auth_ldap.c: In function `auth_ldap_connect_to_server':
auth_ldap.c:179: error: dereferencing pointer to incomplete type
auth_ldap.c:206: error: `LDAP_OPT_SSL' undeclared (first use in this function)
auth_ldap.c:206: error: (Each undeclared identifier is reported only once
auth_ldap.c:206: error: for each function it appears in.)
make: *** [auth_ldap.o] Error 1

Watch Question


It seems I need to install openldap: http://www.sunfreeware.com/programlistsparc10.html#openldap

I get openldap-2.4.22-sol10-sparc-local.gz  and unzip/untar. Then .configure command gives error:

checking db.h usability... no
checking db.h presence... no
checking for db.h... no
configure: error: BDB/HDB: BerkeleyDB not available
Top Expert 2010

As it indicates you also need the Berkeley DB (http://www.oracle.com/technology/products/berkeley-db/index.html) and probably a few other dependencies.

If your going for a source compile, rather than a simple package install, I'd download  then complete source set from the Sun Freeware site (http://www.sunfreeware.com/programlistsparc10.html#openldap), as all dependencies are known / stated.

You could take the easy option and just download and "pkgadd -d xxx" a pre-build build, from one of the sites.

For info: http://www.mirrorservice.org/sites/blastwave.org/stable/sparc/5.10/ 


Sorry could not understand well. Can I install OpenLDAP using "pkgadd -d xxx" command only? That is not using source compilation.

I could not find such package link for OpenLDAP in http://www.mirrorservice.org/sites/blastwave.org/stable/sparc/5.10/  . Could you please let me know the link and I unzip the file and use the command  "pkgadd -d xxx" (xxx is a .tar file or the directory name?)
Top Expert 2010
Hi, a Solaris package can contain anything, but generally it's pre-compiled / built applications and utilities.

There are instruction / FAQ's, on both sites, that detail how to download and install a pre-compiled package e.g.


But you'll not the sunfreeware site
1) Lists the dependencies (The other stuff you need to install first), and include a a source tar ball, if you want to compile it yourself:

#  openldap-2.4.22-sol10-sparc-local.gz OpenLDAP is an open source implementation of the Lightweight Directory Access Protocol - installs in /usr/local. Dependencies are: libtool, openssl-1.0.0a, sasl-2.1.21, db-4.7.25.NC, and libgcc-3.4.6  or gcc-3.4.6  so that you have /usr/local/lib/libgcc_s.so.1. If you are using a version of Solaris 10 older than Solaris 10 5/08 s10x_u5wos_10 (see /etc/release), you may encounter an error message like

libresolv.so.2 (SUNW_2.2.2) +> (version not found)

To fix this, you will need to update to a newer version of Solaris 10 or upgrade the SUNWcsl and SUNWcslr packages.
# openldap-2.4.22.tar.gz Source Code. [Details]