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

Bug 811360

Summary: dev-util/intel-graphics-compiler-1.0.8517 fails to compile with gcc-11
Product: Gentoo Linux Reporter: Agostino Sarubbo <ago>
Component: Current packagesAssignee: Jan Henke <gentoo>
Status: RESOLVED FIXED    
Severity: normal CC: b.buschinski, conikost, ionen, proxy-maint, sam
Priority: Normal Keywords: PATCH
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 732706    
Attachments: build.log.xz
intel-graphics-compiler-limits2.patch

Description Agostino Sarubbo gentoo-dev 2021-09-01 21:28:11 UTC
https://blogs.gentoo.org/ago/2020/07/04/gentoo-tinderbox/

Issue: dev-util/intel-graphics-compiler-1.0.8517 fails to compile with gcc-11.
Discovered on: amd64 (internal ref: ci)

NOTE:
This machine uses GCC-11: https://gcc.gnu.org/gcc-11/porting_to.html
Comment 1 Agostino Sarubbo gentoo-dev 2021-09-01 21:28:14 UTC
Created attachment 737083 [details]
build.log.xz

build log and emerge --info (compressed because it exceeds attachment limit, use 'xzless' to read it)
Comment 2 Agostino Sarubbo gentoo-dev 2021-09-01 21:28:16 UTC
Possible context of error(s):

/var/tmp/portage/dev-util/intel-graphics-compiler-1.0.8517/work/intel-graphics-compiler-igc-1.0.8517/visa/Passes/InstCombine.cpp:304:33: error: ‘numeric_limits’ is not a member of ‘std’
Comment 3 Conrad Kostecki gentoo-dev 2021-09-02 23:12:14 UTC
Hm, I am kind of out of ideas. I just cannot reproduce. Just compiles fine for me.
Comment 4 Jan Henke 2021-09-03 07:57:16 UTC
Indeed strange. We explicitly added an upstream patch (intel-graphics-compiler-1.0.8173-fix-missing-limits.patch) to fix this problem and I have not encountered it since then. So I am also quite at a loss how this happens again.
Comment 5 Ionen Wolkens gentoo-dev 2021-09-03 08:02:00 UTC
I just tried it here, and ran into the same:

InstCombine.cpp:304:33: error: 'numeric_limits' is not a member of 'std'
  304 |                 if (imm >= std::numeric_limits<int32_t>::min() ||
      |                                 ^~~~~~~~~~~~~~

Try on a more minimal system maybe? It's possible this only gets used under certain conditions (like is this file getting compiled in your logs?). Comparing what cmake reports with yours and the log here may say something too.
Comment 6 Ionen Wolkens gentoo-dev 2021-09-03 08:04:38 UTC
Note that the patch only affects RegDeps.cpp, not InstCombine.cpp
Comment 7 Bernd Buschinski 2021-09-03 14:05:04 UTC
Created attachment 737221 [details, diff]
intel-graphics-compiler-limits2.patch

Patch taken from https://github.com/intel/intel-graphics-compiler/pull/201

Works fine here with GCC 11 (with the patch).
Comment 8 Conrad Kostecki gentoo-dev 2021-09-03 18:20:04 UTC
Allright, I managed finally to reproduce.
Comment 9 Larry the Git Cow gentoo-dev 2021-09-03 18:25:06 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ec5cbbffdf1930b657578af501687a2e0c3eb329

commit ec5cbbffdf1930b657578af501687a2e0c3eb329
Author:     Conrad Kostecki <conikost@gentoo.org>
AuthorDate: 2021-09-03 18:19:47 +0000
Commit:     Conrad Kostecki <conikost@gentoo.org>
CommitDate: 2021-09-03 18:24:59 +0000

    dev-util/intel-graphics-compiler: fix compilation
    
    This patch adds missing limits include,
    so compilation won't fail with GCC11.
    
    Closes: https://bugs.gentoo.org/811360
    Package-Manager: Portage-3.0.22, Repoman-3.0.3
    Signed-off-by: Conrad Kostecki <conikost@gentoo.org>

 ...phics-compiler-1.0.8517-fix-missing-limits.patch | 21 +++++++++++++++++++++
 .../intel-graphics-compiler-1.0.8517.ebuild         |  1 +
 2 files changed, 22 insertions(+)