Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 18 Feb 2023 23:55:18 -0700
From:      Warner Losh <imp@bsdimp.com>
To:        Gordon Bergling <gbe@freebsd.org>
Cc:        FreeBSD Current <freebsd-current@freebsd.org>
Subject:   Re: Build breakage with WITH_BEARSSL=1
Message-ID:  <CANCZdfpK95NrjoRJPvNqJ%2BaxXKsBU2wz2oXaFLsSREy%2BqJM0fQ@mail.gmail.com>
In-Reply-To: <Y%2B3h8n6tDAdmXWpj@lion.ttyv0.de>
References:  <Y%2BjFd1MGxFAth1xL@lion.ttyv0.de> <CANCZdfp_CD81r1E0S67Y6NA82xe3OcWazDm308WEn7_MkUzNDA@mail.gmail.com> <CANCZdfpMa1HzBBYrZLQBSn-Z11gE5=Gn5KTm%2B2tCzgJ3=S6kQw@mail.gmail.com> <Y%2B3h8n6tDAdmXWpj@lion.ttyv0.de>

next in thread | previous in thread | raw e-mail | index | archive | help
--000000000000f6d36105f50806c5
Content-Type: text/plain; charset="UTF-8"

On Thu, Feb 16, 2023 at 12:57 AM Gordon Bergling <gbe@freebsd.org> wrote:

> Hi Warner,
>
> On Wed, Feb 15, 2023 at 10:07:08AM -0700, Warner Losh wrote:
> > On Sun, Feb 12, 2023, 3:18 PM Warner Losh <imp@bsdimp.com> wrote:
> > > On Sun, Feb 12, 2023 at 3:54 AM Gordon Bergling <gbe@freebsd.org>
> wrote:
> > >
> > >> Hi,
> > >>
> > >> I am currently seeing a build breakage when building -CURRENT with
> > >> WITH_BEARSSL=1.
> > >>
> > >> The error is the following
> > >>
> > >>   make[5]: "/boiler/nfs/src/lib/libsecureboot/local.trust.mk" line
> 109:
> > >> warning: "cd /boiler/nfs/src/lib/libsecureboot && 'ls'   -1 *.pem
> t*.asc 2>
> > >> /dev/null" returned non-zero status
> > >>   /boiler/nfs/src/contrib/bearssl/src/rsa/rsa_i62_keygen.c:43:22:
> error:
> > >> a function declaration without a prototype is deprecat  ed in all
> versions
> > >> of C [-Werror,-Wstrict-prototypes]
> > >>   br_rsa_i62_keygen_get()
> > >>                        ^
> > >>                         void
> > >>   1 error generated.
> > >>   --- rsa_i62_keygen.pico ---
> > >>
> > >>
> > >> When disabling BEARSSL in the src.conf the build succeeds as usual.
> > >>
> > >> Has anyone also seen this build error. Sources are very recent and the
> > >> src.conf is the following:
> > >>
> > >> WITH_EXTRA_TCP_STACKS=1
> > >> #WITH_BEARSSL=1
> > >> WITH_PIE=1
> > >> WITH_RETPOLINE=1
> > >> WITH_INIT_ALL_ZERO=1
> > >> WITH_OPENSSL_KTLS=1
> > >> WITHOUT_CLEAN=1
> > >>
> > >> Any help is very appreciated.
> > >>
> > >>
> > > What does the following do for you? It's a cut and pasted patch, but it
> > > should be clear enough what to do if the mailer mangles it.
> > >
> > > diff --git a/lib/libbearssl/Makefile.inc b/lib/libbearssl/Makefile.inc
> > > index dd0e242c8ef0..2af4864d8441 100644
> > > --- a/lib/libbearssl/Makefile.inc
> > > +++ b/lib/libbearssl/Makefile.inc
> > > @@ -4,4 +4,4 @@ BEARSSL?= ${SRCTOP}/contrib/bearssl
> > >  BEARSSL_SRC= ${BEARSSL}/src
> > >
> > >  CFLAGS+= -I${BEARSSL}/inc
> > > -
> > > +CFLAGS+= ${NO_WDEPRECATED_NON_PROTOTYPE}
> > >
> >
> > I went ahead and committed this. Please let me know if the problem
> persists.
>
> Sorry for the late reply. I just tried a fresh build and it still fails
> with
>
> [..]/src/contrib/bearssl/src/rsa/rsa_i62_keygen.c:43:22: error: a function
> declaration without a prototype is deprecated in all versions of C
> [-Werror,-Wstrict-prototypes]
>   br_rsa_i62_keygen_get()
>
> Did you see any other possibilty to fix this?
>

Oh, maybe add -Wno-strict-prototypes to where I added
NO_WDEPRECATED_NON_PROTOTYPES?

Warner

