Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 787569 - sys-devel/llvm-roc-4.1.0 fails to compile with gcc-11: " 'numeric_limits' is not a member of 'std'"
Summary: sys-devel/llvm-roc-4.1.0 fails to compile with gcc-11: " 'numeric_limits' is ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Craig Andrews
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks: gcc-11
  Show dependency tree
 
Reported: 2021-05-01 22:49 UTC by Jack
Modified: 2021-09-20 17:51 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (gzipped because of size) (llvm-roc-build.log.gz,279.71 KB, application/gzip)
2021-05-01 22:51 UTC, Jack
Details
emerge --info (llvm-roc-emerge.info,18.84 KB, application/x-info)
2021-05-01 22:51 UTC, Jack
Details
patch (llvm-roc-gcc11.patch,363 bytes, patch)
2021-05-01 22:53 UTC, Jack
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jack 2021-05-01 22:49:46 UTC
Discovered during emerge @world with gcc-11.1.0.

Adding 
 #include <stdexcept>
 #include <limits>
to the failing .h file allows emerge to complete successfully.  I got those two lines from a similar bug (different package, not Gentoo) so I don't really know if that's the right fix.  I'll attach the patch file in case it helps.

Reproducible: Always

Steps to Reproduce:
emerge llvm-roc with gcc-11
Actual Results:  
Compile failure with above error

Expected Results:  
Successful emerge
Comment 1 Jack 2021-05-01 22:51:35 UTC
Created attachment 705084 [details]
build.log (gzipped because of size)
Comment 2 Jack 2021-05-01 22:51:56 UTC
Created attachment 705090 [details]
emerge --info
Comment 3 Jack 2021-05-01 22:53:11 UTC
Created attachment 705096 [details, diff]
patch

I don't know if I made the patch from the correct level under .../work/...
Comment 4 cyrillic 2021-05-02 13:41:31 UTC
Thanks for the fix. Adding just <limits> was enough to work for me.

--- a/llvm/utils/benchmark/src/benchmark_register.h	2021-03-29 13:25:18.000000000 -0400
+++ b/llvm/utils/benchmark/src/benchmark_register.h	2021-05-02 09:25:32.705409506 -0400
@@ -1,6 +1,7 @@
 #ifndef BENCHMARK_REGISTER_H
 #define BENCHMARK_REGISTER_H
 
+#include <limits>
 #include <vector>
 
 #include "check.h"
Comment 5 Craig Andrews gentoo-dev 2021-05-02 20:46:21 UTC
Upstream already has this patch: https://github.com/RadeonOpenCompute/llvm-project/commit/b498303066a63a203d24f739b2d2e0e56dca70d1
Comment 6 Larry the Git Cow gentoo-dev 2021-05-02 20:47:46 UTC
The bug has been closed via the following commit(s):

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

commit d2316f6905026dd1d4e8f400d26f5046bb63b6b1
Author:     Craig Andrews <candrews@gentoo.org>
AuthorDate: 2021-05-02 20:46:55 +0000
Commit:     Craig Andrews <candrews@gentoo.org>
CommitDate: 2021-05-02 20:47:42 +0000

    sys-devel/llvm-roc: Fix missing include
    
    Fixes building with GCC 11
    
    Closes: https://bugs.gentoo.org/787569
    Package-Manager: Portage-3.0.18, Repoman-3.0.3
    Signed-off-by: Craig Andrews <candrews@gentoo.org>

 .../files/llvm-roc-4.1.0-fix-missing-include.patch  | 21 +++++++++++++++++++++
 sys-devel/llvm-roc/llvm-roc-4.1.0.ebuild            |  1 +
 sys-devel/llvm-roc/llvm-roc-4.1.1.ebuild            |  1 +
 3 files changed, 23 insertions(+)
Comment 7 Craig Andrews gentoo-dev 2021-05-02 21:11:14 UTC
Thank you for reporting this issue and for sharing the fix for it!
Comment 8 Jack 2021-05-02 21:41:39 UTC
I'm finding more with the same issue/fix.  Is there someplace I can just report them, or do I need to open a new bug for each?
Comment 9 Craig Andrews gentoo-dev 2021-05-02 21:50:08 UTC
(In reply to Jack from comment #8)
> I'm finding more with the same issue/fix.  Is there someplace I can just
> report them, or do I need to open a new bug for each?

Assuming the issue is in different packages, it would be best to report a new bug for each.
Comment 10 Larry the Git Cow gentoo-dev 2021-09-20 17:51:04 UTC
The bug has been referenced in the following commit(s):

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

commit 362024ac2c699a8f0da19fb1777bdd30fd3b99e2
Author:     Andreas K. Hüttel <dilfridge@gentoo.org>
AuthorDate: 2021-09-20 17:37:53 +0000
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: 2021-09-20 17:50:46 +0000

    sys-devel/llvm-roc: Remove old
    
    Bug: https://bugs.gentoo.org/787569
    Package-Manager: Portage-3.0.20, Repoman-3.0.3
    Signed-off-by: Andreas K. Huettel <dilfridge@gentoo.org>

 sys-devel/llvm-roc/Manifest                 |  6 --
 sys-devel/llvm-roc/llvm-roc-3.10.0.ebuild   | 70 ----------------------
 sys-devel/llvm-roc/llvm-roc-3.7.0-r1.ebuild | 63 -------------------
 sys-devel/llvm-roc/llvm-roc-3.8.0.ebuild    | 69 ---------------------
 sys-devel/llvm-roc/llvm-roc-3.9.0.ebuild    | 70 ----------------------
 sys-devel/llvm-roc/llvm-roc-4.0.0-r2.ebuild | 93 -----------------------------
 sys-devel/llvm-roc/llvm-roc-4.0.0.ebuild    | 91 ----------------------------
 sys-devel/llvm-roc/llvm-roc-4.0.1.ebuild    | 93 -----------------------------
 8 files changed, 555 deletions(-)