https://blogs.gentoo.org/ago/2020/07/04/gentoo-tinderbox/ Issue: dev-util/cppcheck-2.2 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
CC'ing also the author of the commit
Created attachment 703527 [details] build.log build log and emerge --info
Possible context of error(s): /var/tmp/portage/dev-util/cppcheck-2.2/work/cppcheck-2.2/lib/programmemory.cpp:475:44: error: ‘numeric_limits’ is not a member of ‘std’
(In reply to Agostino Sarubbo from comment #1) > CC'ing also the author of the commit Which commit?
(In reply to Sebastian Pipping from comment #4) > Which commit? Found f30d17a1ecae893c8004f06ecc20d51194e7aace, nevermind.
(In reply to Sebastian Pipping from comment #4) > (In reply to Agostino Sarubbo from comment #1) > > CC'ing also the author of the commit > > > Which commit? Hi, sorry for the noise. Basically the problem is: Ci is analyzing commit X, for package Y. During this merge the dependence Z fails so the committer is CC'ed. Now I rewritten this logic and there is a comparison between the package that fails and the package related to the commit.
Fixed in https://github.com/danmar/cppcheck/commit/079255d9130c111791ba645d896fdb793f262567 and released as 2.4 and 2.4.1.
This fix is not enough, 2.4.1 still does not compile here: /var/tmp/portage/dev-util/cppcheck-2.4.1/work/cppcheck-2.4.1/lib/symboldatabase.cpp: In member function ‘void SymbolDatabase::createSymbolDatabaseExprIds()’: /var/tmp/portage/dev-util/cppcheck-2.4.1/work/cppcheck-2.4.1/lib/symboldatabase.cpp:1443:32: error: ‘numeric_limits’ is not a member of ‘std’ 1443 | if (id == std::numeric_limits<nonneg int>::max()) { | ^~~~~~~~~~~~~~ /var/tmp/portage/dev-util/cppcheck-2.4.1/work/cppcheck-2.4.1/lib/symboldatabase.cpp:1443:54: error: expected primary-expression before ‘int’ 1443 | if (id == std::numeric_limits<nonneg int>::max()) { | ^~~ /var/tmp/portage/dev-util/cppcheck-2.4.1/work/cppcheck-2.4.1/lib/symboldatabase.cpp:1443:47: error: expected ‘)’ before ‘int’ 1443 | if (id == std::numeric_limits<nonneg int>::max()) { | ~ ^ ~~~ | )
(In reply to Pavel Volkov from comment #8) > This fix is not enough, 2.4.1 still does not compile here: > Please report that upstream.
(In reply to Sam James from comment #9) > (In reply to Pavel Volkov from comment #8) > > This fix is not enough, 2.4.1 still does not compile here: > > > > Please report that upstream. https://github.com/danmar/cppcheck/commit/8d6828847bd0cae59428289adafd94673517d184
I opened a pull request to add cppcheck-2.4.1 here: https://github.com/gentoo/gentoo/pull/20874 I'm still testing it but it does pull in the patch that fixes the issue mentioned in comment 8.
I confirm this "built on my machine" but it would be good to get some other folks testing it on something other than ~amd64.
Just checking in since nobody seems to have seen my comment or pull request.
(In reply to Dale Lukas Peterson from comment #13) > Just checking in since nobody seems to have seen my comment or pull request. Thanks for the ping. I put it on my todo list for today. :-)
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cd42cd0ed94bf92cf0719487596755402cc6c32a commit cd42cd0ed94bf92cf0719487596755402cc6c32a Author: Luke Peterson <hazelnusse@gmail.com> AuthorDate: 2021-05-18 18:10:25 +0000 Commit: Matthias Maier <tamiko@gentoo.org> CommitDate: 2021-05-31 03:59:37 +0000 dev-util/cppcheck: Add version 2.4.1 Closes: https://bugs.gentoo.org/786633 Closes: https://github.com/gentoo/gentoo/pull/20874 Signed-off-by: Dale Lukas Peterson <hazelnusse@gmail.com> Signed-off-by: Matthias Maier <tamiko@gentoo.org> dev-util/cppcheck/Manifest | 1 + dev-util/cppcheck/cppcheck-2.4.1.ebuild | 84 ++++++++++++++++++++++ .../cppcheck/files/cppcheck-2.4.1-limits.patch | 12 ++++ 3 files changed, 97 insertions(+)
We would likely have less duplicates with meaningful summaries.
*** Bug 815325 has been marked as a duplicate of this bug. ***