Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 905140

Summary: sys-kernel/gentoo-sources-5.10.179 error: use of enum ‘gsi_iterator_update’ without previous declaration
Product: Gentoo Linux Reporter: email200202
Component: Current packagesAssignee: Gentoo Kernel Bug Wranglers and Kernel Maintainers <kernel>
Status: RESOLVED FIXED    
Severity: normal Keywords: InVCS
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
URL: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e6a71160cc145e18ab45195abf89884112e02dfb
Whiteboard: 5.10.180
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 865117    
Attachments: compile-messages.txt

Description email200202 2023-04-27 05:36:33 UTC
kernel sys-kernel/gentoo-sources-5.10.179 failed to compile with these messages:

(The full compiler messages is attached)

/usr/lib/gcc/x86_64-pc-linux-gnu/13/plugin/include/gimple-fold.h:72:32: error: use of enum ‘gsi_iterator_update’ without previous declaration
   72 |                           enum gsi_iterator_update,
      |                                ^~~~~~~~~~~~~~~~~~~

/usr/lib/gcc/x86_64-pc-linux-gnu/13/plugin/include/gimple-fold.h:87:30: error: there are no arguments to ‘gsi_last’ that depend on a template parameter, so a declaration of ‘gsi_last’ must be available [-fpermissive]
   87 |   gimple_stmt_iterator gsi = gsi_last (*seq);

/usr/lib/gcc/x86_64-pc-linux-gnu/13/plugin/include/gimple-fold.h:88:37: error: ‘GSI_CONTINUE_LINKING’ was not declared in this scope
   88 |   return gimple_build (&gsi, false, GSI_CONTINUE_LINKING,
      |                                     ^~~~~~~~~~~~~~~~~~~~

/usr/lib/gcc/x86_64-pc-linux-gnu/13/plugin/include/gimple-fold.h:211:24: error: variable ‘gimple_stmt_iterator gsi’ has initializer but incomplete type
  211 |   gimple_stmt_iterator gsi = gsi_last (*seq);
      |                        ^~~



Reproducible: Always

Steps to Reproduce:
1. emerge --sync
2. emerge -auvDN world
3. build the new kernel
Actual Results:  
failed

Expected Results:  
not to fail
Comment 1 email200202 2023-04-27 05:37:27 UTC
Created attachment 860836 [details]
compile-messages.txt
Comment 3 email200202 2023-04-27 08:46:11 UTC
The kernel compiles successfully after downgrading to sys-devel/gcc-12.2.1_p20230304
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-04-27 13:24:09 UTC
(In reply to email200202 from comment #3)
> The kernel compiles successfully after downgrading to
> sys-devel/gcc-12.2.1_p20230304

Please don't do that. Does the patch I linked help?
Comment 5 Mike Pagano gentoo-dev 2023-04-27 14:13:59 UTC
Tested the patch successfully

commit 641f7c504ff4f220e1772e636b50703be7fd0645 (HEAD -> 5.10, origin/5.10)
Author: Mike Pagano <mpagano@gentoo.org>
Date:   Thu Apr 27 10:11:23 2023 -0400

    gcc-plugins: Reorganize gimple includes for GCC 13
    
    Bug: https://bugs.gentoo.org/905140
    
    Signed-off-by: Mike Pagano <mpagano@gentoo.org>


This will be in the next version of 5.10 Gentoo kernels that use the genpatches patchset.