Bug 48486 - ./configure --enable-authnz_ldap; fails
Summary: ./configure --enable-authnz_ldap; fails
Status: RESOLVED INVALID
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: Build (show other bugs)
Version: 2.2.14
Hardware: PC Linux
: P2 normal (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-01-05 01:41 UTC by Charles Simms
Modified: 2012-02-15 13:01 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Charles Simms 2010-01-05 01:41:29 UTC
I have installed openldap-2.4.19 and am trying to install httpd-2.2.14 with the modules enable-authnz_ldap and enable-ssl.

runing ./config.nice
"./configure" \
"--prefix=/usr/local/apache2" \
"--with-included-apr" \
"--enable-so" \
"--enable-ssl" \
"--enable-mods-shared=all" \
"--with-ssl=/usr/local/openssl" \
"--with-ldap" \
"--enable-ldap" \
"--enable-authnz_ldap" \
"--with-ldap-lib=/usr/local/lib" \
"--with-ldap-include=/usr/local/include" \

get the following error
checking for ldap support...
  setting APRUTIL_INCLUDES to "-I/usr/local/include"
  setting APRUTIL_LDFLAGS to "-L/usr/local/lib"
checking for ldap_init in -lldap50... no
checking for ldap_init in -lldapssl41... no
checking for ldap_init in -lldapssl40... no
checking for ldap_init in -lldapssl30... no
checking for ldap_init in -lldapssl20... no
checking for ldap_init in -lldapsdk... no
checking for ldap_init in -lldapsdk... no
checking for ldap_init in -lldap... no
checking for ldap_init in -lldap... no
checking for ldap_init in -lldap... no
checking for ldap_init in -lldap... no
configure: error: could not find an LDAP library
configure failed for srclib/apr-util


I have entered this as a bug in desperation. I have googled this problem but found no resolution. I have also entered this in apache forums but have had no response. I am hoping that the apache developers can provide some help.
Comment 1 Nick Kew 2010-01-05 04:32:19 UTC
First, this is a build problem.

Second, you just say you've installed openldap, but you have a problem telling apache where to find it.  We don't even know if you have a working ldap installation (and since you're on Linux, you could try a packaged ldap).

What happened when you asked in a user support forum, such as the users list?
Comment 2 Charles Simms 2010-01-05 11:15:19 UTC
Thanks for replying.

I installed openldap openldap-2.4.19 as follows:

Install OpenLDAP 
tar xvzf openldap-stable-20091028.tgz 
cd openldap-2.4.19 
export CPPFLAGS="-I/usr/local/BerkeleyDB.4.7/include -I/usr/local/openssl/include" LDFLAGS="-L/usr/local/BerkeleyDB.4.7/lib -L/usr/local/openssl/lib" 
export LD_LIBRARY_PATH=/usr/software/apache2/db-4.7.25/build_unix/.libs 
./configure --prefix=/usr/local --sysconfdir=/etc/openldap --enable-ipv6 --with-tls --disable-slurpd --with-openssl=/usr/local/openssl 
make depend 
make 
make install 
All built and installed successfully and the ldap libraries were installed:

[root@smrtvsvn02 apache2]# cd /usr/local/lib
[root@smrtvsvn02 lib]# ls
liblber-2.4.so.2      liblber.a   liblber.so        libldap-2.4.so.2.5.2  libldap.la          libldap_r-2.4.so.2.5.2  libldap_r.la  libldap.so
liblber-2.4.so.2.5.2  liblber.la  libldap-2.4.so.2  libldap.a             libldap_r-2.4.so.2  libldap_r.a libldap_r.so

This is the directory I am using to support the ldap module and apache build using the following to configure:
"./configure" \
"--prefix=/usr/local/apache2" \
"--with-included-apr" \
"--enable-module=shared" \
"--enable-so" \
"--enable-authnz_ldap" \
"--enable-ssl" \
"--enable-ldap" \
"--with-ssl=/usr/local/openssl" \
"--with-ldap" \
"--with-ldap-lib=/usr/local/lib" \

The error I am getting is that the ldap library created in /usr/local/lib are not recognised as ldap libraries by apache configure.

If there is an easier way to install these libraries ie by packages I have not been able to find how to do this. I installed openssl openssl-0.9.8l successfully and apache had no problem with this installation.

The only example I found to help install ldap modules was http://blog.case.edu/gps10/2005/02/23/apache2_ssl_ldap_authentication_howto
which I followed.

I have tried to ask for help and have placed a couple of questions on http://www.apache.com/forums/modules/installing-enable-authnz_ldap-module/
and got no response. If there are better forums please could you let me know where these are?

The document to install apache2.2 and the default modules is useful. I found no documents to detail how to build and install ldap and ssl modules which I believed came with apache2.2.

I would be very grateful if you could give me some pointers or suggest where I could get the relevant information.
Comment 3 Nick Kew 2010-01-07 03:50:19 UTC
You raise an interesting point, which I just described as a "bombshell" in a blog entry at http://bahumbug.wordpress.com/2010/01/07/bugs-support-and-confusion/
The blog entry also links to recommended support fora you should use.
Comment 4 Eric Covener 2011-09-17 19:41:43 UTC
Try a user support forum for help building Apache: http://httpd.apache.org/userslist.html
Comment 5 Rory Clerkin 2012-02-15 13:01:17 UTC
After finding this bug(?) when trying to troubleshoot the same issue I thought it would be useful to put the solution of the original issue here as it stands to reason others will end up here when troubleshooting.

The ldap build is looking for the openldap library files. These are provided by openldap's devel package.

If, like me, you have installed openldap using a package manager such as yum you can do the following.

Ensure you're openldap is up to date.

$> yum update openldap

Look for the devel package

$> yum list openldap*devel*

Install the devel package listed by your package manager

$> yum install openldap-devel

Once you have the openldap-devel package installed do the do a 'make clean' and re-run you configure. Your httpd package should now build without the ldap error.