Operating System - HP-UX
1822020 Members
3644 Online
109639 Solutions
New Discussion юеВ

Re: asn1c-0.9.21 make problem

 
Chris Frangandonis
Regular Advisor

asn1c-0.9.21 make problem

2010-10-28 13:34:10 SAST
Hi All,


I have dowload the asn1c-0.9.21 tool from the internet and when performing a make on a HP server 11.11 ,getting the following error mesg

No suffix list.
make all-recursive
No suffix list.
Making all in libasn1parser
if /bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I.. -g -O2 -Wall -Wshadow -Wcast-qual -Wcast-align -Wchar-subscripts -Wmissing-prototypes -Wmissing-declarations -MT asn1parser.lo -MD -MP -MF ".deps/asn1parser.Tpo" -c -o asn1parser.lo asn1parser.c; \
then mv -f ".deps/asn1parser.Tpo" ".deps/asn1parser.Plo"; else rm -f ".deps/asn1parser.Tpo"; exit 1; fi
mkdir .libs
gcc -DHAVE_CONFIG_H -I. -I. -I.. -g -O2 -Wall -Wshadow -Wcast-qual -Wcast-align -Wchar-subscripts -Wmissing-prototypes -Wmissing-declarations -MT asn1parser.lo -MD -MP -MF .deps/asn1parser.Tpo -c asn1parser.c -fPIC -DPIC -o .libs/asn1parser.o
gcc -DHAVE_CONFIG_H -I. -I. -I.. -g -O2 -Wall -Wshadow -Wcast-qual -Wcast-align -Wchar-subscripts -Wmissing-prototypes -Wmissing-declarations -MT asn1parser.lo -MD -MP -MF .deps/asn1parser.Tpo -c asn1parser.c -o asn1parser.o >/dev/null 2>&1
if /bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I.. -g -O2 -Wall -Wshadow -Wcast-qual -Wcast-align -Wchar-subscripts -Wmissing-prototypes -Wmissing-declarations -MT asn1p_y.lo -MD -MP -MF ".deps/asn1p_y.Tpo" -c -o asn1p_y.lo asn1p_y.c; \
then mv -f ".deps/asn1p_y.Tpo" ".deps/asn1p_y.Plo"; else rm -f ".deps/asn1p_y.Tpo"; exit 1; fi
gcc -DHAVE_CONFIG_H -I. -I. -I.. -g -O2 -Wall -Wshadow -Wcast-qual -Wcast-align -Wchar-subscripts -Wmissing-prototypes -Wmissing-declarations -MT asn1p_y.lo -MD -MP -MF .deps/asn1p_y.Tpo -c asn1p_y.c -fPIC -DPIC -o .libs/asn1p_y.o
gcc -DHAVE_CONFIG_H -I. -I. -I.. -g -O2 -Wall -Wshadow -Wcast-qual -Wcast-align -Wchar-subscripts -Wmissing-prototypes -Wmissing-declarations -MT asn1p_y.lo -MD -MP -MF .deps/asn1p_y.Tpo -c asn1p_y.c -o asn1p_y.o >/dev/null 2>&1
if /bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I.. -g -O2 -Wall -Wshadow -Wcast-qual -Wcast-align -Wchar-subscripts -Wmissing-prototypes -Wmissing-declarations -MT asn1p_l.lo -MD -MP -MF ".deps/asn1p_l.Tpo" -c -o asn1p_l.lo asn1p_l.c; \
then mv -f ".deps/asn1p_l.Tpo" ".deps/asn1p_l.Plo"; else rm -f ".deps/asn1p_l.Tpo"; exit 1; fi
gcc -DHAVE_CONFIG_H -I. -I. -I.. -g -O2 -Wall -Wshadow -Wcast-qual -Wcast-align -Wchar-subscripts -Wmissing-prototypes -Wmissing-declarations -MT asn1p_l.lo -MD -MP -MF .deps/asn1p_l.Tpo -c asn1p_l.c -fPIC -DPIC -o .libs/asn1p_l.o
In file included from asn1p_l.c:37:
/opt/hp-gcc-4.4.0/lib/gcc/hppa1.1-hp-hpux11.11/4.4.0/include-fixed/stdio.h:75: error: expected identifier or '(' before ';' token
/opt/hp-gcc-4.4.0/lib/gcc/hppa1.1-hp-hpux11.11/4.4.0/include-fixed/stdio.h:78: error: expected ';' before 'int'
*** Error exit code 1

Stop.
*** Error exit code 1

Stop.
*** Error exit code 1

Stop.

Line 37 in asn1cp.l.c is #include

and on line 75,78 is

