Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!lll-winken!elroy.jpl.nasa.gov!sdd.hp.com!zaphod.mps.ohio-state.edu!think.com!paperboy!hsdndev!cmcl2!panix!eravin From: eravin@panix.uucp (Ed Ravin) Newsgroups: comp.unix.aix Subject: Re: Error compiling GNU grep Summary: doubly included files cause mysterious xlc messages- film at 11. Message-ID: <1991May23.192221.1252@panix.uucp> Date: 23 May 91 19:22:21 GMT References: Organization: Newsaholics Annonymous Lines: 58 In article bis@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@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@ifi.uio.no >Norway In article bis@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 |