--000000000000f6d36105f50806c5
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div dir=3D"ltr"><br></div><br><div class=3D"gmail_quote">=
<div dir=3D"ltr" class=3D"gmail_attr">On Thu, Feb 16, 2023 at 12:57 AM Gord=
on Bergling &lt;<a href=3D"mailto:gbe@freebsd.org">gbe@freebsd.org</a>&gt; =
wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0=
px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi Warner=
,<br>
<br>
On Wed, Feb 15, 2023 at 10:07:08AM -0700, Warner Losh wrote:<br>
&gt; On Sun, Feb 12, 2023, 3:18 PM Warner Losh &lt;<a href=3D"mailto:imp@bs=
dimp.com" target=3D"_blank">imp@bsdimp.com</a>&gt; wrote:<br>
&gt; &gt; On Sun, Feb 12, 2023 at 3:54 AM Gordon Bergling &lt;<a href=3D"ma=
ilto:gbe@freebsd.org" target=3D"_blank">gbe@freebsd.org</a>&gt; wrote:<br>
&gt; &gt;<br>
&gt; &gt;&gt; Hi,<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; I am currently seeing a build breakage when building -CURRENT=
 with<br>
&gt; &gt;&gt; WITH_BEARSSL=3D1.<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; The error is the following<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;=C2=A0 =C2=A0make[5]: &quot;/boiler/nfs/src/lib/libsecureboot/=
<a href=3D"http://local.trust.mk" rel=3D"noreferrer" target=3D"_blank">loca=
l.trust.mk</a>&quot; line 109:<br>
&gt; &gt;&gt; warning: &quot;cd /boiler/nfs/src/lib/libsecureboot &amp;&amp=
; &#39;ls&#39;=C2=A0 =C2=A0-1 *.pem t*.asc 2&gt;<br>
&gt; &gt;&gt; /dev/null&quot; returned non-zero status<br>
&gt; &gt;&gt;=C2=A0 =C2=A0/boiler/nfs/src/contrib/bearssl/src/rsa/rsa_i62_k=
eygen.c:43:22: error:<br>
&gt; &gt;&gt; a function declaration without a prototype is deprecat=C2=A0 =
ed in all versions<br>
&gt; &gt;&gt; of C [-Werror,-Wstrict-prototypes]<br>
&gt; &gt;&gt;=C2=A0 =C2=A0br_rsa_i62_keygen_get()<br>
&gt; &gt;&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=
 =C2=A0 =C2=A0 =C2=A0 ^<br>
&gt; &gt;&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=
 =C2=A0 =C2=A0 =C2=A0 =C2=A0void<br>
&gt; &gt;&gt;=C2=A0 =C2=A01 error generated.<br>
&gt; &gt;&gt;=C2=A0 =C2=A0--- rsa_i62_keygen.pico ---<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; When disabling BEARSSL in the src.conf the build succeeds as =
usual.<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; Has anyone also seen this build error. Sources are very recen=
t and the<br>
&gt; &gt;&gt; src.conf is the following:<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; WITH_EXTRA_TCP_STACKS=3D1<br>
&gt; &gt;&gt; #WITH_BEARSSL=3D1<br>
&gt; &gt;&gt; WITH_PIE=3D1<br>
&gt; &gt;&gt; WITH_RETPOLINE=3D1<br>
&gt; &gt;&gt; WITH_INIT_ALL_ZERO=3D1<br>
&gt; &gt;&gt; WITH_OPENSSL_KTLS=3D1<br>
&gt; &gt;&gt; WITHOUT_CLEAN=3D1<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; Any help is very appreciated.<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;<br>
&gt; &gt; What does the following do for you? It&#39;s a cut and pasted pat=
ch, but it<br>
&gt; &gt; should be clear enough what to do if the mailer mangles it.<br>
&gt; &gt;<br>
&gt; &gt; diff --git a/lib/libbearssl/Makefile.inc b/lib/libbearssl/Makefil=
e.inc<br>
&gt; &gt; index dd0e242c8ef0..2af4864d8441 100644<br>
&gt; &gt; --- a/lib/libbearssl/Makefile.inc<br>
&gt; &gt; +++ b/lib/libbearssl/Makefile.inc<br>
&gt; &gt; @@ -4,4 +4,4 @@ BEARSSL?=3D ${SRCTOP}/contrib/bearssl<br>
&gt; &gt;=C2=A0 BEARSSL_SRC=3D ${BEARSSL}/src<br>
&gt; &gt;<br>
&gt; &gt;=C2=A0 CFLAGS+=3D -I${BEARSSL}/inc<br>
&gt; &gt; -<br>
&gt; &gt; +CFLAGS+=3D ${NO_WDEPRECATED_NON_PROTOTYPE}<br>
&gt; &gt;<br>
&gt; <br>
&gt; I went ahead and committed this. Please let me know if the problem per=
sists.<br>
<br>
Sorry for the late reply. I just tried a fresh build and it still fails wit=
h<br>
<br>
[..]/src/contrib/bearssl/src/rsa/rsa_i62_keygen.c:43:22: error: a function<=
br>
declaration without a prototype is deprecated in all versions of C [-Werror=
,-Wstrict-prototypes]<br>
=C2=A0 br_rsa_i62_keygen_get()<br>
<br>
Did you see any other possibilty to fix this?<br></blockquote><div><br></di=
v><div>Oh, maybe add -Wno-strict-prototypes to where I added NO_WDEPRECATED=
_NON_PROTOTYPES?</div><div><br></div><div>Warner <br></div></div></div>

--000000000000f6d36105f50806c5--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfpK95NrjoRJPvNqJ%2BaxXKsBU2wz2oXaFLsSREy%2BqJM0fQ>