I emerged apache2 and mod_auth_ldap and enabled -D AUTH_LDAP in /etc/conf.d/apache2. When I try to start apache I get the following error: ~ # /etc/init.d/apache2 start * Apache2 has detected a syntax error in your configuration files: Syntax error on line 9 of /etc/apache2/modules.d/46_mod_ldap.conf: Can't locate API module structure `auth_ldap_module' in file /usr/lib/apache2/modules/mod_auth_ldap.so: /usr/lib/apache2/modules/mod_auth_ldap.so: undefined symbol: auth_ldap_module It seems that the 46_mod_ldap.conf tries to load apache's native mod_auth_ldap, which seems to be broken under gentoo (works fine in other distros like debian). Meanwhile, the mod_auth_ldap package installs mm_mod_auth_ldap which was recently been renamed as per http://www.muquit.com/muquit/software/mod_auth_ldap/README3.4.txt/ mm_mod_auth_ldap seems to work fine, but apache never starts because 46_mod_ldap.conf kills apache before it gets a chance to load the correct module (/etc/apache2/modules.d/55_mod_auth_ldap.conf). The work around is pretty simple -- comment out: <IfDefine AUTH_LDAP> <IfModule !mod_auth_ldap.c> LoadModule auth_ldap_module modules/mod_auth_ldap.so </IfModule> </IfDefine> in the file /etc/apache2/modules.d/46_mod_ldap.conf and start apache. Reproducible: Always Steps to Reproduce: 1. emerge apache and mod_auth_ldap with apache2 and ldap use flags. 2. enable -D AUTH_LDAP in /etc/conf.d/apache2 3. try to start apache Actual Results: ~ # /etc/init.d/apache2 start * Apache2 has detected a syntax error in your configuration files: Syntax error on line 9 of /etc/apache2/modules.d/46_mod_ldap.conf: Can't locate API module structure `auth_ldap_module' in file /usr/lib/apache2/modules/mod_auth_ldap.so: /usr/lib/apache2/modules/mod_auth_ldap.so: undefined symbol: auth_ldap_module Expected Results: apache should start with mod_auth_ldap enabled I've tried this against the stable and ~x86 branch. Seems to behave the same in both.
I can confirm that this bug report is valid, and that the suggested work-around works as described. In case it matters: using mod_auth_ldap 3.3 from an overlay ebuild (with missing keyword for amd64 added).
I just built a few more servers and found another work around: Compile apache with static-modules and ldap, and DON'T emerge net-www/mod_auth_ldap. This will result in a functional *apache* mod_auth_ldap module as opposed to the mm_mod_auth_ldap module installed by net-www/mod_auth_ldap. Also, note that the syntax between apache's mod_auth_ldap and mm_mod_auth_ldap are completely different. There are good examples in the apache doc.
I have ldap_auth working with apache2 compiled with ldap USE-flag. But if I install mod_auth_ldap, and remove, it takes away the file, that are the same for the both package. # equery belongs /usr/lib/apache2/modules/mod_auth_ldap.so [ Searching for file(s) /usr/lib/apache2/modules/mod_auth_ldap.so in *... ] net-www/mod_auth_ldap-3.3 (/usr/lib/apache2/modules/mod_auth_ldap.so) net-www/apache-2.0.55-r1 (/usr/lib/apache2/modules/mod_auth_ldap.so) The workaround is, not to install mod_auth_ldap, and use apache2 ldap USE-flag. I reinstalled apache2, to get the file back.
net-www/mod_auth_ldap will go away in favor of the ldap modules included with apache2 soon, closing this as wontfix