Bug #68237 [NEW]: Getting tons of error when trying to compile for Mac OS X

From: Date: Wed, 15 Oct 2014 17:11:40 +0000
Subject: Bug #68237 [NEW]: Getting tons of error when trying to compile for Mac OS X
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-188118@lists.php.net to get a copy of this message
From: jfha73 at gmail dot com Operating system: Mac OS X 10.9 PHP version: 5.6.1 Package: Compile Failure Bug Type: Bug Bug description:Getting tons of error when trying to compile for Mac OS X Description: ------------ I'm getting the following when trying to compile: /Users/username/Downloads/php-5.6.1/ext/standard/dns.c:315:2: error: unknown type name 'HEADER' HEADER qb1; ^ /Users/username/Downloads/php-5.6.1/ext/standard/dns.c:350:13: error: use of undeclared identifier 'T_MX' int type = T_MX, i; ^ /Users/username/Downloads/php-5.6.1/ext/standard/dns.c:370:45: error: use of undeclared identifier 'T_A' if (!strcasecmp("A", rectype)) type = T_A; ^ /Users/username/Downloads/php-5.6.1/ext/standard/dns.c:403:39: error: use of undeclared identifier 'C_IN' i = php_dns_search(handle, hostname, C_IN, type, ans, sizeof(ans)); ^ ext/standard/php_dns.h:28:35: note: expanded from macro 'php_dns_search' ((int)dns_search(res, dname, class, type, answer, anslen, (struc... ^ /Users/username/Downloads/php-5.6.1/ext/standard/dns.c:441:2: warning: implicit declaration of function 'GETSHORT' is invalid in C99 [-Wimplicit-function-declaration] GETSHORT(type, cp); ^ /Users/username/Downloads/php-5.6.1/ext/standard/dns.c:443:2: warning: implicit declaration of function 'GETLONG' is invalid in C99 [-Wimplicit-function-declaration] GETLONG(ttl, cp); ^ /Users/username/Downloads/php-5.6.1/ext/standard/dns.c:446:23: error: use of undeclared identifier 'T_ANY' if (type_to_fetch != T_ANY && type != type_to_fetch) { ^ /Users/username/Downloads/php-5.6.1/ext/standard/dns.c:540:39: warning: passing 'u_char *' (aka 'unsigned char *') to parameter of type 'const char *' converts between pointers to integer types with different sign [-Wpointer-sign] ...add_next_index_stringl(entries, cp + l1 + 1, n, 1); ^~~~~~~~~~~ /Users/username/Downloads/php-5.6.1/Zend/zend_API.h:418:60: note: passing argument to parameter 'str' here ZEND_API int add_next_index_stringl(zval *arg, const char *str, uint len... ^ /Users/username/Downloads/php-5.6.1/ext/standard/dns.c:548:41: warning: passing 'u_char *' (aka 'unsigned char *') to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign] add_assoc_stringl(*subarray, "txt", tp, l2, 0); ^~ /Users/username/Downloads/php-5.6.1/Zend/zend_API.h:394:123: note: expanded from macro 'add_assoc_stringl' ...__duplicate) add_assoc_stringl_ex(__arg, __key, strlen(__key)+1, __str, ... ^ /Users/username/Downloads/php-5.6.1/Zend/zend_API.h:385:83: note: passing argument to parameter 'str' here ...*arg, const char *key, uint key_len, char *str, uint length, int duplica... ^ /Users/username/Downloads/php-5.6.1/ext/standard/dns.c:769:2: error: use of undeclared identifier 'HEADER' HEADER *hp; ^ /Users/username/Downloads/php-5.6.1/ext/standard/dns.c:769:10: error: use of undeclared identifier 'hp' HEADER *hp; ^ /Users/username/Downloads/php-5.6.1/ext/standard/dns.c:896:41: error: use of undeclared identifier 'C_IN' n = php_dns_search(handle, hostname, C_IN, type_... ^ ext/standard/php_dns.h:28:35: note: expanded from macro 'php_dns_search' ((int)dns_search(res, dname, class, type, answer, anslen, (struc... ^ /Users/username/Downloads/php-5.6.1/ext/standard/dns.c:905:4: error: use of undeclared identifier 'hp' hp = (HEADER *)&answer; ^ /Users/username/Downloads/php-5.6.1/ext/standard/dns.c:905:10: error: use of undeclared identifier 'HEADER' hp = (HEADER *)&answer; ^ /Users/username/Downloads/php-5.6.1/ext/standard/dns.c:905:18: error: expected expression hp = (HEADER *)&answer; ^ /Users/username/Downloads/php-5.6.1/ext/standard/dns.c:906:15: error: use of undeclared identifier 'hp' qd = ntohs(hp->qdcount); ^ /usr/include/sys/_endian.h:126:39: note: expanded from macro 'ntohs' #define ntohs(x) __DARWIN_OSSwapInt16(x) ^ /usr/include/libkern/_OSByteOrder.h:72:40: note: expanded from macro '__DARWIN_OSSwapInt16' ((__uint16_t)(__builtin_constant_p(x) ? __DARWIN_OSSwapConstInt16(x... ^ /Users/username/Downloads/php-5.6.1/ext/standard/dns.c:906:15: error: use of undeclared identifier 'hp' /usr/include/sys/_endian.h:126:39: note: expanded from macro 'ntohs' #define ntohs(x) __DARWIN_OSSwapInt16(x) ^ /usr/include/libkern/_OSByteOrder.h:72:71: note: expanded from macro '__DARWIN_OSSwapInt16' ((__uint16_t)(__builtin_constant_p(x) ? __DARWIN_OSSwapConstInt16(x) : _... ^ /usr/include/libkern/_OSByteOrder.h:44:34: note: expanded from macro '__DARWIN_OSSwapConstInt16' ((__uint16_t)((((__uint16_t)(x) & 0xff00) >> 8) | \ ^ /Users/username/Downloads/php-5.6.1/ext/standard/dns.c:906:15: error: use of undeclared identifier 'hp' /usr/include/sys/_endian.h:126:39: note: expanded from macro 'ntohs' #define ntohs(x) __DARWIN_OSSwapInt16(x) ^ /usr/include/libkern/_OSByteOrder.h:72:71: note: expanded from macro '__DARWIN_OSSwapInt16' ((__uint16_t)(__builtin_constant_p(x) ? __DARWIN_OSSwapConstInt16(x) : _... ^ /usr/include/libkern/_OSByteOrder.h:45:32: note: expanded from macro '__DARWIN_OSSwapConstInt16' (((__uint16_t)(x) & 0x00ff) << 8))) ^ /Users/username/Downloads/php-5.6.1/ext/standard/dns.c:906:15: error: use of undeclared identifier 'hp' /usr/include/sys/_endian.h:126:39: note: expanded from macro 'ntohs' #define ntohs(x) __DARWIN_OSSwapInt16(x) ^ /usr/include/libkern/_OSByteOrder.h:72:89: note: expanded from macro '__DARWIN_OSSwapInt16' ...? __DARWIN_OSSwapConstInt16(x) : _OSSwapInt16(x))) ^ /Users/username/Downloads/php-5.6.1/ext/standard/dns.c:907:15: error: use of undeclared identifier 'hp' an = ntohs(hp->ancount); ^ /usr/include/sys/_endian.h:126:39: note: expanded from macro 'ntohs' #define ntohs(x) __DARWIN_OSSwapInt16(x) ^ /usr/include/libkern/_OSByteOrder.h:72:40: note: expanded from macro '__DARWIN_OSSwapInt16' ((__uint16_t)(__builtin_constant_p(x) ? __DARWIN_OSSwapConstInt16(x... ^ /Users/username/Downloads/php-5.6.1/ext/standard/dns.c:907:15: error: use of undeclared identifier 'hp' /usr/include/sys/_endian.h:126:39: note: expanded from macro 'ntohs' #define ntohs(x) __DARWIN_OSSwapInt16(x) ^ /usr/include/libkern/_OSByteOrder.h:72:71: note: expanded from macro '__DARWIN_OSSwapInt16' ((__uint16_t)(__builtin_constant_p(x) ? __DARWIN_OSSwapConstInt16(x) : _... ^ /usr/include/libkern/_OSByteOrder.h:44:34: note: expanded from macro '__DARWIN_OSSwapConstInt16' ((__uint16_t)((((__uint16_t)(x) & 0xff00) >> 8) | \ ^ /Users/username/Downloads/php-5.6.1/ext/standard/dns.c:907:15: error: use of undeclared identifier 'hp' /usr/include/sys/_endian.h:126:39: note: expanded from macro 'ntohs' #define ntohs(x) __DARWIN_OSSwapInt16(x) ^ /usr/include/libkern/_OSByteOrder.h:72:71: note: expanded from macro '__DARWIN_OSSwapInt16' ((__uint16_t)(__builtin_constant_p(x) ? __DARWIN_OSSwapConstInt16(x) : _... ^ /usr/include/libkern/_OSByteOrder.h:45:32: note: expanded from macro '__DARWIN_OSSwapConstInt16' (((__uint16_t)(x) & 0x00ff) << 8))) ^ /Users/username/Downloads/php-5.6.1/ext/standard/dns.c:907:15: error: use of undeclared identifier 'hp' /usr/include/sys/_endian.h:126:39: note: expanded from macro 'ntohs' #define ntohs(x) __DARWIN_OSSwapInt16(x) ^ /usr/include/libkern/_OSByteOrder.h:72:89: note: expanded from macro '__DARWIN_OSSwapInt16' ...? __DARWIN_OSSwapConstInt16(x) : _OSSwapInt16(x))) ^ fatal error: too many errors emitted, stopping now [-ferror-limit=] 4 warnings and 20 errors generated. make: *** [ext/standard/dns.lo] Error 1 Test script: --------------- ./configure --prefix=/usr --with-libdir=lib --with-apxs2=/usr/sbin/apxs --with-config-file-path=/etc/php5/apache2/ --with-config-file-scan-dir=/etc/php5/conf.d --with-regex=shared --with-openssl --with-kerberos --with-zlib=shared --enable-bcmath=shared --with-bz2=shared --enable-calendar --with-curl=shared --enable-dba --with-enchant=shared --enable-exif=shared --enable-ftp=shared --with-gd=shared --with-gettext=shared --with-gmp=shared --with-mhash=shared --with-imap=shared --with-imap-ssl --enable-intl=shared --with-ldap=shared --enable-mbstring=shared --with-mcrypt=shared --with-mysql=shared --with-mysqli=shared --enable-opcache=shared --with-pdo-mysql=shared --with-pdo-pgsql=shared --with-pgsql=shared --enable-shmop=shared --with-snmp=shared --enable-soap=shared --enable-sockets=shared --with-tidy=shared --enable-wddx=shared --with-xmlrpc=shared --with-xsl=shared --enable-zip=shared --with-libzip=shared --with-pear=shared --build=x86_64 Expected result: ---------------- compile Actual result: -------------- errors -- Edit bug report at https://bugs.php.net/bug.php?id=68237&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=68237&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=68237&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=68237&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=68237&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=68237&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=68237&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=68237&r=needscript Try newer version: https://bugs.php.net/fix.php?id=68237&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=68237&r=support Expected behavior: https://bugs.php.net/fix.php?id=68237&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=68237&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=68237&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=68237&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=68237&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=68237&r=dst IIS Stability: https://bugs.php.net/fix.php?id=68237&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=68237&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=68237&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=68237&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=68237&r=mysqlcfg

« previous php.bugs (#188118) next »