Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 11 Feb 2023 13:01:26 +0100
From:      =?UTF-8?Q?Jos=C3=A9_P=C3=A9rez?= <fbl@aoek.com>
To:        FreeBSD Ports <ports@freebsd.org>
Cc:        andrew clarke <mail@ozzmosis.com>, Guido Falsi <madpilot@freebsd.org>
Subject:   Re: editors/uemacs fails to biuld on 14.0-CURRENT 1400079
Message-ID:  <af58cac8f0cc11eb7bb58cbfacea03b1@mail.yourbox.net>
In-Reply-To: <aac4282d-da2a-17dc-28cd-f4b511359c96@FreeBSD.org>
References:  <8aceaed7bb0323fc53143a8befd35170@mail.yourbox.net> <20230211111245.o3qjm3oyncivtipu@ozzmosis.com> <aac4282d-da2a-17dc-28cd-f4b511359c96@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
El 2023-02-11 12:45, Guido Falsi escribió:
> On 11/02/23 12:12, andrew clarke wrote:
>> 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
...
>> 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.
>> 
...
> Something like -Wno-error=int-conversion or -Wno-int-conversion should
> make the error go away. Same with similar issues with this code.

This patch compiles, as a workaround proposed by Guido:
diff --git a/editors/uemacs/Makefile b/editors/uemacs/Makefile
index f999cc978685..48111ffb8824 100644
--- a/editors/uemacs/Makefile
+++ b/editors/uemacs/Makefile
@@ -19,6 +19,8 @@ NO_WRKSUBDIR= yes
  USES=          dos2unix ncurses zip
  EXTRACT_BEFORE_ARGS=   -Lq

+CFLAGS+=       -Wno-int-conversion
+
  post-patch:
         @${REINPLACE_CMD} -e "s|%%PREFIX%%|${PREFIX}|g" 
${WRKSRC}/src/*.c
         @${REINPLACE_CMD} -e 's|-ltermcap|${LDFLAGS} -lncurses|g' \

> I'm not advocating doing this in general. In fact patching the code to
> not cause these errors should be the solution, but for old code that
> is not going to change upstream, maybe disabling the warnings is the
> correct fix.

Agreed. For the time being I am using the workaround, will see whether a 
consistent patch can be upstreamed.


Regards,


-- 
José Pérez



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?af58cac8f0cc11eb7bb58cbfacea03b1>