ID:               25955
 Updated by:       [EMAIL PROTECTED]
 Reported By:      andreas at fink dot org
 Status:           Feedback
 Bug Type:         Compile Failure
 Operating System: MacOS 10.3 (7B85)
 PHP Version:      4.3.3, 5-200310221730
 New Comment:

Please try using this CVS snapshot:

  http://snaps.php.net/php5-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5-win32-latest.zip

Nevermind that, Marko tested and corrected a bit of 
that patch.  Try the latest CVS snapshots dated after 
this post.


Previous Comments:
------------------------------------------------------------------------

[2003-10-24 12:07:28] [EMAIL PROTECTED]

Correction make that this patch (the word COMPAT is not 
spelled COMPT):

Index: configure.in
=======================================================
============
RCS file: /repository/php-src/configure.in,v
retrieving revision 1.473
diff -u -r1.473 configure.in
--- configure.in        22 Oct 2003 21:43:39 -0000      
1.473
+++ configure.in        24 Oct 2003 16:03:56 -0000
@@ -189,6 +189,7 @@
     CPPFLAGS="$CPPFLAGS -D_BSD_TIMEOFDAY_FLAVOR";;
 *darwin*|*rhapsody*)
     CPPFLAGS="$CPPFLAGS -no-cpp-precomp"
+       AC_DEFINE(BIND_8_COMPAT, 1, [Fixing Panther 
bind 
compiles])
     php_multiple_shlib_versions_ok=yes;;
 *beos*)
     beos_threads=1
@@ -719,6 +720,7 @@
 
 if test "$PHP_IPV6" != "no" && test 
"$ac_cv_ipv6_support" = yes; then
   AC_DEFINE(HAVE_IPV6,1,[Whether to enable IPv6 
support])
+  AC_CHECK_LIB(inet_pton)
 fi
 
 AC_MSG_CHECKING([whether to enable versioning])
