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