Subject: Re: gertting error T_NAPTR undeclared

Re: gertting error T_NAPTR undeclared

From: Vivek Katakam <vivek1717_at_gmail.com>
Date: Sun, 12 Jul 2009 13:44:55 +0530

Hi Daniel,
Thanks. I got the compilation.

Thanks and Regards,
Vivek

> Please don't top-post. It confuses me greatly.
>
> In the following compilation,
> gcc -DHAVE_CONFIG_H -I. -g -O2 -MT adig.o -MD -MP -MF
> ".deps/adig.Tpo" -c -o adig.o adig.c
>
> If your problem is only in the adig compile you can safely ignore that. It's
> just a demo/example _using_ c-ares that isn't necessary for c-ares to work.
>
> --

>> Hi Daniel,
>> In the following compilation,
>> gcc -DHAVE_CONFIG_H -I. -g -O2 -MT adig.o -MD -MP -MF
>> ".deps/adig.Tpo" -c -o adig.o adig.c

>> To check this, i have temporaily renamed the file
>> /usr/include/arpa/onameser_compat.h as
>> /usr/include/arpa/onameser_compat .This time i got this error:

>> In file included from adig.c:29:
>> /usr/include/arpa/nameser.h:645:34: arpa/onameser_compat.h: No such
>> file or directory

>> The following are the lines in the /usr/include/arpa/nameser.h:
>> +640 #ifdef _USE_IRS
>> +641 #ifdef BIND_4_COMPAT
> > +642 #include <arpa/nameser_compat.h>
>> +643 #endif /* BIND_4_COMPAT */
>> +644 #else /* _USE_IRS */
>> +645 #include <arpa/onameser_compat.h>
>> +646 #endif /* _USE_IRS */
>> +647
>> +648 #endif /* !_ARPA_NAMESER_H_ */

>> Thanks and Regards,
>> Vivek

On Mon, Jul 6, 2009 at 2:56 AM, Daniel Stenberg<daniel_at_haxx.se> wrote:
>> On Mon, 6 Jul 2009, Vivek Katakam wrote:
>>
>> I checked config.log and the error is in :
>>
>> /usr/include/arpa/nameser_compat.h:244: error: conflicting types for
>> `HEADER'
>> /usr/include/arpa/onameser_compat.h:265: error: previous declaration of
>> `HEADER'
>>
>> But how come the latter header file is included? We only explicitly include
>> the first one so I figure the second one is a mistake/oversight/bug.
>>
>> --
>>
>> / daniel.haxx.se
>>

>>> Hi All,
>>> I have configured c-ares for AIX 52 with the following option:
>>> ./configure --enable-static=yes

>>> But when I ran make I got the following error:

>>> if gcc -DHAVE_CONFIG_H -I. -I. -g -O2 -MT adig.o -MD -MP
>>> -MF ".deps/adig.Tpo" -c -o adig.o adig.c; then mv -f >> ".deps/adig.Tpo"
>>> ".deps/adig.Po"; else rm -f ".deps/adig.Tpo"; exit 1; fi
>>> adig.c:119: error: `T_NAPTR' undeclared here (not in a function)
>>> adig.c:119: error: initializer element is not constant
>>> adig.c:119: error: (near initialization for `types[33].value')
>>> adig.c:119: error: initializer element is not constant
>>> adig.c:119: error: (near initialization for `types[33]')
>>> adig.c:120: error: initializer element is not constant
>>> adig.c:120: error: (near initialization for `types[34]')
>>> adig.c: In function `display_rr':
>>> adig.c:615: error: `T_NAPTR' undeclared (first use in this function)
>>> adig.c:615: error: (Each undeclared identifier is reported only once
>>> adig.c:615: error: for each function it appears in.)
>>> make: 1254-004 The error code from the last command is 1.

>>> I checked config.log and the error is in :

>>> /usr/include/arpa/nameser_compat.h:244: error: conflicting types for `HEADER'
>>> /usr/include/arpa/onameser_compat.h:265: error: previous declaration of `HEADER'

>>> I am using gcc 3.3.2
>>> bash-3.00# gcc -v
>>> Reading specs from >> /opt/freeware/lib/gcc-lib/powerpc-ibm-aix5.2.0.0/3.3.2/specs
>>> Configured with: ../configure --with-as=/usr/bin/as
>>> --with-ld=/usr/bin/ld --disable-nls --enable-languages=c,c++
>>> --prefix=/opt/freeware --enable-threads
>>> --enable-version-specific-runtime-libs --host=powerpc-ibm-aix5.2.0.0
>>> Thread model: aix
>>> gcc version 3.3.2

>>> Thanks and Regards,
>>> Vivek
Received on 2009-07-12