Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 786633 - dev-util/cppcheck-2.2 fails to compile with gcc-11: .../programmemory.cpp: error: numeric_limits is not a member of std
Summary: dev-util/cppcheck-2.2 fails to compile with gcc-11: .../programmemory.cpp: er...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Matthias Maier
URL: https://github.com/danmar/cppcheck/co...
Whiteboard:
Keywords: PATCH, PullRequest
: 815325 (view as bug list)
Depends on:
Blocks: gcc-11
  Show dependency tree
 
Reported: 2021-04-29 05:56 UTC by Agostino Sarubbo
Modified: 2021-11-06 21:45 UTC (History)
7 users (show)

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


Attachments
build.log (build.log,102.94 KB, text/plain)
2021-04-29 05:56 UTC, Agostino Sarubbo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Agostino Sarubbo gentoo-dev 2021-04-29 05:56:40 UTC
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
Comment 1 Agostino Sarubbo gentoo-dev 2021-04-29 05:56:42 UTC
CC'ing also the author of the commit
Comment 2 Agostino Sarubbo gentoo-dev 2021-04-29 05:56:43 UTC
Created attachment 703527 [details]
build.log

build log and emerge --info
Comment 3 Agostino Sarubbo gentoo-dev 2021-04-29 05:56:45 UTC
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’
Comment 4 Sebastian Pipping gentoo-dev 2021-04-29 14:50:53 UTC
(In reply to Agostino Sarubbo from comment #1)
> CC'ing also the author of the commit


Which commit?
Comment 5 Sebastian Pipping gentoo-dev 2021-04-29 14:51:26 UTC
(In reply to Sebastian Pipping from comment #4)
> Which commit?

Found f30d17a1ecae893c8004f06ecc20d51194e7aace, nevermind.
Comment 6 Agostino Sarubbo gentoo-dev 2021-04-29 15:20:34 UTC
(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.
Comment 7 Sergei Trofimovich (RETIRED) gentoo-dev 2021-05-05 07:32:24 UTC
Fixed in https://github.com/danmar/cppcheck/commit/079255d9130c111791ba645d896fdb793f262567 and released as 2.4 and 2.4.1.
Comment 8 Pavel Volkov 2021-05-11 22:03:31 UTC
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()) {
      |                    ~                          ^      ~~~
      |                                               )
Comment 9 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-05-11 22:05:14 UTC
(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.
Comment 10 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-05-11 22:07:35 UTC
(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
Comment 11 Dale Lukas Peterson 2021-05-18 18:20:16 UTC
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.
Comment 12 Dale Lukas Peterson 2021-05-18 18:26:32 UTC
I confirm this "built on my machine" but it would be good to get some other folks testing it on something other than ~amd64.
Comment 13 Dale Lukas Peterson 2021-05-29 21:56:03 UTC
Just checking in since nobody seems to have seen my comment or pull request.
Comment 14 Matthias Maier gentoo-dev 2021-05-30 17:30:34 UTC
(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. :-)
Comment 15 Larry the Git Cow gentoo-dev 2021-05-31 04:03:52 UTC
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(+)
Comment 16 Andreas Sturmlechner gentoo-dev 2021-11-06 21:44:53 UTC
We would likely have less duplicates with meaningful summaries.
Comment 17 Andreas Sturmlechner gentoo-dev 2021-11-06 21:45:06 UTC
*** Bug 815325 has been marked as a duplicate of this bug. ***