From:             [EMAIL PROTECTED]
Operating system: Linux 2.2.5
PHP version:      4.0.4
PHP Bug Type:     Compile Failure
Bug description:  Undefined Versioned Symbol

I have previously reported a problem with php-4.0.4 failing to compile, aborting with 
an undefined versioned symbol error (on __ns_name_unpack@@GLIBC_2.1).

This problem has been reported here several times, and on all occassions the 
development team has responded with "this isn't a php problem" feedback. Which is, of 
course, not very helpful to those people trying to get php to compile.

In my case I was finally able to get php to compile by moving all of the resolver 
libraries out of /usr/lib. Why this should have been necessary I do not know; all I 
know is that moving:

libresolv.a
libresolv_p.a
libresolv.so (symlinked to /lib/libresolv.so.2)

out of /usr/lib allowed php to compile.

The relevant section of the config.log file seems to be:
===========================
configure:5046: checking for inet_aton in -lbind
configure:5065: gcc -o conftest -g -O2  -DLINUX=2 -DUSE_HSREGEX -DUSE_EXPAT 
-DNO_DL_NEEDED  conftes$

configure:5103: checking for inet_aton in -lresolv
configure:5122: gcc -o conftest -g -O2  -DLINUX=2 -DUSE_HSREGEX -DUSE_EXPAT 
-DNO_DL_NEEDED  conftes$
/usr/i586-pc-linux-gnu/bin/ld: cannot find -lresolv
collect2: ld returned 1 exit status
configure: failed program was:
#line 5111 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char inet_aton();

int main() {
inet_aton()
; return 0; }
===========================

Apparently, configure looks for inet_aton in -lbind and -lresolv, and when it finds 
them in both, gets confused. Preventing it from finding the -lresolv libraries solves 
the problem.

I think. I'll be sure when I get my site to work (i.e., I'm wondering if php compiled, 
but perhaps isn't functional, and is screwing up httpd).

In any event, I think this qualifies as an issue to either fix in the configure 
script, or post a warning about in the INSTALL file.

And I hope to Ghu that no one else has to deal with this ridiculously obscure problem!

- Mark


-- 
Edit Bug report at: http://bugs.php.net/?id=8814&edit=1



-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to