Moderator: General Moderators
Code: Select all
$ pkg list | ggrep ldap library/apr-util-15/apr-ldap 1.5.4-0.175.3.0.0.30.0 i-- library/openldap 2.4.30-0.175.3.20.0.3.0 i-- naming/ldap 0.5.11-0.175.3.0.0.30.0 i--
http://pkg.oracle.com/solaris/release/e ... ion=Search
I just recently started working with Solaris (about a year ago) -- I have extensive Linux experience, but this is a different animal.
I can compile PHP fine (without LDAP) But I really need ldap to work.
Thank you for helping me through this!
There are two different ldap.h - one at /usr/include/ldap.h and one at /usr/include/openldap/ldap.h. Here are the diffs for that, the /usr/include/ldap.h is not even close.
(Your file is on the left)
I tried changing the configure script to --with-ldap=/usr/include/openldap but it complains that it can't find ldap.h.
Edit: Your file is on the left, not the right.
Unfortunately PHP's configure script isn't terribly flexible when it comes to stuff like this. The way forward I'm looking at is to put all the OpenLDAP files into one central location, with a /lib for libraries and /include for headers. You could compile OpenLDAP yourself, or create a temporary directory with symlinks to the appropriate locations
Code: Select all
/foo/lib -> /usr/lib/??? (maybe openldap or $arch/openldap or similar) /foo/include -> /usr/include/openldap
When this is all working you could also create a bug report for supporting building ext/ldap against OpenLDAP on Solaris explaining what you've found.
Now, trying to build OpenLDAP (again, I tried doing this weeks ago but now I'm determined to get this going), I'm running into a problem (which is probably outside of the scope of this forum) but I can't compile it.
LDFLAGS="-L/usr/local/BerkeleyDB.5.0/lib" CPPFLAGS="-I/usr/local/BerkeleyDB.5.0/include" LD_LIBRARY_PATH="/usr/local/BerkeleyDB.5.0/lib" ../configure
checking db.h usability... yes
checking db.h presence... yes
checking for db.h... yes
checking for Berkeley DB major version... configure: error: Unknown Berkeley DB major version
Code: Select all
configure:27233: result: 7 configure:27265: checking db.h usability configure:27277: gcc -c -g -O2 -I/usr/local/BerkeleyDB.5.0/include conftest.c >&5 configure:27283: $? = 0 configure:27287: test -z || test ! -s conftest.err configure:27290: $? = 0 configure:27293: test -s conftest.o configure:27296: $? = 0 configure:27306: result: yes configure:27310: checking db.h presence configure:27320: gcc -E -I/usr/local/BerkeleyDB.5.0/include conftest.c configure:27326: $? = 0 configure:27346: result: yes configure:27381: checking for db.h configure:27388: result: yes configure:27404: checking for Berkeley DB major version configure:27517: error: Unknown Berkeley DB major version
PS: It's not that I am a sadomasochist, I have to use Solaris for work purposes.
You could skip building it and try the symlink approach...
configure: error: Cannot find ldap libraries in /usr/include/openldap.
And the file it looks like it's looking for "libldap30." doesn't exist. I think compiling OpenLDAP is the way to go so now I'm off down that rabbit hole.
I'll let you know what happens.
Now it's off to configuring that mess... But hey requinix, I want to thank you for slowing me down in order to take the time to figure it out... Panic and rushing is the worst thing for a programmer, and you just have to slow down and work methodically.
Plus hey, I'm new to the forum so I look forward to helping other people out.
checking for LDAP support... yes
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_control_find... no
checking for ldap_bind_s... no
configure: error: LDAP build check failed. Please check config.log for more info rmation.
Code: Select all
configure:49539: checking for ldap_bind_s configure:49539: gcc -o conftest -I/usr/include -std=gnu99 -m64 -fvisibility=hidden -I/usr/local/openldap/include -D_POSIX_PTHREAD_SEMANTICS -I/usr/include -L/usr/lib -L/usr/local/openldap/lib -R/usr/gcc/5/lib/gcc/x86_64-pc-solaris2.11/5.4.0 -L/usr/gcc/5/lib/gcc/x86_64-pc-solaris2.11/5.4.0 conftest.c -lldap -llber -lpng -lz -lcurl -lz -lrt -lm -lnsl -lsocket -lgcc -lxml2 -lssl -lcrypto -lcurl -lidn -lssh2 -lssh2 -lnsl -lsocket -lssl -lcrypto -lssl -lcrypto -lgss -llber-2.4 -lldap_r-2.4 -lz -lsocket -lnsl -lxml2 -lssl -lcrypto >&5 ld: fatal: recording name conflict: file '/usr/local/openldap/lib/liblber.so' and file '/usr/lib/amd64/liblber-2.4.so' provide identical dependency names: liblber-2.4.so.2 ld: warning: symbol 'ldap_int_global_options' has differing sizes: (file /usr/local/openldap/lib/libldap.so value=0x140; file /usr/lib/amd64/libldap_r-2.4.so value=0x180); /usr/local/openldap/lib/libldap.so definition taken collect2: error: ld returned 1 exit status
ld: fatal: recording name conflict: file '/usr/local/openldap/lib/liblber.so' and file '/usr/lib/amd64/liblber-2.4.so' provide identical dependency names: liblber-2.4.so.2
You might have the same problem with -lldap and -lldap_r-2.4 - I'm not sure what the libldap_r one is but a quick search suggests there will be conflicts with libldap.
What I am going to do is spin up a fresh server and compile the libraries myself - (and I'll have to write the documentation to go with it ugh) -- I will let you know how it goes!
[Tue Sep 05 14:12:37.221792 2017] [core:notice] [pid 25599] AH00052: child pid 25601 exit signal Segmentation fault (11)'
It does this on 'ldap_connect()' - - I feel I'm right there.