Error compiling GNU grep

Ed Ravin eravin at panix.uucp
Fri May 24 05:22:21 AEST 1991


In article <BIS.91May22190433 at krokrygg.ifi.uio.no> bis at ifi.uio.no (Bjorn Ivar Stark) writes:
>I get this error message when I try to compile GNU grep on
>RS/6000 AIX 3.1
>level 3002. Can someone HELP me?
>
>  fosli at asterix /local/lib/gnu/grep-1.5: make all
>   cc -DUSG -O -c dfa.c
>  Processing include file ./dfa.h
>   21   140 | typedef int size_t;
>       ............a......
>  a - 1506-046: (S) Syntax error.
>  File Line Column Message text
>   21   140    1 1506-137: (S) Previous declaration must declare
>at least one 
>  declarator, tag, or the  members of an enumeration.
>  Processing include file ./dfa.h
>   21   190 | #define NULL 0
>      1506-236: (W) Macro name NULL has been redefined.
>  make: 1254-004 The error code from the last command is 1.
>--
>-----------
>Oystein Fosli
>Norsk Hydro a.s           ph.: (472) 739660       
>Postboks 200, VK-A3	  fax: (472) 739991       
>1321 STABEKK	     internet: bis at ifi.uio.no
>Norway

In article <BIS.91May22190433 at krokrygg.ifi.uio.no> bis at ifi.uio.no
(Bjorn Ivar Stark) writes:
>I get this error message when I try to compile GNU grep on
>RS/6000 AIX 3.1
>   cc -DUSG -O -c dfa.c
>  Processing include file ./dfa.h
>   21   140 | typedef int size_t;
>       ............a......
>  a - 1506-046: (S) Syntax error.
>  File Line Column Message text
>   21   140    1 1506-137: (S) Previous declaration must declare
>at least one 
>  declarator, tag, or the  members of an enumeration.
>  Processing include file ./dfa.h
>   21   190 | #define NULL 0
>      1506-236: (W) Macro name NULL has been redefined.
>  make: 1254-004 The error code from the last command is 1.

Both "size_t" and "NULL" are defined in system include files somewhere.
I had this when trying to compile some other BSD source.  At least
the message you get for NULL is sensible -- the one for size_t is so
convoluted that you're never really sure what they're talking about.

One solution: grep through /usr/include/*.h to find out which files
define "size_t" and NULL -- then make sure that file gets included in
"dfa.h", and comment out the local definitions in "dfa.h".
-- 
Ed Ravin            | I'm sorry, sir, but POSTAL REGULATIONS don't allow
cmcl2!panix!eravin  | PLASTIC tape over PAPER tape and NYLON cord on an
philabs!trintex!elr | 86 inch girth to LITHUANIA...
+1 914 993 4737     |



More information about the Comp.unix.aix mailing list