In file included from agg_line_profile_aa.cpp:25: ../include/agg_renderer_outline_aa.h: In member function ‘agg::line_profile_aa& agg::renderer_outline_aa<BaseRenderer>::profile()’: ../include/agg_renderer_outline_aa.h:1378:45: error: binding reference of type ‘agg::line_profile_aa&’ to ‘const agg::line_profile_aa’ discards qualifiers line_profile_aa& profile() { return *m_profile; } ^~~~~~~~~~ make[2]: *** [Makefile:586: agg_line_profile_aa.lo] Error 1 ------------------------------------------------------------------- This is an unstable amd64 chroot image at a tinderbox (==build bot) name: 17.0_libressl_20180811-095538 ------------------------------------------------------------------- gcc-config -l: [1] x86_64-pc-linux-gnu-7.3.0 [2] x86_64-pc-linux-gnu-7.3.1 [3] x86_64-pc-linux-gnu-8.2.0 * Available Python interpreters, in order of preference: [1] python3.7 [2] python3.6 [3] python2.7 (fallback) [4] pypy3 (fallback) [5] pypy (fallback) Available Ruby profiles: [1] ruby23 (with Rubygems) * java-config: The following VMs are available for generation-2: emerge -qpv x11-libs/agg [ebuild N ] x11-libs/agg-2.5-r3 USE="X gpc truetype -sdl -static-libs"
Created attachment 544062 [details] emerge-info.txt
Created attachment 544064 [details] emerge-history.txt
Created attachment 544066 [details] environment
Created attachment 544068 [details] etc.portage.tbz2
Created attachment 544070 [details] logs.tbz2
Created attachment 544072 [details] temp.tbz2
Created attachment 544074 [details] x11-libs:agg-2.5-r3:20180819-210543.log
Duplicate: https://bugs.gentoo.org/656970
This problem was first encountered by matplotlib users when compiling it with clang in 2011, apparently the old GCCs don't strictly enforce the rule. Just add a single "const" keyword will fix the problem, see this patch. https://github.com/mdboom/matplotlib/commit/3b0f5959bbea065b07538f9952ae520ab5a06c27
Created attachment 544868 [details, diff] fix const qualifier I ported the patch and applied it, now it compiles perfectly.
*** Bug 656970 has been marked as a duplicate of this bug. ***
[master 66a47798fa3d] x11-libs/agg: Fix build with gcc8 (#664078) 2 files changed, 29 insertions(+), 4 deletions(-) create mode 100644 x11-libs/agg/files/agg-2.5-gcc8.patch