From mboxrd@z Thu Jan 1 00:00:00 1970 References: <4F171398.8020701@Princeton.EDU> From: steve Content-Type: text/plain; charset=us-ascii In-Reply-To: Message-Id: Date: Mon, 23 Jan 2012 08:13:32 +0000 To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (1.0) Subject: Re: [9fans] ape compiler error, IND CHAR and INT Topicbox-Message-UUID: 608f3726-ead7-11e9-9d60-3106f5b1d025 I must have missed that one, =46rom your old report it seems tr problem is at line 432 of test1.bac.h Can you reproduce the error? -Steve On 23 Jan 2012, at 06:47 AM, Jens Staal wrote: > 2012/1/18 John Floren : >> On Wed, Jan 18, 2012 at 10:46 AM, Martin Harriss w= rote: >>> John Floren wrote: >>>>=20 >>>> I figured I'd try building Python from the source on their website >>>> just for kicks. Configure went ok, but when I went to run "make", it >>>> soon bailed out with this error: >>>>=20 >>>> cc -c -OPT:Olimit=3D0 -g -DNDEBUG -O -I. -IInclude -I./Include >>>> -DPy_BUILD_CORE -o Parser/grammar.o Parser/grammar.c >>>> cc: flag -P ignored >>>> cc: flag -: ignored >>>> cc: can't find library for -l >>>> /usr/john/Python-2.7.2/Parser/grammar.c:46[stdin:12906] incompatible >>>> types: "IND CHAR" and "INT" for op "AS" >>>> /usr/john/Python-2.7.2/Parser/grammar.c:108[stdin:12968] incompatible >>>> types: "IND CHAR" and "INT" for op "AS" >>>> cc: cpp: 8c 896765: error >>>> *** Error code 1 >>>> # >>>>=20 >>>> The offending lines are these: >>>>=20 >>>> d->d_name =3D strdup(name); >>>> and >>>> lb->lb_str =3D strdup(str); >>>>=20 >>>> d_name and lb_str are both defined as char*, and strdup is supposed to >>>> return a char*. However, if I'm reading that error message correctly, >>>> it thinks strdup is trying to return a char*. Does anyone recognize >>>> what's going on? >>>=20 >>>=20 >>> No declaration in scope for the string functions, compiler thinks they >>> return INT? >>>=20 >>> Martin >>>=20 >>=20 >> Yup, I r dum, needed a -D_BSD_EXTENSION in my flags to make string.h >> behave right. >>=20 >=20 > I have a similar issue with BaCon (a ksh script converting BASIC code > to C), a modified version running under APE sh can be found here: >=20 > http://code.google.com/p/ports2plan9/source/browse/BaCon >=20 > Also this one has the problem 'incompatible types "IND CONST CHAR" and > "INT" for op "AS"' >=20 > and I have not been able to track down exactly where in the script > that the erroneous code gets generated. >=20 > issue described here: > http://code.google.com/p/ports2plan9/issues/detail?id=3D1 >=20 > I have already added the -D_BSD_EXTENSION in the CFLAGS in the script.