Re: [exim-dev] Second candidate for 4.52 release -- make fai…

Top Page
Delete this message
Reply to this message
Author: OpenMacNews
Date:  
To: Philip Hazel
CC: exim-dev
Subject: Re: [exim-dev] Second candidate for 4.52 release -- make failure on OSX 10.4.1
hi philip,

> That was an aside rather than a reason. The reason is that your system
> warns if a symbol in a program re-defines one in a library.


fair enuf.

>> cc dns.c
>> dns.c: In function 'dns_next_rr':
>> dns.c:171: error: 'HEADER' undeclared (first use in this function)
>
> HEADER is defined as a structure in /usr/include/arpa/nameser_compat.h
> on my box. This is included automatically from
> /usr/include/arpa/nameser.h. I cannot think of any way of fudging round
> this one.


in BOTH my /usr/include/arpa/nameser_compat.h &
/usr/include/arpa/nameser8_compat.h, there is, indeed, a HEADER struct def,
e.g.:

    typedef struct {
        unsigned    id :16;     /* query identification number */
    #if BYTE_ORDER == BIG_ENDIAN
                /* fields in third byte */
        unsigned    qr: 1;      /* response flag */
    ...
        unsigned    arcount :16;    /* number of resource entries */
    } HEADER;


checking, my /usr/include/arpa/nameser.h exists (as a link back to
../nameser.h):

    % ls -al /usr/include/arpa/nameser.h
        lrwxr-xr-x  1 root wheel 12 Jun  6 15:44 nameser.h -> ../nameser.h


in it, i find:

    ...
    #ifndef _NAMESER_9_H_
    #define _NAMESER_9_H_


    #ifdef BIND_8_COMPAT
    #include <arpa/nameser8_compat.h>
    #else


    #include <sys/param.h>
    #if (!defined(BSD)) || (BSD < 199306)
    ...


which should clearly be pulling in the HEADER struct from nameser8_compat.h
when BIND_8_COMPAT is defined.

revisiting; per Changelog ...

    Exim version 4.30
    -----------------
    ...
    27. Added -DBIND_8_COMPAT to the CLFAGS setting for Darwin.
    ...


and verifying that it IS defined:

    % grep BIND_8_COMPAT `grep -rln BIND_8_COMPAT .`
        ./build-Darwin-powerpc/Makefile:CFLAGS=-O -no-cpp-precomp 
-DBIND_8_COMPAT
        ./doc/ChangeLog:27. Added -DBIND_8_COMPAT to the CLFAGS setting for 
Darwin.
        ./OS/Makefile-Darwin:CFLAGS=-O -no-cpp-precomp -DBIND_8_COMPAT


>> dns.c:442: error: 'C_IN' undeclared (first use in this function)
>> dns.c: In function 'dns_special_lookup':
>> dns.c:754: error: 'HEADER' undeclared (first use in this function)
>> dns.c:754: error: 'h' undeclared (first use in this function)
>> dns.c:754: error: parse error before ')' token
>> dns.c:755: error: 'QUERY' undeclared (first use in this function)
>> dns.c:756: error: 'NOERROR' undeclared (first use in this function)
>> dns.c:756: error: 'NXDOMAIN' undeclared (first use in this function)
>> dns.c:764: error: 'T_SOA' undeclared (first use in this function)
>
> T_SOA was one I overlooked when I added the other T_xx thing defaults.
>
> But as I can't do the structure, you will have to find out whether there
> are any definitions of these things on your box. It is indeed the BIND 8
> compatibility issue. If there is a file that defines them, we might be
> able to sort this out.



let's see:

    ls -al ./build-Darwin-powerpc/dns.c
        lrwxr-xr-x  1 root wheel 12 Jun 28 10:22 ./build-Darwin-powerpc/dns.c 
-> ../src/dns.c


    % grep "nameser.h" ./src/dns.c
        (empty)


    % grep "include " ./src/dns.c
        #include "exim.h"


there's only one include of exim.h, where:

    % grep "nameser.h" ./src/exim.h
        #include <arpa/nameser.h>


arpa/nameser.h *is* included, afaik, outside of any conditional ...

so, i'm confused ... with BIND_8_COMPAT *defined*, why are we NOT seeing the
HEADER struct def?

trying some bruteforce tests ...

EDITing dns.c
          #include "exim.h"
   +++    #include "/usr//include/arpa/nameser_compat.h"


NOW, 'make' *continues* thru the 'missing' HEADER def, ad eventually fails w/:

    ...
    cc dns.c
    In file included from dns.c:13:
    /usr/include/arpa/nameser_compat.h:141:1: warning: "T_A" redefined
    In file included from dns.c:12:
    exim.h:287:1: warning: this is the location of the previous definition
    In file included from dns.c:13:
    /usr/include/arpa/nameser_compat.h:142:1: warning: "T_NS" redefined
    In file included from dns.c:12:
    exim.h:299:1: warning: this is the location of the previous definition
    In file included from dns.c:13:
    /usr/include/arpa/nameser_compat.h:145:1: warning: "T_CNAME" redefined
    In file included from dns.c:12:
    exim.h:291:1: warning: this is the location of the previous definition
    In file included from dns.c:13:
    /usr/include/arpa/nameser_compat.h:152:1: warning: "T_PTR" redefined
    In file included from dns.c:12:
    exim.h:303:1: warning: this is the location of the previous definition
    In file included from dns.c:13:
    /usr/include/arpa/nameser_compat.h:155:1: warning: "T_MX" redefined
    In file included from dns.c:12:
    exim.h:295:1: warning: this is the location of the previous definition
    In file included from dns.c:13:
    /usr/include/arpa/nameser_compat.h:156:1: warning: "T_TXT" redefined
    In file included from dns.c:12:
    exim.h:275:1: warning: this is the location of the previous definition
    In file included from dns.c:13:
    /usr/include/arpa/nameser_compat.h:168:1: warning: "T_AAAA" redefined
    In file included from dns.c:12:
    exim.h:264:1: warning: this is the location of the previous definition
    In file included from dns.c:13:
    /usr/include/arpa/nameser_compat.h:173:1: warning: "T_SRV" redefined
    In file included from dns.c:12:
    exim.h:279:1: warning: this is the location of the previous definition
    cc drtables.c
    cc enq.c
    cc exim.c
    ...
    srs.c:153: warning: pointer targets in passing argument 2 of 'srs_reverse'
    differ in signedness
    srs.c:164: warning: pointer targets in passing argument 1 of 'string_copy'
    differ in signedness
    ...
    cc dk.c


    awk '{ print ($1+1) }' cnumber.h > cnumber.temp
    rm -f cnumber.h; mv cnumber.temp cnumber.h
    cc version.c
    rm -f exim
    cc -o exim
    /usr/bin/ld: Undefined symbols:
    _GETSHORT
    _res_9_dn_expand
    _res_9_init
    _res_9_search
    _strnlen
    collect2: ld returned 1 exit status
    make[1]: *** [exim] Error 1
    make: *** [go] Error 2



richard