ID: 41973 Updated by: [EMAIL PROTECTED] Reported By: steffen at hauihau dot de -Status: Wont fix +Status: Feedback Bug Type: Compile Failure Operating System: Gentoo Linux PHP Version: 5.2CVS-2007-07-23 Assigned To: jani New Comment:
Can you please try this patch: http://gcov.php.net/~nlopess/ldap_ldflags_patch.txt Previous Comments: ------------------------------------------------------------------------ [2007-07-24 15:51:08] steffen at hauihau dot de Thanks a lot for your answer. I'm wondering, why configure works fine with this flag set when I invoke it with '--without-ldap'. Every check works, except ldap. When I manually edit configure and add LIBS="$LIBS -ldap" before the checks for the first ldap related tests are done (before 'for ac_func in ldap_parse_result ldap_parse_reference ldap_start_tls_s') it works, and the following make succeeds. My knowledge about compiler and linker is not that big. Would it be the wrong way, to permanently add '-ldap' to $LIBS before the tests for the ldap related functions are done? You could for example backup $LIBS in $ac_check_lib_save_LIBS before. This is only an idea, if it's definitely not possible, to workaround this issue, I will have to file a bug for this gentoo ebuild and they should discuss about this topic. Regards, Steffen ------------------------------------------------------------------------ [2007-07-24 15:26:21] [EMAIL PROTECTED] Of course that flag will cause problems. And it's not something we're likely to "fix" as we link only with libs that are needed anyways and it would break every check we do in configure, as you noticed. Feel free to provide a patch, otherwise: Don't use that flag when building PHP. ------------------------------------------------------------------------ [2007-07-16 13:26:13] steffen at hauihau dot de Sorry for the late answer. I tried to configure PHP_5_2 CVS (200707161230) and it does also complain about missing 'ldap_bind_s'. LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-znow -Wl,--sort-common -s" CFLAGS="-march=pentium-m -O2 -msse3 -pipe -fomit-frame-pointer" CPPFLAGS="-march=pentium-m -O2 -msse3 -pipe -fomit-frame-pointer" I invoked configure the same way as in my first post. The result is the same. I found out, that configure works, if I remove '-Wl,as-needed' from my LDFLAGS. Is this flag not supported? Regards Steffen ------------------------------------------------------------------------ [2007-07-12 11:41:18] [EMAIL PROTECTED] I can not reproduce this with latest PHP_5_2 CVS checkout. We do not support any 3rd party "ports" either. Feel free to reopen this IF you can reproduce it using latest 5.2 CVS snapshot from http://snaps.php.net/ ------------------------------------------------------------------------ [2007-07-12 11:31:11] steffen at hauihau dot de Gentoo has no ebuild for php 5.2.3, so I have to wait, until they release one. Yes, configure works, if I remove '=shared' from --with-ldap, but as I think, this is, because '-lldap' is added to $LIBS in configure when $ext_shared is not true. Removing the '=shared' is not pratical because the change will be overriden when the next portage sync is done. I searched for the mysql related stuff in configure to see how this is done, and there, $LIBS is expanded by '-lmysqlclient' before conftest.c gets compiled (e.g. Checking for mysql_close in -lmysqlclient). So, I could imagine, that $LIBS should also be expanded with '-lldap' before the conftests are done. Or am I wrong? Regards Steffen ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/41973 -- Edit this bug report at http://bugs.php.net/?id=41973&edit=1