From nobody Sat Feb 11 11:45:31 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 4PDTLj5vHXz3q0xH for ; Sat, 11 Feb 2023 11:45:33 +0000 (UTC) (envelope-from madpilot@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PDTLj5R0dz3Fyv; Sat, 11 Feb 2023 11:45:33 +0000 (UTC) (envelope-from madpilot@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676115933; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=4sopNjhNen4cdgF8bHSb8FyQbLC5J6/eppohzbl5isQ=; b=uSihMdDaUrDlYoF1MBS+1uu+IY1qaUwmfqo1tJXjk1wyiisLYnehoGkI9skzcvLb5IBCW8 JztEwgGRLAM8eAxCM+hHjRsGLd3Zwo4EsnZNIMWSJ+wzhEk39DE39pje+dHqf3y2qywLuh bCHHw++NqpPMzYLEetg20l2/sWCOgUU57hTW7aG2N2H8VeGOILK5wbNaN/g0rdzpgt2IsM 9KQfHPKHrOsNc0xqBPFcWijcy75zEbcU8ZnJTHFoeXflbc/5xVR8qM6rH3psKbaQqpYi4y tlDaeVazZp7DverFkr/fdutIFW+8lsoJV0fRZI61dS/3BVbhrLmzwg/e4E8W+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676115933; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=4sopNjhNen4cdgF8bHSb8FyQbLC5J6/eppohzbl5isQ=; b=OI2zBv/OPDOzL1R5g7caNl/yhQG4uP/amoMZiSN+hv2LoOOqBbLmUmV6WJ0UUCzF7WbDB/ GbX3wGXw/azm2lGj9UCHtaWU5NbPVt9ws0R7HnW0OKESFQ1byi8zUyguZDVeTaqKGc1itb 4uPVmVpnECB2ByZ/eZwI+vuTJMlP5j6BR9lD40bZm+c8uyFThD9lYWRDBJURh8c9WmjeE1 jXddYv/gpJ9AdzNGsASrcdW/CJW5Z8G7v4hyFNuLlh61zUqeJWdWlLFHKWjK4VEGp/GOzm sNS09qrr2F66fKhLG06AHjM9aZjrkz1K/KIxF9BlIPzWNWQ1xi3R/z9iYe3ITg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676115933; a=rsa-sha256; cv=none; b=nscUPitGnRIjexu0ek93WQ7YCnlt7tgY5BWxBzdiT8VBAqd2DSMV+C0TRxWELeecgvG/VT CE9TCT/sw3nlfkjAhT6SmCHjveeHygpXSXVtEk/WrLGbL/bbWwytwe2CYijLlDWFI+xGmj 2+iywq7O+JkfxuhNkkpD8gvYmECBxcCJsDTJqRhjXk4SJ7JioPAsAjmJANzifgqcRsb46o dFPLd4uWPDz9dnZxi4LbHgIPrNxyaxw7c27ej7eBr4u4DYmhq19jwI8AmLuX8ReSUeV+BC bSPiwu5y9cZ6Vvyoh84HqMIPVGhka/6dmwgBmsejPM8iynLAGPhQaFpPpJBR4w== Received: from [172.24.42.13] (host-79-35-129-22.retail.telecomitalia.it [79.35.129.22]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: madpilot/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4PDTLj1YXqzFh3; Sat, 11 Feb 2023 11:45:33 +0000 (UTC) (envelope-from madpilot@FreeBSD.org) Message-ID: Date: Sat, 11 Feb 2023 12:45:31 +0100 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 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 Subject: Re: editors/uemacs fails to biuld on 14.0-CURRENT 1400079 Content-Language: en-US To: andrew clarke , =?UTF-8?B?Sm9zw6kgUMOpcmV6?= Cc: FreeBSD Ports References: <8aceaed7bb0323fc53143a8befd35170@mail.yourbox.net> <20230211111245.o3qjm3oyncivtipu@ozzmosis.com> From: Guido Falsi In-Reply-To: <20230211111245.o3qjm3oyncivtipu@ozzmosis.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-ThisMailContainsUnwantedMimeParts: N 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 >> 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. > As far as I understand what happened is that a default was changed, -Wint-conversion is now on by default. So regarding this wouldn't forcing a flag to disable it again be enough? Obviously fixing the code is better whenever possible, but if this code is not fixable due to age, changing flags should be ok. Something like -Wno-error=int-conversion or -Wno-int-conversion should make the error go away. Same with similar issues with this code. 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. -- Guido Falsi