# php5-ldap failing to make



## junkmailtrap (Mar 28, 2011)

I ran portmanager today to update all my ports. One of the ports needing upgraded was the openldap24-client. That ran fine, but I received a message that php5-ldap failed to rebuild correctly. I've tried to rebuild it manually but all I get is:

```
configure: error: LDAP build check failed. Please check config.log for more information.
===>  Script "configure" failed unexpectedly.
```

Config.log doesn't seem to give any more information on why it's not building.

It seems like it's a dependency problem with the new openldap24-client, but I'm not sure what to do to fix it.


----------



## SirDice (Mar 28, 2011)

I'm sure there's a lot more information. It would be nice if you posted that too.


----------



## junkmailtrap (Mar 28, 2011)

Here's the config.log.


----------



## SirDice (Mar 28, 2011)

I was actually referring to the information that's printed on the screen prior to configure error.


----------



## junkmailtrap (Mar 28, 2011)

Ah, sorry. Here it is:

```
===>   php5-ldap-5.3.6 depends on file: /usr/local/bin/phpize - found
===>   php5-ldap-5.3.6 depends on file: /usr/local/bin/autoconf-2.68 - found
===>   php5-ldap-5.3.6 depends on shared library: ldap-2.4.8 - found
===>  PHPizing for php5-ldap-5.3.6
Configuring for:
PHP Api Version:         20090626
Zend Module Api No:      20090626
Zend Extension Api No:   220090626
configure.in:3: warning: prefer named diversions
configure.in:3: warning: prefer named diversions
===>  Configuring for php5-ldap-5.3.6
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for a sed that does not truncate output... /usr/local/bin/gsed
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking how to run the C preprocessor... cpp
checking for icc... no
checking for suncc... no
checking whether cc understands -c and -o together... yes
checking for system library directory... lib
checking if compiler supports -R... yes
checking build system type... amd64-portbld-freebsd7.2
checking host system type... amd64-portbld-freebsd7.2
checking target system type... amd64-portbld-freebsd7.2
checking for PHP prefix... /usr/local
checking for PHP includes... -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM 
-I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib
checking for PHP extension directory... /usr/local/lib/php/20090626
checking for PHP installed headers prefix... /usr/local/include/php
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... no
configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.
checking for gawk... no
checking for nawk... nawk
checking if nawk is broken... no
checking for LDAP support... yes, shared
checking for LDAP Cyrus SASL support... no
checking for 3 arg ldap_set_rebind_proc... yes
checking for ldap_parse_result... no
checking for ldap_parse_reference... no
checking for ldap_start_tls_s... no
checking for ldap_bind_s... no
configure: error: LDAP build check failed. Please check config.log for more information.
===>  Script "configure" failed unexpectedly.
Please report the problem to [email]ale@FreeBSD.org[/email] [maintainer] and attach the
"/usr/ports/net/php5-ldap/work/php-5.3.6/ext/ldap/config.log" including the
output of the failure of your make command. Also, it might be a good idea to
provide an overview of all packages installed on your system (e.g. an `ls
/var/db/pkg`).
*** Error code 1

Stop in /usr/ports/net/php5-ldap.
```


----------



## SirDice (Mar 28, 2011)

Right, it doesn't seem to like your openldap installation. Can you post the output of
`# pkg_info -x openldap`


----------



## junkmailtrap (Mar 28, 2011)

I've also got a similar problem on another box. Except it's apr that won't rebuild, saying it can't find the LDAP library, but I haven't tried any troubleshooting on that yet. Here's the pkg_info output:

```
Information for openldap-client-2.4.25:

Comment:
Open source LDAP client implementation


Description:
OpenLDAP is a suite of Lightweight Directory Access Protocol (v3) servers,
clients, utilities and development tools.

This package includes the following major components:

 * -lldap - a LDAP client library
 * -llber - a lightweight BER/DER encoding/decoding library
 * LDAP tools - A collection of command line LDAP utilities
 * documentation - man pages for all components

WWW: [url]http://www.OpenLDAP.org/[/url]
```


----------



## SirDice (Mar 28, 2011)

I just built the port without any issues. Same openldap-client version. 

