Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 732700 - =net-libs/libproxy-0.4.15-r1 fails to build with gcc-11 (and -std=c++17)
Summary: =net-libs/libproxy-0.4.15-r1 fails to build with gcc-11 (and -std=c++17)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Freedesktop bugs
URL: https://github.com/libproxy/libproxy/...
Whiteboard:
Keywords: PATCH
: 732774 (view as bug list)
Depends on:
Blocks: gcc-11
  Show dependency tree
 
Reported: 2020-07-15 07:32 UTC by Sergei Trofimovich (RETIRED)
Modified: 2020-10-11 09:22 UTC (History)
1 user (show)

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


Attachments
libproxy-0.4.15-gcc-11.patch (libproxy-0.4.15-gcc-11.patch,3.76 KB, patch)
2020-08-20 07:27 UTC, Sergei Trofimovich (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sergei Trofimovich (RETIRED) gentoo-dev 2020-07-15 07:32:22 UTC
gcc-11 will enable -std=c++17 by default. This makes a few statements illegal.

libproxy will fails to build as:

$ CC=gcc-10.1.0 CXX='g++-10.1.0 -std=c++17' MAKEOPTS=-j1 ebuild libproxy-0.4.15-r1.ebuild install
...
[34/54] /usr/lib/ccache/bin/g++-10.1.0 -std=c++17 -m32 -D_POSIX_C_SOURCE=200112L -Dlibproxy_EXPORTS -I/tmp/portage/net-libs/libproxy-0.4.15-r1/work/libproxy-0.4.15  -fvisibility=hidden -march=sandybridge -mtune=sandybridge -maes --param=l1-cache-size=32 --param=l1-cache-line-size=64 --param=l2-cache-size=8192 -O2 -pipe -fdiagnostics-show-option -frecord-gcc-switches -Wall -Wextra -Wstack-protector -frecord-gcc-switches -frecord-gcc-switches -fPIC -MD -MT libproxy/CMakeFiles/libproxy.dir/extension_config.cpp.o -MF libproxy/CMakeFiles/libproxy.dir/extension_config.cpp.o.d -o libproxy/CMakeFiles/libproxy.dir/extension_config.cpp.o -c /tmp/portage/net-libs/libproxy-0.4.15-r1/work/libproxy-0.4.15/libproxy/extension_config.cpp
FAILED: libproxy/CMakeFiles/libproxy.dir/extension_config.cpp.o
/usr/lib/ccache/bin/g++-10.1.0 -std=c++17 -m32 -D_POSIX_C_SOURCE=200112L -Dlibproxy_EXPORTS -I/tmp/portage/net-libs/libproxy-0.4.15-r1/work/libproxy-0.4.15  -fvisibility=hidden -march=sandybridge -mtune=sandybridge -maes --param=l1-cache-size=32 --param=l1-cache-line-size=64 --param=l2-cache-size=8192 -O2 -pipe -fdiagnostics-show-option -frecord-gcc-switches -Wall -Wextra -Wstack-protector -frecord-gcc-switches -frecord-gcc-switches -fPIC -MD -MT libproxy/CMakeFiles/libproxy.dir/extension_config.cpp.o -MF libproxy/CMakeFiles/libproxy.dir/extension_config.cpp.o.d -o libproxy/CMakeFiles/libproxy.dir/extension_config.cpp.o -c /tmp/portage/net-libs/libproxy-0.4.15-r1/work/libproxy-0.4.15/libproxy/extension_config.cpp
In file included from /tmp/portage/net-libs/libproxy-0.4.15-r1/work/libproxy-0.4.15/libproxy/extension_config.hpp:24,
                 from /tmp/portage/net-libs/libproxy-0.4.15-r1/work/libproxy-0.4.15/libproxy/extension_config.cpp:20:
/tmp/portage/net-libs/libproxy-0.4.15-r1/work/libproxy-0.4.15/libproxy/url.hpp:53:25: error: ISO C++17 does not allow dynamic exception specifications
   53 |  url(const string& url) throw (parse_error);
      |                         ^~~~~
/tmp/portage/net-libs/libproxy-0.4.15-r1/work/libproxy-0.4.15/libproxy/url.hpp:56:29: error: ISO C++17 does not allow dynamic exception specifications
   56 |  url& operator=(string url) throw (parse_error);
      |                             ^~~~~
In file included from /tmp/portage/net-libs/libproxy-0.4.15-r1/work/libproxy-0.4.15/libproxy/extension_config.cpp:20:
/tmp/portage/net-libs/libproxy-0.4.15-r1/work/libproxy-0.4.15/libproxy/extension_config.hpp:34:54: error: ISO C++17 does not allow dynamic exception specifications
   34 |  virtual vector<url>      get_config(const url &dst) throw (runtime_error)=0;
      |                                                      ^~~~~
ninja: build stopped: subcommand failed.
Comment 1 Stephan Hartmann (RETIRED) gentoo-dev 2020-07-15 19:09:49 UTC
*** Bug 732774 has been marked as a duplicate of this bug. ***
Comment 2 Sergei Trofimovich (RETIRED) gentoo-dev 2020-08-20 07:27:25 UTC
Created attachment 655664 [details, diff]
libproxy-0.4.15-gcc-11.patch
Comment 3 Sergei Trofimovich (RETIRED) gentoo-dev 2020-09-10 21:14:51 UTC
Accepted upstream as https://github.com/libproxy/libproxy/commit/7bb025d6950deded9dbbf6145f55fb909936cf9d.patch
Comment 4 Larry the Git Cow gentoo-dev 2020-10-11 09:22:53 UTC
The bug has been closed via the following commit(s):

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

commit eb13aa137fcda3e70a82a877aef671a9c7860634
Author:     Sergei Trofimovich <slyfox@gentoo.org>
AuthorDate: 2020-10-11 09:22:26 +0000
Commit:     Sergei Trofimovich <slyfox@gentoo.org>
CommitDate: 2020-10-11 09:22:26 +0000

    net-libs/libproxy: fix build on c++17 compiler (gcc-11)
    
    Closes: https://bugs.gentoo.org/732700
    Package-Manager: Portage-3.0.8, Repoman-3.0.1
    Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>

 .../libproxy/files/libproxy-0.4.15-gcc-11.patch    | 118 +++++++++++++++++++++
 net-libs/libproxy/libproxy-0.4.15-r2.ebuild        |  86 +++++++++++++++
 2 files changed, 204 insertions(+)