Linux kernel -stable discussions
 help / color / mirror / Atom feed
* 5.15.x: randomize_layout_plugin.c: 'last_stmt' was not declared in this scope?
@ 2024-07-14 11:30 Thomas Meyer
  2024-07-16 14:08 ` Greg KH
  0 siblings, 1 reply; 4+ messages in thread
From: Thomas Meyer @ 2024-07-14 11:30 UTC (permalink / raw)
  To: stable

Good day,

I wanted to upgrade my kernel to the latest 5.15.162 but it seems to fail with
this error message after upgrading to fedora 40, any ideas what could be the
problem?

$ make
  HOSTCXX scripts/gcc-plugins/randomize_layout_plugin.so
scripts/gcc-plugins/randomize_layout_plugin.c: In function 'bool dominated_by_is_err(const_tree, basic_block)':
scripts/gcc-plugins/randomize_layout_plugin.c:693:20: error: 'last_stmt' was not declared in this scope; did you mean 'call_stmt'?
  693 |         dom_stmt = last_stmt(dom);
      |                    ^~~~~~~~~
      |                    call_stmt
make[2]: *** [scripts/gcc-plugins/Makefile:48: scripts/gcc-plugins/randomize_layout_plugin.so] Error 1
make[1]: *** [scripts/Makefile.build:552: scripts/gcc-plugins] Error 2
make: *** [Makefile:1246: scripts] Error 2

Maybe a problem with gcc 14?

My current kernel was compiled with gcc 13:
[    0.000000] [      T0] Linux version 5.15.160 (thomas2@localhost.localdomain) (gcc (GCC) 13.3.1 20240522 (Red Hat 13.3.1-1), GNU ld version 2.40-14.fc39) #15 PREEMPT Sat Jun 1 16:54:27 CEST 2024

$ gcc --version
gcc (GCC) 14.1.1 20240522 (Red Hat 14.1.1-4)

any help appreciated.

with kind regards
thomas

PS: please cc my as I'm not subscribed to the list.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: 5.15.x: randomize_layout_plugin.c: 'last_stmt' was not declared in this scope?
  2024-07-14 11:30 5.15.x: randomize_layout_plugin.c: 'last_stmt' was not declared in this scope? Thomas Meyer
@ 2024-07-16 14:08 ` Greg KH
  2024-07-20 19:54   ` Thomas Meyer
  0 siblings, 1 reply; 4+ messages in thread
From: Greg KH @ 2024-07-16 14:08 UTC (permalink / raw)
  To: Thomas Meyer; +Cc: stable

On Sun, Jul 14, 2024 at 01:30:16PM +0200, Thomas Meyer wrote:
> Good day,
> 
> I wanted to upgrade my kernel to the latest 5.15.162 but it seems to fail with
> this error message after upgrading to fedora 40, any ideas what could be the
> problem?
> 
> $ make
>   HOSTCXX scripts/gcc-plugins/randomize_layout_plugin.so
> scripts/gcc-plugins/randomize_layout_plugin.c: In function 'bool dominated_by_is_err(const_tree, basic_block)':
> scripts/gcc-plugins/randomize_layout_plugin.c:693:20: error: 'last_stmt' was not declared in this scope; did you mean 'call_stmt'?
>   693 |         dom_stmt = last_stmt(dom);
>       |                    ^~~~~~~~~
>       |                    call_stmt
> make[2]: *** [scripts/gcc-plugins/Makefile:48: scripts/gcc-plugins/randomize_layout_plugin.so] Error 1
> make[1]: *** [scripts/Makefile.build:552: scripts/gcc-plugins] Error 2
> make: *** [Makefile:1246: scripts] Error 2
> 
> Maybe a problem with gcc 14?

Maybe, has any previous 5.15.y kernel worked?

> My current kernel was compiled with gcc 13:
> [    0.000000] [      T0] Linux version 5.15.160 (thomas2@localhost.localdomain) (gcc (GCC) 13.3.1 20240522 (Red Hat 13.3.1-1), GNU ld version 2.40-14.fc39) #15 PREEMPT Sat Jun 1 16:54:27 CEST 2024

If you build 5.15.160 with gcc 14 does it also fail?  Doing a 'git
bisect if it does not would be great to track down the offending commit.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: 5.15.x: randomize_layout_plugin.c: 'last_stmt' was not declared in this scope?
  2024-07-16 14:08 ` Greg KH
@ 2024-07-20 19:54   ` Thomas Meyer
  2024-07-22 12:00     ` Greg KH
  0 siblings, 1 reply; 4+ messages in thread
