php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #51706 Make fails dns.c:305: error: expected specifier-qualifier-list before ‘HEADER'
Submitted: 2010-04-30 15:47 UTC Modified: 2010-06-08 14:00 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:0 of 1 (0.0%)
From: keith at take88 dot com Assigned:
Status: Not a bug Package: Compile Failure
PHP Version: 5.3.2 OS: Mac OS X 10.6.3
Private report: No CVE-ID: None
 [2010-04-30 15:47 UTC] keith at take88 dot com
Description:
------------
Here's the error when running 'make'
/Users/keith/php/php-5.3.2/ext/standard/dns.c:305: error: expected specifier-qualifier-list before ‘HEADER’
/Users/keith/php/php-5.3.2/ext/standard/dns.c: In function ‘zif_dns_check_record’:
/Users/keith/php/php-5.3.2/ext/standard/dns.c:340: error: ‘T_MX’ undeclared (first use in this function)
/Users/keith/php/php-5.3.2/ext/standard/dns.c:340: error: (Each undeclared identifier is reported only once
/Users/keith/php/php-5.3.2/ext/standard/dns.c:340: error: for each function it appears in.)
/Users/keith/php/php-5.3.2/ext/standard/dns.c:360: error: ‘T_A’ undeclared (first use in this function)
/Users/keith/php/php-5.3.2/ext/standard/dns.c:393: error: ‘C_IN’ undeclared (first use in this function)
/Users/keith/php/php-5.3.2/ext/standard/dns.c: In function ‘php_parserr’:
/Users/keith/php/php-5.3.2/ext/standard/dns.c:418: error: ‘querybuf’ has no member named ‘qb2’
/Users/keith/php/php-5.3.2/ext/standard/dns.c:418: error: ‘querybuf’ has no member named ‘qb2’
/Users/keith/php/php-5.3.2/ext/standard/dns.c:428: error: ‘T_ANY’ undeclared (first use in this function)
/Users/keith/php/php-5.3.2/ext/standard/dns.c:468: error: ‘querybuf’ has no member named ‘qb2’
/Users/keith/php/php-5.3.2/ext/standard/dns.c:468: error: ‘querybuf’ has no member named ‘qb2’
/Users/keith/php/php-5.3.2/ext/standard/dns.c:513: error: ‘querybuf’ has no member named ‘qb2’
/Users/keith/php/php-5.3.2/ext/standard/dns.c:513: error: ‘querybuf’ has no member named ‘qb2’
/Users/keith/php/php-5.3.2/ext/standard/dns.c:519: error: ‘querybuf’ has no member named ‘qb2’
/Users/keith/php/php-5.3.2/ext/standard/dns.c:519: error: ‘querybuf’ has no member named ‘qb2’
/Users/keith/php/php-5.3.2/ext/standard/dns.c:636: error: ‘querybuf’ has no member named ‘qb2’
/Users/keith/php/php-5.3.2/ext/standard/dns.c:636: error: ‘querybuf’ has no member named ‘qb2’
/Users/keith/php/php-5.3.2/ext/standard/dns.c:652: error: ‘querybuf’ has no member named ‘qb2’
/Users/keith/php/php-5.3.2/ext/standard/dns.c:652: error: ‘querybuf’ has no member named ‘qb2’
/Users/keith/php/php-5.3.2/ext/standard/dns.c:674: error: ‘querybuf’ has no member named ‘qb2’
/Users/keith/php/php-5.3.2/ext/standard/dns.c:674: error: ‘querybuf’ has no member named ‘qb2’
/Users/keith/php/php-5.3.2/ext/standard/dns.c: In function ‘zif_dns_get_record’:
/Users/keith/php/php-5.3.2/ext/standard/dns.c:710: error: ‘HEADER’ undeclared (first use in this function)
/Users/keith/php/php-5.3.2/ext/standard/dns.c:710: error: ‘hp’ undeclared (first use in this function)
/Users/keith/php/php-5.3.2/ext/standard/dns.c:810: error: ‘C_IN’ undeclared (first use in this function)
/Users/keith/php/php-5.3.2/ext/standard/dns.c:810: error: ‘querybuf’ has no member named ‘qb2’
/Users/keith/php/php-5.3.2/ext/standard/dns.c:817: error: ‘querybuf’ has no member named ‘qb2’
/Users/keith/php/php-5.3.2/ext/standard/dns.c:818: error: ‘querybuf’ has no member named ‘qb2’
/Users/keith/php/php-5.3.2/ext/standard/dns.c:819: error: expected expression before ‘)’ token
/Users/keith/php/php-5.3.2/ext/standard/dns.c: In function ‘zif_dns_get_mx’:
/Users/keith/php/php-5.3.2/ext/standard/dns.c:889: error: ‘HEADER’ undeclared (first use in this function)
/Users/keith/php/php-5.3.2/ext/standard/dns.c:889: error: ‘hp’ undeclared (first use in this function)
/Users/keith/php/php-5.3.2/ext/standard/dns.c:927: error: ‘C_IN’ undeclared (first use in this function)
/Users/keith/php/php-5.3.2/ext/standard/dns.c:934: error: expected expression before ‘)’ token
make: *** [ext/standard/dns.lo] Error 1

Test script:
---------------
Here's my configure commands ...

http://66.180.173.53/install-sh

