# Ports and dependencies



## mariourk (Mar 14, 2012)

I just installed FreeBSD on a new server and ran into a problem while installing Apache22. During compilation, I ran into this error:

```
mod_authnz_ldap.c:41:2: error: #error mod_authnz_ldap requires APR-util to have LDAP support built in. To fix add --with-ldap to ./configure.
```
As far as I understand this error, it complains that some dependency is not compiled with LDAP support and should be recompiled with LDAP support. This means I have to figure out what package this is and where to find it in the ports directory, in order to recompile it. After that I can try to compile apache22 again. And it's not unlikely I will run into similar problems along the way.

I have a Gentoo background and I'm used to working with Portage. In Portage I can change a USE-flag and Portage will automaticly pickup any dependency that needs to be recompiled to meet the needs of this changed USE-flag. Does Ports have somthing similar? Perhaps I'm doing this all wrong and there is a much easier way to manage this?

Thanks in advance


----------



## SirDice (Mar 14, 2012)

It's probably www/apr1.


```
cd /usr/ports/www/apr1
make config
```

Turn on LDAP support and restart the Apache build.

Most of those options can be turned on or off using make.conf(5). Also see ports(7).


----------



## mariourk (Mar 14, 2012)

Thank you, that's certainly helpful, but not an answer to my original question. How do I best manage the dependency hell the FreeBSD way?


----------



## jb_fvwm2 (Mar 14, 2012)

Many ways... I am currently accustomed to [but the apache installs are more complex...]

```
portmaster -d -P -i -g -B /var/db/pkg/mmv-... /var/db/pkg/atop-... textproc/fex misc/gnuls && yell || yell
```
requires audio/yell and you can now or eventually 
	
	



```
script -a portmaster.logfile portmaster [#as above...]
```
 log its proceedings, have it run as a pipe with xargs.


----------



## mariourk (Mar 15, 2012)

SirDice said:
			
		

> It's probably www/apr1.
> Turn on LDAP support and restart the Apache build.
> 
> Most of those options can be turned on or off using make.conf(5). Also see ports(7).



How exactly do I turn on LDAP support in make.conf? In Gentoo I would do it like this:

```
USE="ldap"
```
Not sure what's the correct FreeBSD way to do this


----------



## SirDice (Mar 15, 2012)

Got the wrong port category, it's devel/apr1 :e

If you look at a port's Makefile you'll notice various WITH_ and WITHOUT_ variables. You can use those in /etc/make.conf.

In this case WITH_LDAP should do the trick.


----------