From: Thomas Meyer @ 2024-07-20 19:54 UTC (permalink / raw)
  To: Greg KH; +Cc: stable

Am Tue, Jul 16, 2024 at 04:08:44PM +0200 schrieb Greg KH:
> On Sun, Jul 14, 2024 at 01:30:16PM +0200, Thomas Meyer wrote:
> > Good day,
> > 
> > I wanted to upgrade my kernel to the latest 5.15.162 but it seems to fail with
> > this error message after upgrading to fedora 40, any ideas what could be the
> > problem?
> > 
> > $ make
> >   HOSTCXX scripts/gcc-plugins/randomize_layout_plugin.so
> > scripts/gcc-plugins/randomize_layout_plugin.c: In function 'bool dominated_by_is_err(const_tree, basic_block)':
> > scripts/gcc-plugins/randomize_layout_plugin.c:693:20: error: 'last_stmt' was not declared in this scope; did you mean 'call_stmt'?
> >   693 |         dom_stmt = last_stmt(dom);
> >       |                    ^~~~~~~~~
> >       |                    call_stmt
> > make[2]: *** [scripts/gcc-plugins/Makefile:48: scripts/gcc-plugins/randomize_layout_plugin.so] Error 1
> > make[1]: *** [scripts/Makefile.build:552: scripts/gcc-plugins] Error 2
> > make: *** [Makefile:1246: scripts] Error 2
> > 
> > Maybe a problem with gcc 14?

This seems to fix the compiler error:
https://lore.kernel.org/all/20230811060545.never.564-kees@kernel.org/

> 
> Maybe, has any previous 5.15.y kernel worked?
> 
> > My current kernel was compiled with gcc 13:
> > [    0.000000] [      T0] Linux version 5.15.160 (thomas2@localhost.localdomain) (gcc (GCC) 13.3.1 20240522 (Red Hat 13.3.1-1), GNU ld version 2.40-14.fc39) #15 PREEMPT Sat Jun 1 16:54:27 CEST 2024
> 
> If you build 5.15.160 with gcc 14 does it also fail?  Doing a 'git
> bisect if it does not would be great to track down the offending commit.
> 
> thanks,
> 
> greg k-h

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: 5.15.x: randomize_layout_plugin.c: 'last_stmt' was not declared in this scope?
  2024-07-20 19:54   ` Thomas Meyer
@ 2024-07-22 12:00     ` Greg KH
  0 siblings, 0 replies; 4+ messages in thread
From: Greg KH @ 2024-07-22 12:00 UTC (permalink / raw)
  To: Thomas Meyer; +Cc: stable

On Sat, Jul 20, 2024 at 09:54:30PM +0200, Thomas Meyer wrote:
> Am Tue, Jul 16, 2024 at 04:08:44PM +0200 schrieb Greg KH:
> > On Sun, Jul 14, 2024 at 01:30:16PM +0200, Thomas Meyer wrote:
> > > Good day,
> > > 
> > > I wanted to upgrade my kernel to the latest 5.15.162 but it seems to fail with
> > > this error message after upgrading to fedora 40, any ideas what could be the
> > > problem?
> > > 
> > > $ make
> > >   HOSTCXX scripts/gcc-plugins/randomize_layout_plugin.so
> > > scripts/gcc-plugins/randomize_layout_plugin.c: In function 'bool dominated_by_is_err(const_tree, basic_block)':
> > > scripts/gcc-plugins/randomize_layout_plugin.c:693:20: error: 'last_stmt' was not declared in this scope; did you mean 'call_stmt'?
> > >   693 |         dom_stmt = last_stmt(dom);
> > >       |                    ^~~~~~~~~
> > >       |                    call_stmt
> > > make[2]: *** [scripts/gcc-plugins/Makefile:48: scripts/gcc-plugins/randomize_layout_plugin.so] Error 1
> > > make[1]: *** [scripts/Makefile.build:552: scripts/gcc-plugins] Error 2
> > > make: *** [Makefile:1246: scripts] Error 2
> > > 
> > > Maybe a problem with gcc 14?
> 
> This seems to fix the compiler error:
> https://lore.kernel.org/all/20230811060545.never.564-kees@kernel.org/

Ah, this is a gcc14 issue.  I'll backport this, but odds are you will
have other problems using this compiler with such an old kernel tree.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-07-22 12:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-14 11:30 5.15.x: randomize_layout_plugin.c: 'last_stmt' was not declared in this scope? Thomas Meyer
2024-07-16 14:08 ` Greg KH
2024-07-20 19:54   ` Thomas Meyer
2024-07-22 12:00     ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox