#1
  1. mod_dev_shed
    Devshed Supreme Being (6500+ posts)

    Join Date
    Sep 2002
    Location
    Atlanta, GA
    Posts
    14,817
    Rep Power
    1099

    Mod_authnz_ldap (Apache 2.2.2) ./configure error


    I'm having some trouble ./configure-ing Apache 2.2.2 on FreeBSD 6.1 to create mod_authnz_ldap. This is the original ./configure:
    Code:
    ./configure
      --prefix=/usr/local/apache
      --exec-prefix=/usr/local
      --disable-all
      --enalbe-dso
      --enable-mods-shared=all
    It was discouraging to find that mod_authnz_ldap was not included in "all," so I added it:
    Code:
    * all of above plus *
      --with-ldap
      --enable-ldap
      --enable-authnz-ldap
    The ./configure succeeds, but the make fails. The first mod_authnz_ldap error is
    Code:
    #error mod_authnz_ldap requires APR-util to have LDAP support bulit in. To fix add --with-ldap to ./configure.
    This is where it gets interesting (ie, I start stabbing in the dark). I'm guessing that means the ./configure-ation of apr-util. I see this file in the srclib directory located in my [un]gzipped source directory. So I try this in srclib/apr/
    Code:
    ./configure --with-apr=/usr/local/apache/apr --with-ldap=/usr/local/etc/openldap
    And I receive this error:
    Code:
    checking for ldap support ...
    checking for ldap_init in -l/usr/local/etc/openldap... no
    configure: error: could not find an LDAP library
    Interestingly, there's an ldap directory in the modules directory in the src directory in which I'm compiling Apache.


    Am I missing something obvious? Does anybody have any ideas how I can get this isntalled/compiled?


    OpenLDAP Client 2.2.30 installed via pkg_add -r
    Last edited by jharnois; July 25th, 2006 at 03:43 PM. Reason: Added --with-ldap to second CODE box.
    # Jeremy

    Explain your problem instead of asking how to do what you decided was the solution.
  2. #2
  3. Contributing User
    Devshed Regular (2000 - 2499 posts)

    Join Date
    May 2004
    Location
    Superior, CO, USA
    Posts
    2,418
    Rep Power
    1712
    Originally Posted by jharnois
    Code:
    checking for ldap support ...
    checking for ldap_init in -l/usr/local/etc/openldap... no
    configure: error: could not find an LDAP library
    Based on this error it looks like it is using the --with-ldap argument as the library name. This is different from most of the other ones that expect a directory name. I'd suggest trying it with the full path to the LDAP library.
  4. #3
  5. mod_dev_shed
    Devshed Supreme Being (6500+ posts)

    Join Date
    Sep 2002
    Location
    Atlanta, GA
    Posts
    14,817
    Rep Power
    1099
    Same errors (with filename substituted of course). Hmm ...

    I really shouldn't have to ./configure apr-util directly should I? There's a README.ldap in $apache_src/modules/ldap that indicates that this shoud do it:
    Code:
    ./configure --with-ldap --enable-ldap --enable-authnz-ldap
    All of those are included in my ./configure for Apache, but no go.
    # Jeremy

    Explain your problem instead of asking how to do what you decided was the solution.
  6. #4
  7. No Profile Picture
    TANSTAAFL
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2002
    Location
    chair
    Posts
    164
    Rep Power
    32
    Any luck finding an answer? I am currently struggling with this as well
  8. #5
  9. mod_dev_shed
    Devshed Supreme Being (6500+ posts)

    Join Date
    Sep 2002
    Location
    Atlanta, GA
    Posts
    14,817
    Rep Power
    1099
    Unfortunately, no.

    Are you using Apache 2.2.2 as well? I'm trying to find the time to test this on other Apache versions.
    # Jeremy

    Explain your problem instead of asking how to do what you decided was the solution.
  10. #6
  11. No Profile Picture
    TANSTAAFL
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2002
    Location
    chair
    Posts
    164
    Rep Power
    32
    Originally Posted by jharnois
    Unfortunately, no.

    Are you using Apache 2.2.2 as well? I'm trying to find the time to test this on other Apache versions.
    Actually 2.2.3; openldap 2.3.27. Fedora Core 5 - updated kernel to 2.6.17.13

    I found a bugzilla report:
    http://issues.apache.org/bugzilla/show_bug.cgi?id=38965

    Seems similar and I emailed Peter Buki to check his status.
  12. #7
  13. No Profile Picture
    TANSTAAFL
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2002
    Location
    chair
    Posts
    164
    Rep Power
    32
    SimonGreenhill recommends staying with Apache 2.0.x for PHP, so I am going to that: http://forums.devshed.com/apache-development-15/cant-install-php-on-apache2-2-help-386062.html

    However, I am still getting the same errors... my configure:
    Code:
    ./configure --prefix=/usr/local/apache-2.0.59 \
    --enable-rewrite --enable-so --with-ssl=/usr/local/ssl \
    --enable-ssl --with-ldap \
    --with-ldap-include=/usr/local/openldap-2.3.27/include \
    --with-ldap-lib=/usr/local/openldap-2.3.27/lib \
    --enable-ldap --enable-authnz-ldap
    Last edited by kwilley; September 20th, 2006 at 10:32 AM. Reason: i can
  14. #8
  15. No Profile Picture
    TANSTAAFL
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2002
    Location
    chair
    Posts
    164
    Rep Power
    32


    For kicks I went back to OpenSSL 0.9.7k, rebuilt OpenLDAP and now Apache builds fine.
  16. #9
  17. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2012
    Posts
    1
    Rep Power
    0
    After finding this 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.

    Code:
    yum update openldap
    Look for the devel package

    Code:
    yum list openldap*devel*
    Install the devel package listed by your package manager

    Code:
    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.

IMN logo majestic logo threadwatch logo seochat tools logo