[Date Prev][Date Next] [Chronological] [Thread] [Top]

Symbol conflicts between libldap and Oracle client library



Hi,

I'm desperately trying to compile php with support for LDAP (with
openldap/libldap) *and* Oracle. But as soon as I compile in Oracle support,
LDAP no longer works. After debugging the whole stuff, I finally found out
the reason: Despite the Oracle library only being used for connecting to a
Oracle database, it includes functions which conflict with libldap:
---
lib # objdump -T libclntsh.so | grep " ldap"
[...]
00315240 g    DF .text  00000050  Base        ldap_init
00314d54 g    DF .text  00000046  Base        ldap_value_free_len
003159c0 g    DF .text  00000078  Base        ldap_sasl_bind_s
00314398 g    DF .text  00000050  Base        ldap_perror
003157a4 g    DF .text  000000aa  Base        ldap_search_ext_s
00315290 g    DF .text  0000008c  Base        ldap_rename
00314a8c g    DF .text  00000046  Base        ldap_explode_dns
[...]
lib #
---

Thus, as soon as the PHP module is linked against libldap and libclntsh, the
ldap functions from the Oracle library are used and they fail. :-(

I've already tried using the Oracle library for PHP LDAP support, but this
won't work as the Oracle stuff doesn't contain a matching ldap.h.

Is there a way to (automatically?) prepend "openldap_" to the openldap
functions (e.g. openldap_ldap_init)? Or is there a way to tell the dynamic
linker to prefer the libldap symbols? Maybe it's possible to strip the
ldap_* symbols from the Oracle library (strip -N doesn't work)??

Help, please!

Cheers, Johann