# Compile fails on OSX 10.3

- Thread: https://externals.io/message/4093
- Original archive: https://news-web.php.net/php.internals/4093
- Started by nucleuz on 2003-08-19T14:38:47+00:00
- Messages: 4
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · RFCs at https://externals.io/rfc.md · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #4093 — nucleuz — 2003-08-19T14:38:47+00:00

URL: https://externals.io/message/4093#4093

Hi!
I'm running OSX 10.3 ( Panther ) and the snaps fails to compile.
I got the Panther seed at the WWDC earlier this year, and there are 
newer seeds out, but I don't have that
yet so I don't know if it will compile on that one.

( My C skills are rather limited, but here is what I have trying to 
find out what happened )

Initially 'make' created the following output:
/php/php.net/php5-200308061330/ext/standard/dns.c: In function 
`zif_dns_check_record':
/php/php.net/php5-200308061330/ext/standard/dns.c:227: error: `T_MX' 
undeclared (first use in this function)
/php/php.net/php5-200308061330/ext/standard/dns.c:227: error: (Each 
undeclared identifier is reported only once
/php/php.net/php5-200308061330/ext/standard/dns.c:227: error: for each 
function it appears in.)
/php/php.net/php5-200308061330/ext/standard/dns.c:238: error: `T_A' 
undeclared (first use in this function)
/php/php.net/php5-200308061330/ext/standard/dns.c:239: error: `T_NS' 
undeclared (first use in this function)
/php/php.net/php5-200308061330/ext/standard/dns.c:241: error: `T_PTR' 
undeclared (first use in this function)
/php/php.net/php5-200308061330/ext/standard/dns.c:242: error: `T_ANY' 
undeclared (first use in this function)
/php/php.net/php5-200308061330/ext/standard/dns.c:243: error: `T_SOA' 
undeclared (first use in this function)
/php/php.net/php5-200308061330/ext/standard/dns.c:244: error: `T_CNAME' 
undeclared (first use in this function)
/php/php.net/php5-200308061330/ext/standard/dns.c:264: error: `C_IN' 
undeclared (first use in this function)
/php/php.net/php5-200308061330/ext/standard/dns.c: In function 
`zif_dns_get_mx':
/php/php.net/php5-200308061330/ext/standard/dns.c:717: error: `HEADER' 
undeclared (first use in this function)
/php/php.net/php5-200308061330/ext/standard/dns.c:717: error: `hp' 
undeclared (first use in this function)
/php/php.net/php5-200308061330/ext/standard/dns.c:746: error: `C_IN' 
undeclared (first use in this function)
/php/php.net/php5-200308061330/ext/standard/dns.c:746: error: `T_MX' 
undeclared (first use in this function)
/php/php.net/php5-200308061330/ext/standard/dns.c:753: error: parse 
error before ')' token
/php/php.net/php5-200308061330/ext/standard/dns.c:754: error: 
`HFIXEDSZ' undeclared (first use in this function)
/php/php.net/php5-200308061330/ext/standard/dns.c:756: error: 
`QFIXEDSZ' undeclared (first use in this function)

I then did a grep for T_MX and found this in 'nameser8_comap.h'
When doing
#include <nameser8_compat.h>
in ext/standard/dns.c
the above error goes away, but now I get:

ld: Undefined symbols:
_res_9_dn_expand
_res_9_dn_skipname
_res_9_search
_php_ob_gzhandler_check

doing a grep for one of those gives me:
[nucleuz:/php/php.net/php5-200308061330] nucleuz% grep -d recurse 
_res_9_dn_expand ext/
Binary file ext/standard/dns.o matches

I don't know how to fix this last error, so does anyone have an idea on 
what I can do to make it compile?

-------------------------
--- Håvard Eide ---
www.eide.org
www.phpvolcano.com

---

## #4094 — Dan Kalowsky — 2003-08-19T20:12:27+00:00

URL: https://externals.io/message/4093#4094 · In reply to: #4093

You're doing something wrong then, as it has worked for others.  A 
configure line would help to debug this.





