Reputation: 1052
I'm currently trying to generate a RPM package of a patched apache2 2.4.3
I modified the httpd.spec provided with the archive, to use the SVN version of APR (version 1.4 is not provided by CentOS) :
%build
# forcibly prevent use of bundled apr, apr-util, pcre
rm -rf srclib/{apr,apr-util,pcre}
svn co http://svn.apache.org/repos/asf/apr/apr/trunk srclib/apr
./buildconf
%configure \
--enable-layout=RPM \
--libdir=%{_libdir} \
--sysconfdir=%{_sysconfdir}/httpd/conf \
--includedir=%{_includedir}/httpd \
--libexecdir=%{_libdir}/httpd/modules \
--datadir=%{contentdir} \
--with-installbuilddir=%{_libdir}/httpd/build \
--enable-mpms-shared=all \
--with-included-apr \
--enable-suexec --with-suexec \
--with-suexec-caller=%{suexec_caller} \
--with-suexec-docroot=%{contentdir} \
--with-suexec-logfile=%{_localstatedir}/log/httpd/suexec.log \
--with-suexec-bin=%{_sbindir}/suexec \
--with-suexec-uidmin=500 --with-suexec-gidmin=100 \
--enable-pie \
--with-pcre \
--with-libxml2 \
--enable-mods-shared=all \
--enable-ssl --with-ssl --enable-socache-dc --enable-bucketeer \
--enable-case-filter --enable-case-filter-in \
--enable-session-crypto --with-crypto \
--enable-ldap --enable-authnz-ldap --with-ldap \
--disable-imagemap
The important part is :
--with-included-apr \
--enable-ldap --enable-authnz-ldap --with-ldap \
When I generate the package with :
rpmbuild -ba ~/rpmbuild/SPECS/httpd.spec
I got the following error :
checking for ldap support in apr/apr-util... no
configure: WARNING: apr/apr-util is compiled without ldap support
checking whether to enable mod_authnz_ldap... configure: error: mod_authnz_ldap has been requested but can not be built due to prerequisite failures
I found some answers on the mailing list telling about missing option --with-ldap
which is actually present.
Upvotes: 1
Views: 5171
Reputation: 3387
I encountered the same problem configuring Apache2 httpd-2.4.7 in Ubuntu 13.10. You should make sure you have OpenLDAP installed. in Ubuntu:
sudo apt-get install sladp ldap-utils
In my case, that did not solve the problem so I installed the dev version:
sudo apt-cache search openldap #found libldap2-dev
sudo apt-get install libldap2-dev
I think you can find the dev package in rpm using:
rpm -qa | grep ldap
And then configuring httpd using '--with-ldap' resolved the problem for me.
./configure --prefix=/usr/local/apache --sysconfdir=/etc/apache --enable-so --with-ldap --enable-ssl --with-included-apr --with-pcre=/usr/local/pcre
Upvotes: 0