Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 7 Aug 2023 21:32:03 -0600
From:      Warner Losh <imp@bsdimp.com>
To:        Yuri <yuri@aetern.org>
Cc:        FreeBSD Current <freebsd-current@freebsd.org>
Subject:   Re: Jail compile error on CURRENT?
Message-ID:  <CANCZdfoA60%2B11eLCtJfn5tiTuBXFncgqCTw0J3J_FQK7j6xZiQ@mail.gmail.com>
In-Reply-To: <73d081d7-5df6-9fe4-659d-edb191c94be4@aetern.org>
References:  <20230806225055.bbccc4fc13e41f50ec524621@j.email.ne.jp> <C4FC6C3D-73E2-4824-8D56-02B1FF60D5A6@FreeBSD.org> <b6e0e4233d745f70e50477f92db394dd@freebsd.org> <73d081d7-5df6-9fe4-659d-edb191c94be4@aetern.org>

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

[-- Attachment #1 --]
On Mon, Aug 7, 2023, 5:55 PM Yuri <yuri@aetern.org> wrote:

> James Gritton wrote:
> > On 2023-08-07 13:29, Dimitry Andric wrote:
> >> On 7 Aug 2023, at 04:50, Yoshihiro Ota <ota@j.email.ne.jp> wrote:
> >>>
> >>> Am I the only one seeing this error?
> >>> I'm on 12.4-RELEASE amd64 and building CURRENT as of now.
> >>>
> >>> jaillex.c:2228:43: error: unused parameter 'yyscanner'
> >>> [-Werror,-Wunused-parameter]
> >>> void *yyalloc (yy_size_t  size , yyscan_t yyscanner)
> >>>                                          ^
> >>> jaillex.c:2233:58: error: unused parameter 'yyscanner'
> >>> [-Werror,-Wunused-parameter]
> >>> void *yyrealloc  (void * ptr, yy_size_t  size , yyscan_t yyscanner)
> >>>                                                         ^
> >>> jaillex.c:2245:36: error: unused parameter 'yyscanner'
> >>> [-Werror,-Wunused-parameter]
> >>> void yyfree (void * ptr , yyscan_t yyscanner)
> >>>                                   ^
> >>> 6 errors generated.
> >>> *** [jaillex.o] Error code 1
> >>>
> >>
> >> It seems you are not crazy. :) I can reproduce the error, and I think it
> >> might be caused by:
> >>
> >>
> https://cgit.freebsd.org/src/commit/?id=086e0149ae56641af245ce472e787c2f67d3aea5
> >>
> >> However, as to why this does not result in an error (or even a warning)
> >> on -CURRENT, I have no clue. Maybe in the mean time flex in -CURRENT got
> >> updated...
> >
> > That is indeed the culprit.  Fortunately, it builds from 13.2-RELEASE,
> > so building CURRENT from 12 can be done in two steps.  I hate to be the
> > reason the update doesn't work directly, but the include capability I
> > added to jail(8) requires re-entrant lex, which apparently managed to
> > work around the error in 13.  They reason it doesn't give a warning BTW
> > is these two lines that lex adds:
> >
> >         struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
> >         (void)yyg;
> >
> > That makes yyscanner officially "used" even though its value is never
> > actually read.  I suspect the version of lex in 12.4-RELEASE doesn't
> > have one or both of those lines.
> >
> > Perhaps you could add such lines to the offending functions yourself,
> > and continue the make.  Or maybe build (and install) lex on its own
> > first; by the time you see this error, there should already be a newer
> > version of lex you could pop into place.
> >
> > There's probably something I should do to make this work better, or
> > perhaps some note I should put into UPDATING before 14.0 is released.
>
> Or there is already a recipe for bootstrapping lex in Makefile.inc1,
> though for somewhat older versions; possibly it could be updated for < 13?
>
> .if ${BOOTSTRAPPING} < 1000033
>


When in doubt, adding BOOTSTRAPPING=0 can help...not sure why you'd need to
bootstrap lex though...

Warner

>

