From nobody Sat Feb 11 11:12:45 2023 X-Original-To: ports@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PDScz5tT1z3pwvy for ; Sat, 11 Feb 2023 11:12:51 +0000 (UTC) (envelope-from mail@ozzmosis.com) Received: from relay11.mail.gandi.net (relay11.mail.gandi.net [217.70.178.231]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4PDScz2ydPz3Bpm for ; Sat, 11 Feb 2023 11:12:51 +0000 (UTC) (envelope-from mail@ozzmosis.com) Authentication-Results: mx1.freebsd.org; none Received: (Authenticated sender: ozzmosis@ozzmosis.com) by mail.gandi.net (Postfix) with ESMTPSA id 868BC100008; Sat, 11 Feb 2023 11:12:48 +0000 (UTC) Received: by blizzard.ozzmosis.com (Postfix, from userid 1001) id 2D93DA241C; Sat, 11 Feb 2023 22:12:45 +1100 (AEDT) Date: Sat, 11 Feb 2023 22:12:45 +1100 From: andrew clarke To: =?utf-8?B?Sm9zw6kgUMOpcmV6?= Cc: FreeBSD Ports Subject: Re: editors/uemacs fails to biuld on 14.0-CURRENT 1400079 Message-ID: <20230211111245.o3qjm3oyncivtipu@ozzmosis.com> References: <8aceaed7bb0323fc53143a8befd35170@mail.yourbox.net> List-Id: Porting software to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-ports List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-ports@freebsd.org X-BeenThere: freebsd-ports@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <8aceaed7bb0323fc53143a8befd35170@mail.yourbox.net> User-Agent: NeoMutt/20220429 X-Rspamd-Queue-Id: 4PDScz2ydPz3Bpm X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:29169, ipnet:217.70.176.0/20, country:FR] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N Hi José, On 2023-02-11 08:16:16, José Pérez (fbl@aoek.com) wrote: > Hi, > I get the following error when poudriere building editors/uemacs on > 14.0-CURRENT 1400079: > ../src/eval.c:1483:10: error: incompatible pointer to integer conversion > returning 'void *' from a function with result type 'int' [-Wint-conversion] > return NULL; > ^~~~ > /usr/include/sys/_null.h:34:14: note: expanded from macro 'NULL' > #define NULL ((void *)0) > ^~~~~~~~~~~ ... > Stop. > make: stopped in /usr/ports/editors/uemacs > > Is this known? The MicroEMACS source code was all written in vintage K&R style. Evidently newer versions of Clang increasingly have a problem with this, which I guess is unsurprising since the minimum C standard Clang is designed for is probably C89/C90. In the K&R days NULL was #defined as 0, so a function returning an int could correctly return NULL. That changed with C89. I'll admit it's a bit strange Clang has decided to clamp down on this some 33 years later. I don't currently have easy access to a FreeBSD machine running clang-15, so can't supply a patch yet, though easiest fix (for now) may be to build uemacs with devel/llvm13 (or maybe devel/llvm14) on FreeBSD 14+. cd /usr/ports/editors/uemacs CC=clang-13 make (untested) Longer term, I'm not sure what the best solution is. I wouldn't expect Clang (or GCC for that matter) to keep supporting uemacs' K&R style C code forever, but converting it all to C90 syntax would be a laborious task. Maybe there are tools for it. Thanks, Andrew