x86_64-pc-linux-gnu-g++ -fPIC -DHAVE_CONFIG_H -DGLEVN="\"4.2.5\"" -Wno-write-strings -I/usr/include/poppler/glib -I/usr/include/poppler -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libdrm -I/usr/include/libpng16 -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libdrm -I/usr/include/libpng16 -I/usr/include/libpng16 -O2 -pipe -march=native -c ffitcontour.cpp -o ffitcontour.o In file included from ffitcontour.cpp:51:0: /usr/include/stdlib.h:722:12: error: expected unqualified-id before ‘int’ extern int abs (int __x) __THROW __attribute__ ((__const__)) __wur; ^ /usr/include/stdlib.h:722:12: error: expected ‘)’ before ‘int’ ------------------------------------------------------------------- This is an unstable amd64 chroot image at a tinderbox (==build bot) name: 17.0-desktop_20171121-221602 ------------------------------------------------------------------- gcc-config -l: [1] x86_64-pc-linux-gnu-7.2.0 * Available Python interpreters, in order of preference: [1] python3.4 [2] python3.6 (fallback) [3] python2.7 (fallback) [4] pypy (fallback) Available Ruby profiles: [1] ruby22 (with Rubygems) * java-config: The following VMs are available for generation-2: *) IcedTea JDK 3.6.0 [icedtea-bin-8] Available Java Virtual Machines: [1] icedtea-bin-8 system-vm emerge -qpv sci-visualization/gle [ebuild N ] sci-visualization/gle-4.2.5 USE="X jpeg png qt4 tiff -doc -emacs -vim-syntax"
Created attachment 506672 [details] emerge-info.txt
Created attachment 506674 [details] emerge-history.txt
Created attachment 506676 [details] environment
Created attachment 506678 [details] etc.portage.tbz2
Created attachment 506680 [details] logs.tbz2
Created attachment 506682 [details] sci-visualization:gle-4.2.5:20171126-082338.log
Created attachment 506684 [details] temp.tbz2
(In reply to Toralf Förster from comment #0) > In file included from ffitcontour.cpp:51:0: > /usr/include/stdlib.h:722:12: error: expected unqualified-id before ‘int’ > extern int abs (int __x) __THROW __attribute__ ((__const__)) __wur; > ^ > /usr/include/stdlib.h:722:12: error: expected ‘)’ before ‘int’ I see the error is in /usr/include/stdlib.h, not in gle :-) I've just successfully re-compiled gle with gcc-6.4.0. Looks like a problem with gcc-7.2.0.
I have the same problem with gcc-6.4.0 too. I think this is a problem with new profile default/linux/amd64/17.0 this profile enables C++14 I can compile gle if I do this changes! 1.) eselect gcc set gcc-6.4.0 2.) change CXXFLAGS ; CXXFLAGS="-std=c+11" now gle compiles.
I believe this is caused by including headers in the wrong order. The file "src/gle/fitcf.h" defines abs as a macro. The file "src/gle/surface/ffitcontour.cpp" includes the headers in the wrong order, so the macro tries to be applied to the stdlib.h header. Commenting out abs, min, and max from fitcf.h and changing the order of the headers in ffitcontour.cpp (as is done on macos) allows this to compile.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d886010781dc6f67ccf137b8e1397b225238793f commit d886010781dc6f67ccf137b8e1397b225238793f Author: Andrey Grozin <grozin@gentoo.org> AuthorDate: 2018-01-13 08:14:40 +0000 Commit: Andrey Grozin <grozin@gentoo.org> CommitDate: 2018-01-13 08:14:40 +0000 sci-visualization/gle: fix building with -std=c++14 Closes: https://bugs.gentoo.org/638876 Package-Manager: Portage-2.3.19, Repoman-2.3.6 sci-visualization/gle/files/gle-4.2.5-c++14.patch | 27 ++++++++++++++++++++++ .../gle/files/gle-4.2.5-parallel.patch | 20 ++++++++++++++++ sci-visualization/gle/gle-4.2.5-r1.ebuild | 8 +++++-- 3 files changed, 53 insertions(+), 2 deletions(-)