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

This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
 
Thank you for the report, and for helping us make PHP better.




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

[2003-10-24 13:26:49] [EMAIL PROTECTED]

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.

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

[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.

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

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