Configure PHP 5.2.8 on AIX 5.3 With LDAP

Configure PHP 5.2.8 on AIX 5.3 With LDAP

am 18.09.2009 19:56:39 von Ginny Jaworski

--=_alternative 0062918D85257635_=
Content-Type: text/plain; charset="US-ASCII"

I am having problems configuring PHP 5.2.8 with ldap on a AIX 5.3 ldap
server. I have also downloaded openldap to try to configure PHP. LDAP
is installed in /opt/IBM/ldap/V6.0 and openldap in /opt/freeware.
PATH=/opt/freeware/bin:/usr/local/apache/build/libtool:/usr/ bin:/etc:/usr/sbin:/usr/ucb:/sbin:/usr/java14/jre/bin:/usr/j ava14/bin

Configure statement is: ./configure
--with-apxs2=/usr/local/apache/bin/apxs --without-pear
--with-ldap=/opt/freeware --disable-xmlwriter --disable-simplexml
--disable-libxml --disable-xml --disable-dom --enable-cli

Configure Error:
configure:53825: gcc -o conftest -I/usr/include -g -O2
-I/opt/freeware/include -L/usr/lib -L/opt/freeware/lib -L/o
pt/freeware/lib conftest.c -lldap -llber -liconv -lm 1>&5
ld: 0711-736 ERROR: Input file /usr/lib/libldap.a:
XCOFF64 object files are not allowed in 32-bit mode.

/usr/lib/libldap.a is a symbolic link to the ldap libraries
/opt/IBM/ldap/V6.0/lib64/libidsldap.a. Why is it looking in /usr/lib
when I specified --with-ldap=/opt/freeware .

If I change configure to: ./configure
--with-apxs2=/usr/local/apache/bin/apxs --without-pear
--with-ldap=/opt/freeware/lib32 --disable-xmlwriter --disable-simplexml
--disable-libxml --disable-xml --disable-dom --enable-cli

Configure Error:
configure: error: Cannot find ldap.h

Tried this configure with same error: Cannot find ldap.h
INCLUDE=/opt/freeware/include ./configure
--with-apxs2=/usr/local/apache/bin/apxs --without-pear
--with-ldap=/opt/freeware/lib32 --disable-xmlwriter --disable-xmlreader
--disable-simplexml --disable-libxml --disable-xml --disable-dom
--enable-cli


ldap.h exists in :

/opt/freeware/include/ldap.h
/opt/freeware/lib64/ldap.h
/opt/freeware/ldap.h
/opt/IBM/ldap/V6.0/include/ldap.h
/opt/IBM/ldap/V6.0/lib64/ldap.h
/usr/include/ldap.h
/usr/ldap/include/ldap.h

Where do I point --with-ldap to? Thanks so much for your help.
--=_alternative 0062918D85257635_=--

Re: Configure PHP 5.2.8 on AIX 5.3 With LDAP

am 18.09.2009 21:55:30 von Ben Dunlap

Sounds like you have 64-bit LDAP libraries installed on your system.
Do you also have 32-bit libraries installed, but PHP is ignoring them?

The --with-ldap configure option tells PHP where to look for ldap.h
and libldap.a -- but not directly. Here's the relevant bit from
php-src/trunk/ext/ldap/config.m4:

if test -f $1/include/ldap.h; then
LDAP_DIR=$1
LDAP_INCDIR=$1/include
LDAP_LIBDIR=$1/$PHP_LIBDIR

So if you say "--with-ldap=/opt/freeware", the configure script is
going to look for /opt/freeware/include/ldap.h. If that file exists,
it uses "/opt/freeware" to set LDAP_INCDIR and LDAP_LIBDIR, which
leads to these two arguments on your gcc command line:

-I/opt/freeware/include -> gives gcc another path to find .h files
-L/opt/freeware/lib -> gives gcc another path to find .a files

If the configure script doesn't find

/include/ldap.h, it fails
immediately -- which explains your second two errors.

As for the first error, either there isn't an
/opt/freeware/lib/libldap.a on your system, or if there is, the 64-bit
library that's symlinked in /usr/lib is taking precedence, because gcc
ALSO has the argument "-L/usr/lib", and that one shows up on the
command line before "-L/opt/freeware/lib":

> configure:53825: gcc -o conftest -I/usr/include -g -O2
> -I/opt/freeware/include -L/usr/lib -L/opt/freeware/lib -L/o
> pt/freeware/lib conftest.c -lldap -llber -liconv -lm 1>&5

Ben

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php