php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #68237 Getting tons of error when trying to compile for Mac OS X
Submitted: 2014-10-15 17:11 UTC Modified: 2016-08-21 04:22 UTC
From: jfha73 at gmail dot com Assigned: cmb (profile)
Status: No Feedback Package: Compile Failure
PHP Version: 5.6.1 OS: Mac OS X 10.9
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2014-10-15 17:11 UTC] jfha73 at gmail dot com
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

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-08-12 12:36 UTC] cmb@php.net
-Status: Open +Status: Feedback -Assigned To: +Assigned To: cmb
 [2016-08-12 12:36 UTC] cmb@php.net
Is that still an issue with recent PHP 5.6 versions?
 [2016-08-21 04:22 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat May 18 12:01:32 2024 UTC