Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 786849 - dev-libs/libfilezilla-0.27.1 fails to compile with gcc-11 - buffer.cpp:46:34: error: ‘numeric_limits’ is not a member of ‘std’
Summary: dev-libs/libfilezilla-0.27.1 fails to compile with gcc-11 - buffer.cpp:46:34:...
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
: 788241 (view as bug list)
Depends on:
Blocks: gcc-11
  Show dependency tree
 
Reported: 2021-04-29 14:39 UTC by jospezial
Modified: 2021-05-04 22:27 UTC (History)
5 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description jospezial 2021-04-29 14:39:31 UTC
upstream fix:
https://svn.filezilla-project.org/filezilla/libfilezilla/trunk/lib/buffer.cpp?r1=10031&r2=10225&pathrev=10225

buffer.cpp: In member function ‘unsigned char* fz::buffer::get(size_t)’:
buffer.cpp:46:34: error: ‘numeric_limits’ is not a member of ‘std’
   46 |                         if (std::numeric_limits<size_t>::max() - capacity_ < write_size) {
      |                                  ^~~~~~~~~~~~~~
buffer.cpp:46:55: error: expected primary-expression before ‘>’ token
   46 |                         if (std::numeric_limits<size_t>::max() - capacity_ < write_size) {
      |                                                       ^
buffer.cpp:46:58: error: ‘::max’ has not been declared; did you mean ‘std::max’?
   46 |                         if (std::numeric_limits<size_t>::max() - capacity_ < write_size) {
      |                                                          ^~~
      |                                                          std::max
In file included from /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/include/g++-v11/algorithm:62,
                 from libfilezilla/string.hpp:6,
                 from libfilezilla/libfilezilla.hpp:7,
                 from libfilezilla/buffer.hpp:4,
                 from buffer.cpp:1:
/usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/include/g++-v11/bits/stl_algo.h:3467:5: note: ‘std::max’ declared here
 3467 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
buffer.cpp: In member function ‘void fz::buffer::append(const unsigned char*, size_t)’:
buffer.cpp:140:34: error: ‘numeric_limits’ is not a member of ‘std’
  140 |                         if (std::numeric_limits<size_t>::max() - capacity_ < len) {
      |                                  ^~~~~~~~~~~~~~
buffer.cpp:140:55: error: expected primary-expression before ‘>’ token
  140 |                         if (std::numeric_limits<size_t>::max() - capacity_ < len) {
      |                                                       ^
buffer.cpp:140:58: error: ‘::max’ has not been declared; did you mean ‘std::max’?
  140 |                         if (std::numeric_limits<size_t>::max() - capacity_ < len) {
      |                                                          ^~~
      |                                                          std::max
In file included from /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/include/g++-v11/algorithm:62,
                 from libfilezilla/string.hpp:6,
                 from libfilezilla/libfilezilla.hpp:7,
                 from libfilezilla/buffer.hpp:4,
                 from buffer.cpp:1:
/usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/include/g++-v11/bits/stl_algo.h:3467:5: note: ‘std::max’ declared here
Comment 1 Sam James archtester gentoo-dev Security 2021-04-29 14:46:50 UTC
Please always attach the full build.log and emerge --info just in case.
Comment 2 Bernard Cafarelli gentoo-dev 2021-05-04 18:32:28 UTC
Thanks for the bugreport and patch link! Applying to current ebuild (now that I have gcc-11 installed for testing)
Comment 3 Larry the Git Cow gentoo-dev 2021-05-04 18:34:05 UTC
The bug has been closed via the following commit(s):

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

commit 19aa48d782721210f4e33e79eb21b8b232799ab1
Author:     Bernard Cafarelli <voyageur@gentoo.org>
AuthorDate: 2021-05-04 18:33:42 +0000
Commit:     Bernard Cafarelli <voyageur@gentoo.org>
CommitDate: 2021-05-04 18:33:42 +0000

    dev-libs/libfilezilla: fix compilation with gcc 11
    
    Closes: https://bugs.gentoo.org/786849
    Package-Manager: Portage-3.0.18, Repoman-3.0.3
    Signed-off-by: Bernard Cafarelli <voyageur@gentoo.org>

 dev-libs/libfilezilla/files/libfilezilla-0.27.1-gcc11.patch | 10 ++++++++++
 dev-libs/libfilezilla/libfilezilla-0.27.1.ebuild            |  2 ++
 2 files changed, 12 insertions(+)
Comment 4 Sam James archtester gentoo-dev Security 2021-05-04 22:27:13 UTC
*** Bug 788241 has been marked as a duplicate of this bug. ***