Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 12 Feb 2023 15:18:44 -0700
From:      Warner Losh <imp@bsdimp.com>
To:        Gordon Bergling <gbe@freebsd.org>
Cc:        freebsd-current@freebsd.org
Subject:   Re: Build breakage with WITH_BEARSSL=1
Message-ID:  <CANCZdfp_CD81r1E0S67Y6NA82xe3OcWazDm308WEn7_MkUzNDA@mail.gmail.com>
In-Reply-To: <Y%2BjFd1MGxFAth1xL@lion.ttyv0.de>

index | next in thread | previous in thread | raw e-mail

[-- Attachment #1 --]
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}

Warner

[-- Attachment #2 --]
<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Feb 12, 2023 at 3:54 AM Gordon Bergling &lt;<a href="mailto:gbe@freebsd.org">gbe@freebsd.org</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi,<br>
<br>
I am currently seeing a build breakage when building -CURRENT with WITH_BEARSSL=1.<br>
<br>
The error is the following<br>
<br>
  make[5]: &quot;/boiler/nfs/src/lib/libsecureboot/<a href="http://local.trust.mk" rel="noreferrer" target="_blank">local.trust.mk</a>&quot; line 109: warning: &quot;cd /boiler/nfs/src/lib/libsecureboot &amp;&amp; &#39;ls&#39;   -1 *.pem t*.asc 2&gt; /dev/null&quot; returned non-zero status<br>
  /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>
  br_rsa_i62_keygen_get()<br>
                       ^<br>
                        void<br>
  1 error generated.<br>
  --- rsa_i62_keygen.pico ---<br>
<br>
<br>
When disabling BEARSSL in the src.conf the build succeeds as usual.<br>
<br>
Has anyone also seen this build error. Sources are very recent and the<br>
src.conf is the following:<br>
<br>
WITH_EXTRA_TCP_STACKS=1<br>
#WITH_BEARSSL=1<br>
WITH_PIE=1<br>
WITH_RETPOLINE=1<br>
WITH_INIT_ALL_ZERO=1<br>
WITH_OPENSSL_KTLS=1<br>
WITHOUT_CLEAN=1<br>
<br>
Any help is very appreciated.<br>
<br></blockquote><div><br></div><div>What does the following do for you? It&#39;s a cut and pasted patch, but it should be clear enough what to do if the mailer mangles it.</div><div><br></div><div>diff --git a/lib/libbearssl/Makefile.inc b/lib/libbearssl/Makefile.inc<br>index dd0e242c8ef0..2af4864d8441 100644<br>--- a/lib/libbearssl/Makefile.inc<br>+++ b/lib/libbearssl/Makefile.inc<br>@@ -4,4 +4,4 @@ BEARSSL?= ${SRCTOP}/contrib/bearssl<br> BEARSSL_SRC= ${BEARSSL}/src<br><br> CFLAGS+= -I${BEARSSL}/inc<br>-<br>+CFLAGS+= ${NO_WDEPRECATED_NON_PROTOTYPE}<br></div><div><br></div><div>Warner</div><div><br></div></div></div>
help

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