62 typedef struct {
63 int __cnt;
64 unsigned char *__ptr;
65 unsigned char *__base;
66 unsigned short __flag;
67 unsigned char __fileL; /* low byte of file desc */
68 unsigned char __fileH; /* high byte of file desc */
69 unsigned char *__bufendp; /* end of buffer */
70 unsigned char *__newbase;
71 unsigned char __smbuf[_SBFSIZ+2*4]; /* small buffer */
72 # ifdef _REENTRANT
73 void *__lock; /* lock for thread safety */
74 # else
75 void *__unused;
76 # endif
77 # ifdef _INCLUDE__STDC_A1_SOURCE
78 int __orientation ;

How can I overcome this problem

Thanks
Chris

12 REPLIES 12
Steven Schweda
Honored Contributor

Re: asn1c-0.9.21 make problem

In my (limited) experience, problems with
system header files (like, say, )
when using GCC are caused by a defective GCC
installation.
Dennis Handly
Acclaimed Contributor

Re: asn1c-0.9.21 make problem

Can you provide the preprocessed lines for stdio.h, using -E? It seems you have an evil macro problem with __unused.
Chris Frangandonis
Regular Advisor

Re: asn1c-0.9.21 make problem

Hi All,

Thanks for the replay's
Steven,
I was thinking the same thing but need to confirm first.

Dennis,

Could you please explain your question as I am not that clued up with stdio.h

Thanks
Chris
Chris Frangandonis
Regular Advisor

Re: asn1c-0.9.21 make problem

Hi Again,

I am attaching the stdio file if that helps

Thanks
Chris
Chris Frangandonis
Regular Advisor

Re: asn1c-0.9.21 make problem

Hi Dennis,

I ran the following
gcc -E -DHAVE_CONFIG_H -I. -I. -I.. -g -O2 -Wall -Wshadow -Wcast-qual -Wcast-align -Wchar-subscripts -Wmissing-prototypes -Wmissing-declarations -MT asn1p_l.lo -MD -MP -MF .deps/asn1p_l.Tpo -c asn1p_l.c -fPIC -DPIC -o .libs/asn1p_l.o

and attached is the results

Thanks Again
Chris
Dennis Handly
Acclaimed Contributor

Re: asn1c-0.9.21 make problem

>I am attaching the stdio file if that helps

Not really, it has the same as your initial fragment.

>I ran the following: gcc -E -DHAVE_CONFIG_H -I. -I. -I..

This shows you have an evil illegal macro for __unused:
void *;
You need to look for a macro definition like:
#define __unused

You might be able to find it by using:
grep -e __unused $(awk '$1 == "#" {print $3}' your-E-file)

Adding -H may give a simpler list of each include file.
Chris Frangandonis
Regular Advisor

Re: asn1c-0.9.21 make problem

Hi Dennis,

Ran the command as requested and the result is

/opt/hp-gcc-4.4.0/lib/gcc/hppa1.1-hp-hpux11.11/4.4.0/include-fixed/errno.h
/opt/hp-gcc-4.4.0/lib/gcc/hppa1.1-hp-hpux11.11/4.4.0/include-fixed/limits.h
/opt/hp-gcc-4.4.0/lib/gcc/hppa1.1-hp-hpux11.11/4.4.0/include-fixed/pwd.h
/opt/hp-gcc-4.4.0/lib/gcc/hppa1.1-hp-hpux11.11/4.4.0/include-fixed/stdio.h
void *__unused;
/opt/hp-gcc-4.4.0/lib/gcc/hppa1.1-hp-hpux11.11/4.4.0/include-fixed/stdlib.h
/opt/hp-gcc-4.4.0/lib/gcc/hppa1.1-hp-hpux11.11/4.4.0/include-fixed/string.h

Thanks
Chris
Chris Frangandonis
Regular Advisor

Re: asn1c-0.9.21 make problem

Hi Dennis,

Please ignore prevoius mesg

I ran it with slight changes to the way you suggest and got the following

/opt/hp-gcc-4.4.0/lib/gcc/hppa1.1-hp-hpux11.11/4.4.0/include-fixed/stdio.h: void *__unused;
grep: can't open
grep: can't open
asn1p_l.c:#define __unused
asn1p_l.c:static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t )) __unused;
Chris Frangandonis
Regular Advisor

Re: asn1c-0.9.21 make problem

Hi Dennis,

I finally succeeded in a make i.e. I commented out line 74 and 75 in the stdio.h

That was by luck.

Any comments?

Thanks
Chris
Dennis Handly
Acclaimed Contributor

Re: asn1c-0.9.21 make problem

>I ran it with slight changes to the way you suggest and got the following
asn1p_l.c:#define __unused

This is illegal since that name is reserved to the implementaion. Remove it.
You may have to change the macro name there and in:
asn1p_l.c:static void *yy_flex_realloc ...

>I commented out line 74 and 75 in the stdio.h. Any comments?

You can't remove fields in a struct and expect it to still work. (Provided you use that struct.)
Chris Frangandonis
Regular Advisor

Re: asn1c-0.9.21 make problem

Hi Dennis,

Thanks for replying

As for my comment on line 74, 75 I only did that so that I could succeed in the make .

Once the make was successful I re-commented out line 74,75

Thanks
Chris
Dennis Handly
Acclaimed Contributor

Re: asn1c-0.9.21 make problem

>Once the make was successful I re-commented out line 74,75

You meant uncommented?

This is the wrong way to handle things.
asn1c-0.9.21 is broken, you need to fix its source.