> Hi!
> I'm running OSX 10.3 ( Panther ) and the snaps fails to compile.
> I got the Panther seed at the WWDC earlier this year, and there are 
> newer seeds out, but I don't have that
> yet so I don't know if it will compile on that one.
>
> ( My C skills are rather limited, but here is what I have trying to 
> find out what happened )
>
> Initially 'make' created the following output:
> /php/php.net/php5-200308061330/ext/standard/dns.c: In function 
> `zif_dns_check_record':
> /php/php.net/php5-200308061330/ext/standard/dns.c:227: error: `T_MX' 
> undeclared (first use in this function)
> /php/php.net/php5-200308061330/ext/standard/dns.c:227: error: (Each 
> undeclared identifier is reported only once
> /php/php.net/php5-200308061330/ext/standard/dns.c:227: error: for each 
> function it appears in.)
> /php/php.net/php5-200308061330/ext/standard/dns.c:238: error: `T_A' 
> undeclared (first use in this function)
> /php/php.net/php5-200308061330/ext/standard/dns.c:239: error: `T_NS' 
> undeclared (first use in this function)
> /php/php.net/php5-200308061330/ext/standard/dns.c:241: error: `T_PTR' 
> undeclared (first use in this function)
> /php/php.net/php5-200308061330/ext/standard/dns.c:242: error: `T_ANY' 
> undeclared (first use in this function)
> /php/php.net/php5-200308061330/ext/standard/dns.c:243: error: `T_SOA' 
> undeclared (first use in this function)
> /php/php.net/php5-200308061330/ext/standard/dns.c:244: error: 
> `T_CNAME' undeclared (first use in this function)
> /php/php.net/php5-200308061330/ext/standard/dns.c:264: error: `C_IN' 
> undeclared (first use in this function)
> /php/php.net/php5-200308061330/ext/standard/dns.c: In function 
> `zif_dns_get_mx':
> /php/php.net/php5-200308061330/ext/standard/dns.c:717: error: `HEADER' 
> undeclared (first use in this function)
> /php/php.net/php5-200308061330/ext/standard/dns.c:717: error: `hp' 
> undeclared (first use in this function)
> /php/php.net/php5-200308061330/ext/standard/dns.c:746: error: `C_IN' 
> undeclared (first use in this function)
> /php/php.net/php5-200308061330/ext/standard/dns.c:746: error: `T_MX' 
> undeclared (first use in this function)
> /php/php.net/php5-200308061330/ext/standard/dns.c:753: error: parse 
> error before ')' token
> /php/php.net/php5-200308061330/ext/standard/dns.c:754: error: 
> `HFIXEDSZ' undeclared (first use in this function)
> /php/php.net/php5-200308061330/ext/standard/dns.c:756: error: 
> `QFIXEDSZ' undeclared (first use in this function)
>
> I then did a grep for T_MX and found this in 'nameser8_comap.h'
> When doing
> #include <nameser8_compat.h>
> in ext/standard/dns.c
> the above error goes away, but now I get:
>
> ld: Undefined symbols:
> _res_9_dn_expand
> _res_9_dn_skipname
> _res_9_search
> _php_ob_gzhandler_check
>
> doing a grep for one of those gives me:
> [nucleuz:/php/php.net/php5-200308061330] nucleuz% grep -d recurse 
> _res_9_dn_expand ext/
> Binary file ext/standard/dns.o matches
>
> I don't know how to fix this last error, so does anyone have an idea 
> on what I can do to make it compile?
>
> -------------------------
> --- Håvard Eide ---
> www.eide.org
> www.phpvolcano.com
>
>
> -- 
> 
> 
>
>
 >---------------------------------------------------------------<
Dan Kalowsky                    "The future is always uncertain,
http://www.deadmime.org/~dank    and the end is always near."
dank-nom@aps-deadmime.org        - "Roadhouse Blues",
kalowsky@php.net                          The Doors

---

## #4137 — Melvyn Sopacua — 2003-08-22T22:24:09+00:00

URL: https://externals.io/message/4093#4137 · In reply to: #4093

Hi,

firstly: 10.3 is still beta, AFAIK.
So, they might wise up.



> I then did a grep for T_MX and found this in 'nameser8_comap.h'
> When doing
> #include <nameser8_compat.h>

Apparently OSX has imported Bind9 into the main source and decided to do their 
own thing. The official bind9 sourcetree contains:
find . -name "*.h" -print | xargs /usr/local/bin/pcregrep '#define\s+T_MX'
./lib/bind/include/arpa/nameser_compat.h:#define T_MX           ns_t_mx

find . -name "*.h" -print | xargs /usr/local/bin/pcregrep 
'#include\s+.arpa/nameser_compat.h'
./lib/bind/include/arpa/nameser.h:#include <arpa/nameser_compat.h>

ext/standard/dns.c includes arpa/nameser.h if HAVE_ARPA_NAMESER_H is defined. 
Can you check config.h for this?

(By the way: the win32 version tests for HAVE_ARPA_NAMESERV <-- the 'v' here - 
is that a typo?)

--
Melvyn

---

## #4139 — Jani Taskinen — 2003-08-23T01:24:20+00:00

URL: https://externals.io/message/4093#4139 · In reply to: #4137

>ext/standard/dns.c includes arpa/nameser.h if HAVE_ARPA_NAMESER_H is defined. 
>Can you check config.h for this?
>
>(By the way: the win32 version tests for HAVE_ARPA_NAMESERV <-- the 'v' here - 
>is that a typo?)

-----------8<-------------:dns.c
#if HAVE_ARPA_NAMESERV_H
#include "arpa/nameser.h"
#endif
----------->8-------------:dns.c

    Yes, I would guess it's a typo. :)

    --Jani