Expected result:
----------------
I expect PHP 5.3.2 to compile.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-05-01 22:36 UTC] kalle@php.net
+Summary: Make fails dns.c:305: error: expected specifier-qualifier-list before ‘HEADER� -Status: Open +Status: Assigned -Assigned To: +Assigned To: scottmac
 [2010-05-01 22:36 UTC] kalle@php.net
Scott, I remember you fixed some portability issues for the DNS functions, namely on MAC could you look into this?
 [2010-05-01 22:41 UTC] scottmac@php.net
+Summary: Make fails dns.c:305: error: expected specifier-qualifier-list before ‘HEADER� -Assigned To: scottmac +Assigned To: jani
 [2010-05-01 22:41 UTC] scottmac@php.net
Jani made the last changes to these :)
 [2010-05-04 11:14 UTC] david dot zuelke at bitextender dot com
Can't reproduce here... building from fresh SVN checkout of PHP_5_3 on a new 
install 
of Mac OS X 10.6.3.

Both with
  ./configure --disable-all
and
  MACOSX_DEPLOYMENT_TARGET=10.6.3 CFLAGS="-arch x86_64 -g -Os -pipe -no-cpp-
precomp" 
CCFLAGS="-arch x86_64 -g -Os -pipe" CXXFLAGS="-arch x86_64 -g -Os -pipe" 
LDFLAGS="-
arch x86_64 -bind_at_load -L/usr/local/lib/ -liconv" ./configure --disable-all
it builds just fine,
  make test
shows nothing unusual (http://pastie.org/944860), gethostbyname() etc work.

Maybe it's some sort of library conflict on your system? Or your checkout is 
borked? 
Undeclared identifiers sound fishy; T_MX etc are defined outside of PHP.
 [2010-05-04 12:25 UTC] jani@php.net
+Summary: Make fails dns.c:305: error: expected specifier-qualifier-list before ‘HEADER� -Status: Assigned +Status: Open
 [2010-05-04 12:26 UTC] jani@php.net
+Summary: Make fails dns.c:305: error: expected specifier-qualifier-list before ‘HEADER' -Status: Assigned +Status: Open -Assigned To: jani +Assigned To:
 [2010-05-04 15:47 UTC] keith at take88 dot com
I'm trying to build PHP from source using a fresh install of Snow Leopard. No fink. No Macports.

When I try an SVN install I get other problems.
 [2010-05-04 16:18 UTC] rasmus@php.net
Works fine for me on Leopard here as well.  Both 5.3.2 and SVN.
 [2010-05-04 17:12 UTC] keith at take88 dot com
Wait a second. I'm seeing this when I run ./configure

checking build system type... Invalid configuration `/usr': machine `/usr' not recognized

That's the --prefix=/usr part of my ./configure script. 

That sounds like it could be screwing up my dns host stuff.

Any ideas?
 [2010-05-17 20:14 UTC] keith at take88 dot com
So anyone have any clues about this bug? It sure would be nice if I could get this to work.
 [2010-06-08 13:29 UTC] tony2001@php.net
-Status: Open +Status: Bogus
 [2010-06-08 13:29 UTC] tony2001@php.net
Apparently this is not a PHP problem, so it's unlikely we can help you and no point to keep the report open.
 [2010-06-08 13:55 UTC] keith at take88 dot com
What a joke. Maybe it's a documentation bug? But it sure seems like a bug to me. A fresh install of OS X and PHP doesn't compile.

Oh well, it's a good thing I'm moving away from PHP as my primary language. It's been 13 years anyways.
 [2010-06-08 14:00 UTC] pajoye@php.net
Move away from mac would help. It builds just fine on any single platform we use and you are also the only one to experience this issue.
 [2010-06-08 14:00 UTC] david dot zuelke at bitextender dot com
Keith, the bug tracker is not a support forum. And it works fine for me and other 
people. If you are unable to realize either of these facts and decide to start 
bitching about it, then I guess it's a good thing you're moving away from PHP.

If you ever change your mind, there are plenty of helpful people on the PHP 
mailing lists and various IRC channels (try #phpc on freenode) who will be happy 
to assist you.
 [2010-06-08 14:07 UTC] keith at take88 dot com
Roger that.

Thanks for all your help.
 [2010-07-04 14:49 UTC] ktulur at gmail dot com
Same problem here trying to crosscompile php for android (using bionic instead of 
libc).

Thanks in advance
 [2010-07-04 20:07 UTC] ktulur at gmail dot com
It doesn't seem a PHP bug in my case either, bionic hides a few dns related definitions into the private folder.
 [2010-07-05 21:01 UTC] keith at take88 dot com
I just think that if there are issues with compiling PHP on Mac OS X (clean install) and now Android, something's happening here. I've Googled this problem, and other people are having it too, but no solutions.

I'm moving away from PHP for my future development projects, so I don't really care, but perhaps there's a need for some documentation updates or something?

I mean someone who has been using and compiling PHP since 1997, shouldn't be having this problem - unsolvable one anyways. I realize that this is probably a Mac OS X "problem," but it also should be something that the PHP crew should and could fix - even if it's with updated documentation. That is of course if the PHP community cares about PHP running on Mac OS X, which it may not and that's fine, but it should be stated somewhere if that's the case.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu May 02 14:01:34 2024 UTC