Have you tried rebuilding net/openldap24-client?


----------



## junkmailtrap (Mar 28, 2011)

Yep, that was one of the first things I did.


----------



## KindOfBlue (Mar 28, 2011)

Hi,

I have exactly the same problem building any packages that depends on openldap24-client.
Please help ! I need to upgrade some packages which have security vulnerabilities...
I can give any information needed to solve this problem.

Thanks by advance.


----------



## SirDice (Mar 28, 2011)

Are the include files from openldap installed correctly?


```
root@build:/usr/ports/net/php5-ldap#ll /usr/local/include/ldap*
-rw-r--r--  1 root  wheel  64816 Mar 24 16:27 /usr/local/include/ldap.h
-rw-r--r--  1 root  wheel   9538 Mar 24 16:27 /usr/local/include/ldap_cdefs.h
-rw-r--r--  1 root  wheel   1890 Mar 24 16:27 /usr/local/include/ldap_features.h
-rw-r--r--  1 root  wheel   9523 Mar 24 16:27 /usr/local/include/ldap_schema.h
-rw-r--r--  1 root  wheel   3539 Mar 24 16:27 /usr/local/include/ldap_utf8.h
root@build:/usr/ports/net/php5-ldap#pkg_info -W /usr/local/include/ldap.h
/usr/local/include/ldap.h was installed by package openldap-client-2.4.24
```


----------



## KindOfBlue (Mar 28, 2011)

Yes they are.


```
[root@sas /usr/ports]# ls -l /usr/local/include/ldap*
-rw-r--r--  1 root  wheel  64816 Mar 28 17:22 /usr/local/include/ldap.h
-rw-r--r--  1 root  wheel   9538 Mar 28 17:22 /usr/local/include/ldap_cdefs.h
-rw-r--r--  1 root  wheel   1890 Mar 28 17:22 /usr/local/include/ldap_features.h
-rw-r--r--  1 root  wheel   9523 Mar 28 17:22 /usr/local/include/ldap_schema.h
-rw-r--r--  1 root  wheel   3539 Mar 28 17:22 /usr/local/include/ldap_utf8.h
[root@sas /usr/ports]# pkg_info -W /usr/local/include/ldap.h
/usr/local/include/ldap.h was installed by package openldap-client-2.4.25
```


----------



## junkmailtrap (Mar 28, 2011)

Yes all the include files appear to be in the right place.


----------



## earonyk (Mar 29, 2011)

From /usr/ports/UPDATING:



> 2011-03-28
> Affects: users of net/openldap24-client
> Author: delphij@FreeBSD.org
> Reason:
> ...



What I did:


```
root@mon:~# rm /var/db/ports/openldap24/options
root@mon:~# cd /usr/ports/net/openldap24-client
root@mon:/usr/ports/net/openldap24-client# make clean
===>  Cleaning for openldap-client-2.4.25
root@mon:/usr/ports/net/openldap24-client# make distclean
===>  Cleaning for openldap-client-2.4.25
===>  Deleting distfiles for openldap-client-2.4.25
root@mon:/usr/ports/net/openldap24-client# make deinstall && make reinstall
```

When selecting options do not select FETCH. After that I was able to build php5-ldap without any errors.


----------



## SirDice (Mar 29, 2011)

That's odd. I have FETCH enabled and php5-ldap built just fine with it.


```
root@build:/usr/ports/net/php5-ldap#cat /var/db/ports/openldap24/options 
# This file is auto-generated by 'make config'.
# No user-servicable parts inside!
# Options for openldap-client-2.4.24
_OPTIONS_READ=openldap-client-2.4.24
WITHOUT_SASL=true
WITH_FETCH=true
```


----------



## earonyk (Mar 29, 2011)

Is it because you have openldap-client 2.4.24 as opposed to 2.4.25?


----------



## junkmailtrap (Mar 29, 2011)

Running *make config*, removing the fetch support and then recompiling the openldap24-client seems to have fixed it for me.

It looks like openldap was bumped to openldap-client-2.4.25_1 sometime yesterday, and I'm guessing that's when the note to /usr/ports/UPDATING was added because I didn't see it when I looked yesterday.

Thanks to all.


----------

