|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2009-05-18 17:54 UTC] jf at netmadeira dot com
Description:
------------
Cross compiling php for mipsel fails in 5.3 RC2 while in 5.2.9 compiles fine.
Configure went fine, fails when making with this error:
/wdtv/wip/php-5.3.0/php5.3-snap/ext/standard/basic_functions.c:3007: error: 'zif_dns_check_record' undeclared here (not in a function)
make: *** [ext/standard/basic_functions.lo] Error 1
Reproduce code:
---------------
./configure \
--target=mipsel-linux \
--host=mipsel-linux \
--build=i386 \
--prefix=${install} \
--bindir=${install}/bin \
--sbindir=${install}/bin \
--mandir=${install}/share/man \
--enable-sockets \
--with-config-file-path=${install0}/conf \
--without-pear \
--without-mysql \
--without-mysql \
--without-apxs \
--without-apxs2 \
--disable-cli \
--with-zlib=$wdtvpath \
--with-zlib-dir=$wdtvpath \
--enable-pdo=shared \
--with-pdo-sqlite=shared \
--with-sqlite=shared \
--with-sqlite3=shared \
--enable-sqlite-utf8 \
--with-libxml-dir=$wdtvpath \
--with-curl=$wdtvpath \
--enable-shared \
--enable-exif \
--with-gd=shared \
--with-jpeg-dir=$wdtvpath \
--with-png-dir=$wdtvpath \
--with-freetype-dir=$wdtvpath \
--with-openssl=$wdtvpath \
--with-openssl-dir=$wdtvpath \
--enable-gd-native-ttf \
--with-xsl=$wdtvpath \
--with-iconv=$wdtvpath \
--with-bz2=$wdtvpath \
--enable-calendar \
--with-ldap=$wdtvpath \
--enable-zip \
--with-readline=$wdtvpath \
--with-pcre-regex \
--enable-ftp \
--with-mcrypt=$wdtvpath \
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Dec 17 08:00:01 2025 UTC |
Ok, cvs is not the best help here, because for fix this bug I would need to study lots of code to now what is really breaking here, so, I'll point what I think its bad, and what I done to fix the error to myself!! The rules to define the PHP_FUNCTION(dns_check_record) are: header: dns.h #if defined(PHP_WIN32) || (HAVE_RES_SEARCH && !(defined(__BEOS__) || defined(NETWARE))) # if defined(PHP_WIN32) || (HAVE_DN_SKIPNAME && HAVE_DN_EXPAND) PHP_FUNCTION(dns_check_record); (...) function code: dns.c #if HAVE_RES_SEARCH && !(defined(__BEOS__)||defined(PHP_WIN32) || defined(NETWARE)) (...) PHP_FUNCTION(dns_check_record) { (...) Adding the function to php functions list: basic_functions.c #if defined(PHP_WIN32) || (HAVE_RES_SEARCH && !(defined(__BEOS__) || defined(NETWARE))) PHP_FE(dns_check_record,arginfo_dns_check_record) PHP_FALIAS(checkdnsrr,dns_check_record,arginfo_dns_check_record) #endif What I see is that in three cases, the rules are different in all, so sometimes the header can be defines and the function not, or like in mine, the function is defined but header not!! Clearly are some conflicts of rules here, but can't really tell what, without studing the code. What I made to fix for myself was: diff -u -p -r1.1.1.1 dns.h --- standard/dns.h 18 May 2009 21:39:19 -0000 1.1.1.1 +++ standard/dns.h 18 May 2009 22:14:09 -0000 @@ -49,9 +49,9 @@ PHP_FUNCTION(gethostname); #if defined(PHP_WIN32) || (HAVE_RES_SEARCH && !(defined(__BEOS__) || defined(NETWARE))) +PHP_FUNCTION(dns_check_record); # if defined(PHP_WIN32) || (HAVE_DN_SKIPNAME && HAVE_DN_EXPAND) PHP_FUNCTION(dns_get_mx); -PHP_FUNCTION(dns_check_record); # endif #if defined(PHP_WIN32) || HAVE_DNS_FUNCS Hope some developer could fix the mess with those rules...