logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Apache-2.4.52: apr/apr-util is compiled without ldap support
Author
Joey



Joined: 27 Oct 2020
Posts: 7
Location: Czech Republic

PostPosted: Thu 03 Feb '22 9:46    Post subject: Apache-2.4.52: apr/apr-util is compiled without ldap support Reply with quote

Hello Colleagues,

I'm having problems in enabling the LDAP support during compilation Apache Web Server 2.4.52 on Redhat 7.

=======================================

configure: Configuring Apache httpd
......
checking for sd_notify in -lsystemd-daemon... no
checking whether to enable mod_authn_file... shared
checking whether to enable mod_authn_dbm... shared
checking whether to enable mod_authn_anon... shared
checking whether to enable mod_authn_dbd... shared
checking whether to enable mod_authn_socache... shared (all)
checking whether to enable mod_authn_core... shared
checking whether to enable mod_authz_host... shared
checking whether to enable mod_authz_groupfile... shared
checking whether to enable mod_authz_user... shared
checking whether to enable mod_authz_dbm... shared
checking whether to enable mod_authz_owner... shared
checking whether to enable mod_authz_dbd... shared (all)
checking whether to enable mod_authz_core... shared
checking whether to enable mod_authnz_ldap... checking dependencies
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

============================

When I try to compile the APR-UTIL seperately, this way:
./configure \
--host=x86_64-pc-linux-gnu \
--target=x86_64-pc-linux-gnu \
--prefix=${PREFIX} \
--build=x86_64-pc-linux-gnu \
--with-apr=${PREFIX} \
--with-gdbm=${PREFIX} \
--with-crypto \
--with-openssl=/applications/openssl/1.1.111.0 \
--with-expat=${PREFIX_EXPAT} \
--with-commoncrypto \
--enable-so \
--with-ldap=ldap \

I get the following error:
checking for CCKeyDerivationPBKDF in -lSystem... no
checking for ldap support...
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
============================

I have LDAP installed on the system and also I tried compiling it in the package creation

openldap-2.4.44-21.el7_6.x86_64
openldap-devel-2.4.44-21.el7_6.x86_64

# Configure Apache
./configure \
--prefix=${PREFIX} \
--enable-authnz-fcgi \
--enable-layout=BLFS \
--enable-mods-shared="all cgi proxy proxy_ajp proxy_balancer proxy_connect proxy_ftp proxy_http ssl cern_meta env expires headers ident mime_magic setenvif unique_id usertrack version actions alias dir imagemap negotiation rewrite speling userdir vhost_alias log_config log_forensic logio ldap ldap_cache mime asis autoindex cgi cgid info status suexec charset_lite deflate ext_filter filter include echo bucketeer dumpio dav_fs dav_lock dav dbd cache disk_cache file_cache mem_cache auth auth_digest auth_basic authn_alias authn_anon authn_dbd authn_dbm authn_default authn_file authnz_ldap authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user" \
--enable-mpms-shared=all \
--enable-suexec=shared \
--enable-cgi \
--with-apr=${PREFIX} \
--with-apr-util=${PREFIX} \
--with-included-apr-iconv \
--with-expat=${PREFIX_EXPAT} \
--with-included-pcre \
--enable-ssl \
--with-ssl=/applications/openssl/CURRENT \
--with-suexec \
--with-libxml2=${PREFIX_XML} \
--with-z=${PREFIX_ZLIB} \
--with-lua=${PREFIX_LUA} \
--enable-lua=shared \
--enable-ldap=shared \
--with-ldap=${PREFIX_LDAP} \
--enable-authnz-ldap \
--enable-so \
-------------------------------------
I have tried several solutions like :
https://comp.infosystems.www.servers.unix.narkive.com/OuQl6AZ4/configure-error-could-not-find-an-ldap-library

and
https://bz.apache.org/bugzilla/show_bug.cgi?id=58197

BUT that did not help.

Thank you for your timely support
Back to top
tangent
Moderator


Joined: 16 Aug 2020
Posts: 312
Location: UK

PostPosted: Tue 08 Feb '22 11:43    Post subject: Reply with quote

I came across this "ldap_init" error some years ago when building Apache from scratch on Linux.

The solution I found was to include the following configure options, when building both apr-util and httpd (note you need the openldap-devel package installed):
Code:
--with-ldap \
--with-ldap-include=${PREFIX_INCLUDE}/include \
--with-ldap-lib=${PREFIX_LIB}/lib64 \

Set the prefix paths appropriate to your environment.

You can check for LDAP support in the apr-util shared library with the nm command, e.g.
Code:

$ nm -D /usr/lib64/libaprutil-1.so | grep ldap
0000000000017b90 T apr_ldap_get_option
0000000000017a00 T apr_ldap_info
0000000000017a60 T apr_ldap_init
0000000000018160 T apr_ldap_is_ldapi_url
00000000000180e0 T apr_ldap_is_ldaps_url
0000000000018090 T apr_ldap_is_ldap_url
0000000000017ce0 T apr_ldap_rebind_add
0000000000017c90 T apr_ldap_rebind_init
0000000000017d60 T apr_ldap_rebind_remove
0000000000017c10 T apr_ldap_set_option
0000000000017b70 T apr_ldap_ssl_deinit
0000000000017af0 T apr_ldap_ssl_init
0000000000018910 T apr_ldap_url_parse
00000000000181e0 T apr_ldap_url_parse_ext

Hope this helps.
Back to top
Joey



Joined: 27 Oct 2020
Posts: 7
Location: Czech Republic

PostPosted: Mon 14 Feb '22 9:42    Post subject: @Tangent:Sorry for not posting earlier.This was the solution Reply with quote

@Tangent: Sorry for not posting earlier.
The following was my solution:

I had LDAP devel package installed.
The OS LDAP happened to be corrupt, so I had to compile a separate LDAP into a different ${$PREFIX_LDAP}

APRIUTIL needed to include these options for LDAP support to be detected, otherwise Apache build complained APRIUTIL was compiled without LDAP support, so I configured APRIUTIL including the following:
....
--with-crypto=/usr/lib64 \
--with-ldap=ldap \
--with-ldap-lib=${$PREFIX_LDAP}/lib \
--with-ldap-include=${$PREFIX_LDAP}/include \
....

then configured Apache WebServer with:
.....
--with-crypto \
--with-ldap=ldap \
--with-ldap-lib=${PREFIX_LDAP}/lib \
--with-ldap-include=${PREFIX_LDAP}/include \
--enable-ldap=shared \
--with-ldap=${PREFIX_LDAP} \
.....

Thank you for your support

JOEY
Back to top


Reply to topic   Topic: Apache-2.4.52: apr/apr-util is compiled without ldap support View previous topic :: View next topic
Post new topic   Forum Index -> Apache