[-- Attachment #2 --]
<div dir="auto"><div><br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Aug 7, 2023, 5:55 PM Yuri &lt;<a href="mailto:yuri@aetern.org">yuri@aetern.org</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">James Gritton wrote:<br>
&gt; On 2023-08-07 13:29, Dimitry Andric wrote:<br>
&gt;&gt; On 7 Aug 2023, at 04:50, Yoshihiro Ota &lt;<a href="mailto:ota@j.email.ne.jp" target="_blank" rel="noreferrer">ota@j.email.ne.jp</a>&gt; wrote:<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Am I the only one seeing this error?<br>
&gt;&gt;&gt; I&#39;m on 12.4-RELEASE amd64 and building CURRENT as of now.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; jaillex.c:2228:43: error: unused parameter &#39;yyscanner&#39;<br>
&gt;&gt;&gt; [-Werror,-Wunused-parameter]<br>
&gt;&gt;&gt; void *yyalloc (yy_size_t  size , yyscan_t yyscanner)<br>
&gt;&gt;&gt;                                          ^<br>
&gt;&gt;&gt; jaillex.c:2233:58: error: unused parameter &#39;yyscanner&#39;<br>
&gt;&gt;&gt; [-Werror,-Wunused-parameter]<br>
&gt;&gt;&gt; void *yyrealloc  (void * ptr, yy_size_t  size , yyscan_t yyscanner)<br>
&gt;&gt;&gt;                                                         ^<br>
&gt;&gt;&gt; jaillex.c:2245:36: error: unused parameter &#39;yyscanner&#39;<br>
&gt;&gt;&gt; [-Werror,-Wunused-parameter]<br>
&gt;&gt;&gt; void yyfree (void * ptr , yyscan_t yyscanner)<br>
&gt;&gt;&gt;                                   ^<br>
&gt;&gt;&gt; 6 errors generated.<br>
&gt;&gt;&gt; *** [jaillex.o] Error code 1<br>
&gt;&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; It seems you are not crazy. :) I can reproduce the error, and I think it<br>
&gt;&gt; might be caused by:<br>
&gt;&gt;<br>
&gt;&gt; <a href="https://cgit.freebsd.org/src/commit/?id=086e0149ae56641af245ce472e787c2f67d3aea5" rel="noreferrer noreferrer" target="_blank">https://cgit.freebsd.org/src/commit/?id=086e0149ae56641af245ce472e787c2f67d3aea5</a><br>;
&gt;&gt;<br>
&gt;&gt; However, as to why this does not result in an error (or even a warning)<br>
&gt;&gt; on -CURRENT, I have no clue. Maybe in the mean time flex in -CURRENT got<br>
&gt;&gt; updated...<br>
&gt; <br>
&gt; That is indeed the culprit.  Fortunately, it builds from 13.2-RELEASE,<br>
&gt; so building CURRENT from 12 can be done in two steps.  I hate to be the<br>
&gt; reason the update doesn&#39;t work directly, but the include capability I<br>
&gt; added to jail(8) requires re-entrant lex, which apparently managed to<br>
&gt; work around the error in 13.  They reason it doesn&#39;t give a warning BTW<br>
&gt; is these two lines that lex adds:<br>
&gt; <br>
&gt;         struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;<br>
&gt;         (void)yyg;<br>
&gt; <br>
&gt; That makes yyscanner officially &quot;used&quot; even though its value is never<br>
&gt; actually read.  I suspect the version of lex in 12.4-RELEASE doesn&#39;t<br>
&gt; have one or both of those lines.<br>
&gt; <br>
&gt; Perhaps you could add such lines to the offending functions yourself,<br>
&gt; and continue the make.  Or maybe build (and install) lex on its own<br>
&gt; first; by the time you see this error, there should already be a newer<br>
&gt; version of lex you could pop into place.<br>
&gt; <br>
&gt; There&#39;s probably something I should do to make this work better, or<br>
&gt; perhaps some note I should put into UPDATING before 14.0 is released.<br>
<br>
Or there is already a recipe for bootstrapping lex in Makefile.inc1,<br>
though for somewhat older versions; possibly it could be updated for &lt; 13?<br>
<br>
.if ${BOOTSTRAPPING} &lt; 1000033<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto"><br></div><div dir="auto">When in doubt, adding BOOTSTRAPPING=0 can help...not sure why you&#39;d need to bootstrap lex though...</div><div dir="auto"><br></div><div dir="auto">Warner</div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
</blockquote></div></div></div>
help

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