Index: dns.c
=======================================================
============
RCS file: /repository/php-src/ext/standard/dns.c,v
retrieving revision 1.63
diff -u -r1.63 dns.c
--- dns.c       26 Sep 2003 08:09:55 -0000      1.63
+++ dns.c       24 Oct 2003 16:04:41 -0000
@@ -90,7 +90,7 @@
        addr = php_gethostbyaddr(Z_STRVAL_PP(arg));
 
        if(addr == NULL) {
-#if HAVE_IPV6 && !defined(__MacOSX__)
+#if HAVE_IPV6 && HAVE_INET_PTON
 /* MacOSX at this time has support for IPv6, but not 
inet_pton()
  * so disabling IPv6 until further notice.  MacOSX 
10.1.2 (kalowsky) */
                php_error_docref(NULL TSRMLS_CC, 
E_WARNING, "Address is not a valid IPv4 or IPv6 
address");
@@ -107,7 +107,7 @@
 /* {{{ php_gethostbyaddr */
 static char *php_gethostbyaddr(char *ip)
 {
-#if HAVE_IPV6 && !defined(__MacOSX__)
+#if HAVE_IPV6 && HAVE_INET_PTON
 /* MacOSX at this time has support for IPv6, but not 
inet_pton()
  * so disabling IPv6 until further notice.  MacOSX 
10.1.2 (kalowsky) */
        struct in6_addr addr6;
@@ -115,7 +115,7 @@
        struct in_addr addr;
        struct hostent *hp;
 
-#if HAVE_IPV6 && !defined(__MacOSX__)
+#if HAVE_IPV6 && HAVE_INET_PTON
 /* MacOSX at this time has support for IPv6, but not 
inet_pton()
  * so disabling IPv6 until further notice.  MacOSX 
10.1.2 (kalowsky) */
        if (inet_pton(AF_INET6, ip, &addr6)) {

------------------------------------------------------------------------

[2003-10-24 12:04:33] [EMAIL PROTECTED]

I believe this is the patch to correct all of this.  
Give it a try and see if it works.  I cannot test, as I 
do not have Panther up and running at the moment (seems 
to pass on Jaguar).

Index: configure.in
=======================================================
============
RCS file: /repository/php-src/configure.in,v
retrieving revision 1.473
diff -u -r1.473 configure.in
--- configure.in        22 Oct 2003 21:43:39 -0000      
1.473
+++ configure.in        24 Oct 2003 16:03:56 -0000
@@ -189,6 +189,7 @@
     CPPFLAGS="$CPPFLAGS -D_BSD_TIMEOFDAY_FLAVOR";;
 *darwin*|*rhapsody*)
     CPPFLAGS="$CPPFLAGS -no-cpp-precomp"
+       AC_DEFINE(BIND_8_COMPT, 1, [Fixing Panther bind 
compiles])
     php_multiple_shlib_versions_ok=yes;;
 *beos*)
     beos_threads=1
@@ -719,6 +720,7 @@
 
 if test "$PHP_IPV6" != "no" && test 
"$ac_cv_ipv6_support" = yes; then
   AC_DEFINE(HAVE_IPV6,1,[Whether to enable IPv6 
support])
+  AC_CHECK_LIB(inet_pton)
 fi
 
 AC_MSG_CHECKING([whether to enable versioning])
Index: dns.c
=======================================================
============
RCS file: /repository/php-src/ext/standard/dns.c,v
retrieving revision 1.63
diff -u -r1.63 dns.c
--- dns.c       26 Sep 2003 08:09:55 -0000      1.63
+++ dns.c       24 Oct 2003 16:04:41 -0000
@@ -90,7 +90,7 @@
        addr = php_gethostbyaddr(Z_STRVAL_PP(arg));
 
        if(addr == NULL) {
-#if HAVE_IPV6 && !defined(__MacOSX__)
+#if HAVE_IPV6 && HAVE_INET_PTON
 /* MacOSX at this time has support for IPv6, but not 
inet_pton()
  * so disabling IPv6 until further notice.  MacOSX 
10.1.2 (kalowsky) */
                php_error_docref(NULL TSRMLS_CC, 
E_WARNING, "Address is not a valid IPv4 or IPv6 
address");
@@ -107,7 +107,7 @@
 /* {{{ php_gethostbyaddr */
 static char *php_gethostbyaddr(char *ip)
 {
-#if HAVE_IPV6 && !defined(__MacOSX__)
+#if HAVE_IPV6 && HAVE_INET_PTON
 /* MacOSX at this time has support for IPv6, but not 
inet_pton()
  * so disabling IPv6 until further notice.  MacOSX 
10.1.2 (kalowsky) */
        struct in6_addr addr6;
@@ -115,7 +115,7 @@
        struct in_addr addr;
        struct hostent *hp;
 
-#if HAVE_IPV6 && !defined(__MacOSX__)
+#if HAVE_IPV6 && HAVE_INET_PTON
 /* MacOSX at this time has support for IPv6, but not 
inet_pton()
  * so disabling IPv6 until further notice.  MacOSX 
10.1.2 (kalowsky) */
        if (inet_pton(AF_INET6, ip, &addr6)) {

------------------------------------------------------------------------

[2003-10-22 19:51:42] [EMAIL PROTECTED]

Yep, that was the fix they were going to add to the configure script.  

------------------------------------------------------------------------

[2003-10-22 15:33:09] andreas at fink dot org

apparently, the trick which is needed is to put

#define BIND_8_COMPAT   1

in ext/standard/dns.c

This will call the bind8 code instead of the non existing bind9 code.
Now compilation seems to work but I get ld:
/usr/lib/libjpeg.a(jcapimin.o) has local relocation entries in
non-writable section (__TEXT,__symbol_stub1)
 but this is probably not a problem of PHP but of libjpeg I just
compiled in.

------------------------------------------------------------------------

[2003-10-22 15:21:21] andreas at fink dot org

with version php5-200310221730 I got the same:


cc  -Iext/standard/ -I/development/php5-200310221730/ext/standard/
-DPHP_ATOM_INC -I/development/php5-200310221730/include
-I/development/php5-200310221730/main -I/development/php5-200310221730
-I/development/php5-200310221730/Zend -I/usr/include/libxml2
-I/usr/include/mysql  -no-cpp-precomp
-I/development/php5-200310221730/TSRM  -g -O2  -c
/development/php5-200310221730/ext/standard/dns.c -o ext/standard/dns.o
 && echo > ext/standard/dns.lo
/development/php5-200310221730/ext/standard/dns.c: In function
`zif_dns_check_record':
/development/php5-200310221730/ext/standard/dns.c:226: error: `T_MX'
undeclared (first use in this function)
/development/php5-200310221730/ext/standard/dns.c:226: error: (Each
undeclared identifier is reported only once
/development/php5-200310221730/ext/standard/dns.c:226: error: for each
function it appears in.)
/development/php5-200310221730/ext/standard/dns.c:237: error: `T_A'
undeclared (first use in this function)
/development/php5-200310221730/ext/standard/dns.c:238: error: `T_NS'
undeclared (first use in this function)
/development/php5-200310221730/ext/standard/dns.c:240: error: `T_PTR'
undeclared (first use in this function)
/development/php5-200310221730/ext/standard/dns.c:241: error: `T_ANY'
undeclared (first use in this function)
/development/php5-200310221730/ext/standard/dns.c:242: error: `T_SOA'
undeclared (first use in this function)
/development/php5-200310221730/ext/standard/dns.c:243: error: `T_CNAME'
undeclared (first use in this function)
/development/php5-200310221730/ext/standard/dns.c:263: error: `C_IN'
undeclared (first use in this function)
/development/php5-200310221730/ext/standard/dns.c: In function
`zif_dns_get_mx':
/development/php5-200310221730/ext/standard/dns.c:716: error: `HEADER'
undeclared (first use in this function)
/development/php5-200310221730/ext/standard/dns.c:716: error: `hp'
undeclared (first use in this function)
/development/php5-200310221730/ext/standard/dns.c:745: error: `C_IN'
undeclared (first use in this function)
/development/php5-200310221730/ext/standard/dns.c:745: error: `T_MX'
undeclared (first use in this function)
/development/php5-200310221730/ext/standard/dns.c:752: error: parse
error before ')' token
/development/php5-200310221730/ext/standard/dns.c:753: error:
`HFIXEDSZ' undeclared (first use in this function)
/development/php5-200310221730/ext/standard/dns.c:755: error:
`QFIXEDSZ' undeclared (first use in this function)
make: *** [ext/standard/dns.lo] Error 1
patmusic:/development/php5-200310221730 root# 

and if I include "nameser8_compat.h" in dns.c linking fails too:

ld: Undefined symbols:
_res_9_dn_expand
_res_9_dn_skipname
_res_9_search
make: *** [libs/libphp5.bundle] Error 1

------------------------------------------------------------------------

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/25955

-- 
Edit this bug report at http://bugs.php.net/?id=25955&edit=1

Reply via email to