Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 788058 - kde-misc/kdiff3-1.9.0 fails with gcc 11.1 error: ‘numeric_limits’ is not a member of ‘std’
Summary: kde-misc/kdiff3-1.9.0 fails with gcc 11.1 error: ‘numeric_limits’ is not a me...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Bernard Cafarelli
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks: gcc-11
  Show dependency tree
 
Reported: 2021-05-04 00:33 UTC by Mike Lothian
Modified: 2021-05-04 22:57 UTC (History)
4 users (show)

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


Attachments
Build log xz compressed (build.log.xz,4.96 KB, application/x-xz)
2021-05-04 00:33 UTC, Mike Lothian
Details
Explicitly include <limits> for gcc-11 (gcc11.patch,251 bytes, patch)
2021-05-04 17:11 UTC, Holger Hoffstätte
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Lothian 2021-05-04 00:33:19 UTC
xmalloc.cpp.o.d -o src/CMakeFiles/kdiff3part.dir/gnudiff_xmalloc.cpp.o -c /var/tmp/portage/kde-misc/kdiff3-1.9.0/work/kdiff3-1.9.0/src/gnudiff_xmalloc.cpp
In file included from /var/tmp/portage/kde-misc/kdiff3-1.9.0/work/kdiff3-1.9.0/src/LineRef.h:10,
                 from /var/tmp/portage/kde-misc/kdiff3-1.9.0/work/kdiff3-1.9.0/src/gnudiff_diff.h:17,
                 from /var/tmp/portage/kde-misc/kdiff3-1.9.0/work/kdiff3-1.9.0/src/gnudiff_xmalloc.cpp:22:
/var/tmp/portage/kde-misc/kdiff3-1.9.0/work/kdiff3-1.9.0/src/LineRef.h: In constructor ‘LineRef::LineRef(qint64)’:
/var/tmp/portage/kde-misc/kdiff3-1.9.0/work/kdiff3-1.9.0/src/TypeUtils.h:15:26: error: ‘numeric_limits’ is not a member of ‘std’
   15 | #define TYPE_MAX(x) std::numeric_limits<x>::max()
      |                          ^~~~~~~~~~~~~~
/var/tmp/portage/kde-misc/kdiff3-1.9.0/work/kdiff3-1.9.0/src/LineRef.h:28:17: note: in expansion of macro ‘TYPE_MAX’
   28 |         if(i <= TYPE_MAX(LineType))
      |                 ^~~~~~~~
/var/tmp/portage/kde-misc/kdiff3-1.9.0/work/kdiff3-1.9.0/src/TypeUtils.h:15:42: error: expected primary-expression before ‘>’ token
   15 | #define TYPE_MAX(x) std::numeric_limits<x>::max()
      |                                          ^
/var/tmp/portage/kde-misc/kdiff3-1.9.0/work/kdiff3-1.9.0/src/LineRef.h:28:17: note: in expansion of macro ‘TYPE_MAX’
   28 |         if(i <= TYPE_MAX(LineType))
      |                 ^~~~~~~~
/var/tmp/portage/kde-misc/kdiff3-1.9.0/work/kdiff3-1.9.0/src/TypeUtils.h:15:45: error: ‘::max’ has not been declared; did you mean ‘std::max’?
   15 | #define TYPE_MAX(x) std::numeric_limits<x>::max()
      |                                             ^~~
/var/tmp/portage/kde-misc/kdiff3-1.9.0/work/kdiff3-1.9.0/src/LineRef.h:28:17: note: in expansion of macro ‘TYPE_MAX’
   28 |         if(i <= TYPE_MAX(LineType))


Reproducible: Always
Comment 1 Mike Lothian 2021-05-04 00:33:38 UTC
Created attachment 705879 [details]
Build log xz compressed
Comment 2 Ionen Wolkens gentoo-dev 2021-05-04 01:09:02 UTC
(please also include emerge --info when reporting these)
Comment 3 Holger Hoffstätte 2021-05-04 17:11:16 UTC
Created attachment 706005 [details, diff]
Explicitly include <limits> for gcc-11
Comment 4 Holger Hoffstätte 2021-05-04 17:12:32 UTC
(In reply to Holger Hoffstätte from comment #3)
> Created attachment 706005 [details, diff] [details, diff]
> Explicitly include <limits> for gcc-11

Patch will also be submitted upstream.
Comment 5 Andreas Sturmlechner gentoo-dev 2021-05-04 17:13:17 UTC
(In reply to Holger Hoffstätte from comment #4)
> Patch will also be submitted upstream.
I was already going to ask ;)

Perfect, thanks in advance. -> https://invent.kde.org/sdk/kdiff3
Comment 6 Holger Hoffstätte 2021-05-04 17:27:42 UTC
(In reply to Andreas Sturmlechner from comment #5)
> (In reply to Holger Hoffstätte from comment #4)
> > Patch will also be submitted upstream.
> I was already going to ask ;)
> 
> Perfect, thanks in advance. -> https://invent.kde.org/sdk/kdiff3

https://invent.kde.org/sdk/kdiff3/-/merge_requests/28
Comment 7 Larry the Git Cow gentoo-dev 2021-05-04 22:57:13 UTC
The bug has been closed via the following commit(s):

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

commit 3812549fcaa4f4e19d67b8286c9d07320c422297
Author:     Andreas Sturmlechner <asturm@gentoo.org>
AuthorDate: 2021-05-04 21:41:32 +0000
Commit:     Andreas Sturmlechner <asturm@gentoo.org>
CommitDate: 2021-05-04 22:56:46 +0000

    kde-misc/kdiff3: Fix build with GCC-11
    
    See also: https://invent.kde.org/sdk/kdiff3/-/merge_requests/28
    
    Upstream commit 0476b1daa73159aec411c7f10da6f313294f0e38
    
    Thanks-to: Holger Hoffstätte <holger@applied-asynchrony.com>
    Closes: https://bugs.gentoo.org/788058
    Package-Manager: Portage-3.0.18, Repoman-3.0.3
    Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>

 kde-misc/kdiff3/files/kdiff3-1.9.0-gcc11.patch | 24 ++++++++++++++++++++++++
 kde-misc/kdiff3/kdiff3-1.9.0.ebuild            |  2 ++
 2 files changed, 26 insertions(+)