Re: Armv7 buildworld puzzle (jaillex.c:850:1: error: declaration shadows a variable in the global scope [-Werror,-Wshadow])

bob prohaska <[email protected]>
Newsgroups gmane.os.freebsd.devel.arm
Message-ID <[email protected]>
On Fri, Jan 24, 2025 at 10:24:07AM +0100, Ronald Klop wrote:
> Hi Bob,
> 
> I guess a make clean or rm -rf /usr/obj/* might help.
> 
> NB: I can't imagine the error does not say 'which variable' is shadowed. It helps the readers of your mail to copy-paste a little more context.
>
 
Running a simple "make clean" in /usr/src seems to have changed the message.

Here's a more complete excerpt of the latest failure:
....
Building /usr/obj/usr/src/arm.armv7/usr.sbin/jail/jaillex.c
Building /usr/obj/usr/src/arm.armv7/usr.sbin/jail/jaillex.o
/usr/src/usr.sbin/jail/jaillex.l:106:6: error: comparison of integers of different signs: 'int' and 'yy_size_t' (aka 'unsigned int') [-Werror,-Wsign-compare]
  106 |                                         yyless(atvar);
      |                                         ^~~~~~~~~~~~~
jaillex.c:215:9: note: expanded from macro 'yyless'
  215 |         YY_LESS_LINENO(yyless_macro_arg);\
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
jaillex.c:204:36: note: expanded from macro 'YY_LESS_LINENO'
  204 |                 for ( yyl = n; yyl < yyleng; ++yyl )\
      |                                ~~~ ^ ~~~~~~
/usr/src/usr.sbin/jail/jaillex.l:146:5: error: comparison of integers of different signs: 'int' and 'yy_size_t' (aka 'unsigned int') [-Werror,-Wsign-compare]
  146 |                                 yyless(0);
      |                                 ^~~~~~~~~
jaillex.c:215:9: note: expanded from macro 'yyless'
  215 |         YY_LESS_LINENO(yyless_macro_arg);\
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
jaillex.c:204:36: note: expanded from macro 'YY_LESS_LINENO'
  204 |                 for ( yyl = n; yyl < yyleng; ++yyl )\
      |                                ~~~ ^ ~~~~~~
jaillex.c:1906:58: error: unused parameter 'yyscanner' [-Werror,-Wunused-parameter]
 1906 | static void yy_fatal_error (yyconst char* msg , yyscan_t yyscanner)
      |                                                          ^
jaillex.c:2226:43: error: unused parameter 'yyscanner' [-Werror,-Wunused-parameter]
 2226 | void *yyalloc (yy_size_t  size , yyscan_t yyscanner)
      |                                           ^
jaillex.c:2231:58: error: unused parameter 'yyscanner' [-Werror,-Wunused-parameter]
 2231 | void *yyrealloc  (void * ptr, yy_size_t  size , yyscan_t yyscanner)
      |                                                          ^
jaillex.c:2243:36: error: unused parameter 'yyscanner' [-Werror,-Wunused-parameter]
 2243 | void yyfree (void * ptr , yyscan_t yyscanner)
      |                                    ^
6 errors generated.
*** [jaillex.o] Error code 1

make[4]: stopped in /usr/src/usr.sbin/jail


> 
> Van: "Herbert J. Skuhra" <[email protected]>
> Datum: vrijdag, 24 januari 2025 08:04
> Aan: [email protected]
> Onderwerp: Re: Armv7 buildworld puzzle
> > 
> > On Thu, Jan 23, 2025 at 05:14:25PM -0800, bob prohaska wrote:
> > > An attempt to build world on armv7 (PI2 v1.1) keeps getting stuck with:
> > > jaillex.c:850:1: error: declaration shadows a variable in the global scope [-Werror,-Wshadow]
> > >
> > > Repeat git pulls find no updates related to jailex.c and find does not discover
> > > any file in /usr/src by that name.
> > >
> > > Git status reports
> > >
> > > On branch stable/14
> > > Your branch is up to date with 'freebsd/stable/14'.
> > >
> > > Untracked files:
> > >   (use "git add <file>..." to include in what will be committed)
> > >         buildscript
> > >         buildworld.log
> > >         installscript
> > >
> > > I'm mystified, first at the build stoppage and second by the file being
> > > named and quoted but not find-able.
> > >
> > > The system isn't valuable, but if there's an easy fix or workaround
> > > I'd like to try it. The system started life as 12.4. Sources were
> > > replaced with stable/14, a new kernel was built and runs seemingly
> > > ok. To have buildworld fail past the "building everything" mark with
> > > a complaint quoting a file that's not visible is quite baffling.
> > 
> > There are
> > 
> > /usr/src/usr.sbin/jail/jaillex.l
> > and
> > /usr/obj/usr/src/arm64.aarch64/usr.sbin/jail/jaillex.c
> > 
> > The latter is autogenerated during the build.

I did find  /usr/src/usr.sbin/jail/jaillex.l, but note that you're 
citing arm64 while this is on armv7. Guessing both have the same jailex.* ? 

Thanks for writing,

bob prohaska
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.