ID: 25955
Updated by: [EMAIL PROTECTED]
Reported By: andreas at fink dot org
-Status: Open
+Status: Feedback
Bug Type: Compile Failure
Operating System: MacOS 10.3 (7B85)
PHP Version: 4.3.3, 5-200310221730
New Comment:
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)) {
Previous Comments:
------------------------------------------------------------------------
[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
------------------------------------------------------------------------
[2003-10-22 13:13:44] [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
funny, I think we just had this discusson on the
mailing lists. I believe marko or chregu have
submitted a patch to correct this. Try a cvs version.
Although I hope they also backported their fix to the
4.3 tree as well
------------------------------------------------------------------------
[2003-10-22 13:02:01] andreas at fink dot org
Description:
------------
I'm trying to compile php-4.3.3 the same way I did on many machines
before without any problem.
This time this is a brand new Apple G5 with MacOS 10.3 (Panther). In
comparison to all the other Mac's I've compiled before, this is the
first one which has 10.3 installed fresh and was not upgraded from
10.2.8
This problem doesnt seem to occur on a G5 which was installed with
10.2.8 and then upgraded to 10.3 for some freaky reason.
The 10.3 install runs Xcode and gcc-3.3 compiler
Reproduce code:
---------------
./configure --prefix=/usr --with-mysql=/usr --enable-track-vars
--with-sockets --enable-ftp --with-gd --with-png-dir=/usr
--with-jpeg-dir=/usr --with-zlib-dir=/usr --with-tiff-dir=/usr
--with-gd --with-apxs=/usr/sbin/apxs
make
Expected result:
----------------
compiles fine.
Actual result:
--------------
/development/php-4.3.3/ext/standard/dns.c: In function
`zif_checkdnsrr':
/development/php-4.3.3/ext/standard/dns.c:228: error: `T_MX' undeclared
(first use in this function)
/development/php-4.3.3/ext/standard/dns.c:228: error: (Each undeclared
identifier is reported only once
/development/php-4.3.3/ext/standard/dns.c:228: error: for each function
it appears in.)
/development/php-4.3.3/ext/standard/dns.c:239: error: `T_A' undeclared
(first use in this function)
/development/php-4.3.3/ext/standard/dns.c:240: error: `T_NS' undeclared
(first use in this function)
/development/php-4.3.3/ext/standard/dns.c:242: error: `T_PTR'
undeclared (first use in this function)
/development/php-4.3.3/ext/standard/dns.c:243: error: `T_ANY'
undeclared (first use in this function)
/development/php-4.3.3/ext/standard/dns.c:244: error: `T_SOA'
undeclared (first use in this function)
/development/php-4.3.3/ext/standard/dns.c:245: error: `T_CNAME'
undeclared (first use in this function)
/development/php-4.3.3/ext/standard/dns.c:256: error: `C_IN' undeclared
(first use in this function)
/development/php-4.3.3/ext/standard/dns.c: In function `zif_getmxrr':
/development/php-4.3.3/ext/standard/dns.c:288: error: `HEADER'
undeclared (first use in this function)
/development/php-4.3.3/ext/standard/dns.c:288: error: `hp' undeclared
(first use in this function)
/development/php-4.3.3/ext/standard/dns.c:317: error: `C_IN' undeclared
(first use in this function)
/development/php-4.3.3/ext/standard/dns.c:317: error: `T_MX' undeclared
(first use in this function)
/development/php-4.3.3/ext/standard/dns.c:324: error: parse error
before ')' token
Partial fix is to include "nameser8_compat.h" into ext/standard/dns.c
in the beginning. After that it compiles fine but fails at linking:
ld: Undefined symbols:
_res_9_dn_expand
_res_9_dn_skipname
_res_9_search
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=25955&edit=1