From nobody Tue Feb 28 03:44:31 2023 X-Original-To: freebsd-current@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 4PQjt50WCVz3trVq for ; Tue, 28 Feb 2023 03:44:45 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-ed1-x532.google.com (mail-ed1-x532.google.com [IPv6:2a00:1450:4864:20::532]) (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-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PQjt45ZhJz4T2f for ; Tue, 28 Feb 2023 03:44:44 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ed1-x532.google.com with SMTP id o15so32005360edr.13 for ; Mon, 27 Feb 2023 19:44:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20210112.gappssmtp.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=66w7+CvUL8VR0isUmxIFxzcP2cuaXfwOVjtjLeiY9M4=; b=Iil30ArAXnuuCCmHfB/dyoJA7KKwhPxaBIQH6boYYD69GfXIxX4XRBspStzrcdoXID xcE8uI6iNN/Xm4h2LNuJWIxDE2AeVo8X4qZW++3GBUCxnWSyIStyKR6zZE5YTIBLkwYN VDU52I++zfOhPapgLsL++ehobPvWCqQhbG/M1BKOVp0SYQkebfanAhxSaEb8JVpFjALY 0brBB6VLC/dniaIWLqvUIZ7mKMsZimuWGYSfv1wPgdKDNlyJD2Lo+usdic5VzKrrMrTF CN9AyGynq/Beb1viVi7j2sqsQHLK3qQF3Q4Frb0zdFzLgo9dmAeIP/jNb087K5dN83p7 QLoA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=66w7+CvUL8VR0isUmxIFxzcP2cuaXfwOVjtjLeiY9M4=; b=H+5J0OoIuhIjM0msThflfyRizFkucYlEgwx4yk3Voi0mGZbOQm06q5o1I+KMtwULhT FM8lJhIXwpBuOFoRAUVIpwSEcp/sUoR3hbF4D0Q5o2amOnUm3Enl4osvh9DJohxwcX8e RANMca3z1R6x64DhXjeAspdPlPteEb3jREe/pN4py1/fCuwbI2mE+40JeCXUilj0gaig iWWpXsTKfOMg03xpKoN/rUNLTo2+laSWAN2/IiYcz2UKKmEmk1KwRzYw9asE5i9evOw+ sHxAL0r4Ueyv/zJIQFX3+NMQtd6M9htjgIqNFjxdzDyiKQJOSlS44F29rBgQzhcPecof OwQA== X-Gm-Message-State: AO0yUKVBf2oGNS2AmeFSKEolIijOGi0e9F/G+Y7/EnjoI7ofRFDHIyDs lLQFz4H4Rgkf9gKkCrroCrNqPVrLp6cwjugxu7k07/xtu027gg== X-Google-Smtp-Source: AK7set+R/p9oQEKe90rSd/ScRv0yOaUTeBtKmiEWdJ0FaAU3vZkl/7eULAvNgiUcrBOFcRWzxNBv3FOAOjmfNalU45s= X-Received: by 2002:a17:906:2758:b0:8b1:749f:b2c6 with SMTP id a24-20020a170906275800b008b1749fb2c6mr473917ejd.2.1677555883437; Mon, 27 Feb 2023 19:44:43 -0800 (PST) List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@freebsd.org MIME-Version: 1.0 References: <20230227192011.08f7aa8e@thor.intern.walstatt.dynvpn.de> <720721A7-B1ED-405B-98EB-04A3AFCA7FD5@gromit.dlib.vt.edu> <1F3F20A1-C2BC-4A33-ABFD-D20F4ADB67E8@FreeBSD.org> In-Reply-To: <1F3F20A1-C2BC-4A33-ABFD-D20F4ADB67E8@FreeBSD.org> From: Warner Losh Date: Mon, 27 Feb 2023 20:44:31 -0700 Message-ID: Subject: Re: NanoBSD: CURRENT unable to compile 13-STABLE : error: a function definition without a prototype is deprecated ... in C To: Dimitry Andric Cc: Paul Mather , FreeBSD User , FreeBSD CURRENT Content-Type: multipart/alternative; boundary="00000000000086080005f5ba6afb" X-Rspamd-Queue-Id: 4PQjt45ZhJz4T2f X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N --00000000000086080005f5ba6afb Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, Feb 27, 2023 at 3:46=E2=80=AFPM Dimitry Andric wr= ote: > On 27 Feb 2023, at 22:23, Paul Mather wrote: > > > > On Feb 27, 2023, at 2:57 PM, Dimitry Andric wrote: > > > >> On 27 Feb 2023, at 19:19, FreeBSD User wrote: > >>> > >>> Running recent CURRENT as host (FreeBSD 14.0-CURRENT #23 > main-n261147-b8bb73ab724b: Sun Feb 26 > >>> 17:39:38 CET 2023 amd64), and nanoBSD (recent 13-STABLE, git > stable/13). > >>> > >>> Building an appliance based on 13-STABLE sources, a customized kernel > via nanoBSD, since a > >>> couple of weeks for now building the sources fails in kernel sources: > >>> > >>> [...] > >>> --- modules-all --- > >>> --- all_subdir_an --- > >>> > /pool/home/ohartmann/Projects/router/router/apu2c4/src/sys/dev/an/if_an_p= ci.c:143:1: > error: a > >>> function definition without a prototype is deprecated in all versions > of C and is not > >>> supported in C2x [-Werror,-Wdeprecated-non-prototype] > >>> [..] > >>> > >>> Disabling all wireless options in the kernel config starts dropping > errors of a similar kind > >>> on other kernel places. > >>> > >>> Compiling on FBSD 13-STABLE seems to be all right. > >>> > >>> Can this be fixed. please? What causes the error and how can this be > resolved if the subtree > >>> of FreeBSD's sources is a submodule? > >> > >> Not sure what you mean with "subtree is a submodule", but this is like= ly > >> caused by skipping the cross-tools stage somehow. Do you have any > >> specific make.conf or src.conf settings for that? > > > > > > I got bitten by this recently. In my case, it was Poudriere (running o= n > 14-CURRENT) trying to build a 13-STABLE jail. The Poudriere jail's > "src.conf" was taken from the actual system for which Poudriere builds > packages. It had (amongst others) these two options: > > > > WITH_SYSTEM_COMPILER=3Dyes > > WITHOUT_CROSS_COMPILER=3Dyes > > > > > > When I commented these out in the jail-src.conf Poudriere file the jail > built correctly. > > > > I figure the system built fine because its system compiler is LLVM > 14.x. The Poudriere system compiler is LLVM 15.x, which has the breaking > change wrt. old-style prototypes. > > Yes, that is what I suspected in Oliver's case: if you skip the > cross-tools stage in a buildworld of stable/13 on a 14-CURRENT host, by > setting WITH_SYSTEM_COMPILER, you are bound to run into compilation > errors that have been fixed in 14-CURRENT, but not yet MFC'd. > > The safest solution is to let cross-tools do its thing, which will check > the host compiler, and automatically build an appropriate version of the > compiler and linker for the stable branch, if required. > > That said, I will be merging clang 15.0.7 and a bunch of other things > that should solve all these errors to stable/13 at some point, but not > before the 13.2-RELEASE is out. This is to avoid making life more > difficult for our release engineering team. > In the meantime, I think you can disable -Werror with MK_WERROR=3Dno in one of the nanobsd config file. The warnings are significantly less relevant for stable/xx because they are not likely to inspire people to fix them like they would on main. And to fix these, you'd need to merge the fixes from head, or at least the neutering of large classes of errors like we had (still have?) in main.... Warner > -Dimitry > > --00000000000086080005f5ba6afb Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Mon, Feb 27, 2023 at 3:46=E2=80=AF= PM Dimitry Andric <dim@freebsd.org> wrote:
On = 27 Feb 2023, at 22:23, Paul Mather <paul@gromit.dlib.vt.edu> wrote:
>
> On Feb 27, 2023, at 2:57 PM, Dimitry Andric <dim@FreeBSD.org> wr= ote:
>
>> On 27 Feb 2023, at 19:19, FreeBSD User <freebsd@walstatt-de.de> wrote:<= br> >>>
>>> Running recent CURRENT as host (FreeBSD 14.0-CURRENT #23 main-= n261147-b8bb73ab724b: Sun Feb 26
>>> 17:39:38 CET 2023 amd64), and nanoBSD (recent 13-STABLE, git s= table/13).
>>>
>>> Building an appliance based on 13-STABLE sources, a customized= kernel via nanoBSD, since a
>>> couple of weeks for now building the sources fails in kernel s= ources:
>>>
>>> [...]
>>> --- modules-all ---
>>> --- all_subdir_an ---
>>> /pool/home/ohartmann/Projects/router/router/apu2c4/src/sys/dev= /an/if_an_pci.c:143:1: error: a
>>> function definition without a prototype is deprecated in all v= ersions of C and is not
>>> supported in C2x [-Werror,-Wdeprecated-non-prototype]
>>> [..]
>>>
>>> Disabling all wireless options in the kernel config starts dro= pping errors of a similar kind
>>> on other kernel places.
>>>
>>> Compiling on FBSD 13-STABLE seems to be all right.
>>>
>>> Can this be fixed. please? What causes the error and how can t= his be resolved if the subtree
>>> of FreeBSD's sources is a submodule?
>>
>> Not sure what you mean with "subtree is a submodule", bu= t this is likely
>> caused by skipping the cross-tools stage somehow. Do you have any<= br> >> specific make.conf or src.conf settings for that?
>
>
> I got bitten by this recently.=C2=A0 In my case, it was Poudriere (run= ning on 14-CURRENT) trying to build a 13-STABLE jail.=C2=A0 The Poudriere j= ail's "src.conf" was taken from the actual system for which P= oudriere builds packages.=C2=A0 It had (amongst others) these two options:<= br> >
> WITH_SYSTEM_COMPILER=3Dyes
> WITHOUT_CROSS_COMPILER=3Dyes
>
>
> When I commented these out in the jail-src.conf Poudriere file the jai= l built correctly.
>
> I figure the system built fine because its system compiler is LLVM 14.= x.=C2=A0 The Poudriere system compiler is LLVM 15.x, which has the breaking= change wrt. old-style prototypes.

Yes, that is what I suspected in Oliver's case: if you skip the
cross-tools stage in a buildworld of stable/13 on a 14-CURRENT host, by
setting WITH_SYSTEM_COMPILER, you are bound to run into compilation
errors that have been fixed in 14-CURRENT, but not yet MFC'd.

The safest solution is to let cross-tools do its thing, which will check the host compiler, and automatically build an appropriate version of the compiler and linker for the stable branch, if required.

That said, I will be merging clang 15.0.7 and a bunch of other things
that should solve all these errors to stable/13 at some point, but not
before the 13.2-RELEASE is out. This is to avoid making life more
difficult for our release engineering team.

=
In the meantime, I think you can disable -Werror with MK_WERROR=3Dno i= n one
of the nanobsd config file. The warnings are significantly = less relevant for stable/xx
because they are not likely to inspir= e people to fix them like they would on main.

And = to fix these, you'd need to merge the fixes from head, or at least the = neutering
of large classes of errors like we had (still have?) in= main....

Warner
=C2=A0
-Dimitry

--00000000000086080005f5ba6afb--