Apache2 +openldap error

Ryan Schmidt ryandesign at macports.org
Sun Jul 1 03:49:45 PDT 2007


On Jul 1, 2007, at 05:41, Samuel V. Green III wrote:

> On Jul 1, 2007, at 3:00 AM, Ryan Schmidt wrote:
>
>> On Jul 1, 2007, at 02:52, Samuel V.Green III wrote:
>>
>>> Upon issuing a sudo port installed I get:
>>>
>>> apr-util @1.2.8_2 (active)
>>> ......,
>>> openldap @2.3.35_0 (active)
>>> .....,
>>>
>>>
>>> Upon issuing sudo port install apache2 + openldap I get :
>>>
>>> error: #error mod_authnz_ldap requires APR-util to have LDAP  
>>> support built in. To fix add --with-ldap to ./configure
>>>
>>> Reading this I recognized that I DID NOT build the APR-util with  
>>> the +openldap option.
>>> I then did an uninstall of apache2 as well as php5 to correct  
>>> this error.
>>> I'm now trying again to get Apache2 to build with openldap.
>>>
>>> Can someone point me to the documentation in the MacPorts Wiki or  
>>> whatever that would have
>>> prevented me from "the long route?"
>>
>> If you did not yet have apr-util installed, and installed apache2  
>> +openldap, then apr-util would also get installed with +openldap,  
>> and things should have just worked. However, if you already had  
>> apr-util installed, it would not be reinstalled, even if it did  
>> not have the "right" set of variants.
>>
>> Portfiles can only depend on another port being installed, not on  
>> a particular variant of another port being installed. This is  
>> ticket #126.
>>
>> Once you received the error from apache2 that explained that apr- 
>> util needed to be built with ldap support, the solution was to  
>> uninstall the apr-util you already had (sudo port -f uninstall apr- 
>> util) and reinstall it with the openldap variant (sudo port  
>> install apr-util +openldap). Then apache2 should install properly.
>
> Thank you.  I logically did the uninstall of the apr-util and added  
> the +openldap to it
> before reinstalling.   Relative to this I then reinstalled apache2  
> and php5 to reflect the +openldap variant.
>
> Improving the MacPorts documentation that would let an end user  
> understand
> the need to have to add the "+openldap"  variant to the apr-util  
> build BEFORE an +openldap variant
> is added to Apache2 would be helpful.

As I said, if you did not already have apr-util installed, no special  
action would have been necessary. Installing apache2 +openldap would  
have caused apr-util +openldap to have been installed automatically.  
The problem only arose because you already had apr-util installed  
without +openldap.

Our documentation is out of date for most things, not just this. We  
are attempting to work on the documentation again. Specific  
suggestions for where in the documentation this should go and/or what  
specifically should be said would be helpful. I say this because I'm  
not sure what it should say to avoid being both overly wordy and  
overly specific. (If it said "If you want to install apache2  
+openldap but already have apr-util installed without +openldap,  
uninstall apr-util and reinstall it with +openldap" that would be way  
too specific to that port. If it said "If you want to install a port  
that depends on a particular variant of another port but you already  
have a different variant of that other port installed, then you will  
need to uninstall that other port and reinstall it with the variants  
required for the new port you want to install" then that would be  
overly wordy, and probably nobody reading that would in fact  
recognize the problem when they encounter it.)

Perhaps a better solution is to update the apache2 portfile, in this  
case, so that if you select +openldap, it checks apr-util to see if  
it's installed with +openldap, and if not, it prints an error that's  
slightly friendlier than the one that apache2 printed for you. (I say  
slightly friendlier because the message it printed was already pretty  
friendly: it already pretty much told you what you needed to do to  
correct the problem.)

Don't forget to Reply To All so that your reply goes to the mailing  
list too, not just to me.




More information about the macports-users mailing list