Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 638876 - sci-visualization/gle-4.2.5 with sys-devel/gcc-7.2.0 : /.../stdlib.h:722:12: error: expected unqualified-id before int
Summary: sci-visualization/gle-4.2.5 with sys-devel/gcc-7.2.0 : /.../stdlib.h:722:12: ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Andrey Grozin
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: gcc-6
  Show dependency tree
 
Reported: 2017-11-26 10:09 UTC by Toralf Förster
Modified: 2018-01-13 08:15 UTC (History)
2 users (show)

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


Attachments
emerge-info.txt (emerge-info.txt,15.97 KB, text/plain)
2017-11-26 10:09 UTC, Toralf Förster
Details
emerge-history.txt (emerge-history.txt,208.79 KB, text/plain)
2017-11-26 10:10 UTC, Toralf Förster
Details
environment (environment,114.24 KB, text/plain)
2017-11-26 10:10 UTC, Toralf Förster
Details
etc.portage.tbz2 (etc.portage.tbz2,12.62 KB, application/x-bzip)
2017-11-26 10:10 UTC, Toralf Förster
Details
logs.tbz2 (logs.tbz2,6.66 KB, application/x-bzip)
2017-11-26 10:10 UTC, Toralf Förster
Details
sci-visualization:gle-4.2.5:20171126-082338.log (sci-visualization:gle-4.2.5:20171126-082338.log,46.25 KB, text/plain)
2017-11-26 10:10 UTC, Toralf Förster
Details
temp.tbz2 (temp.tbz2,32.40 KB, application/x-bzip)
2017-11-26 10:10 UTC, Toralf Förster
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Toralf Förster gentoo-dev 2017-11-26 10:09:55 UTC
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"
Comment 1 Toralf Förster gentoo-dev 2017-11-26 10:09:58 UTC
Created attachment 506672 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2017-11-26 10:10:02 UTC
Created attachment 506674 [details]
emerge-history.txt
Comment 3 Toralf Förster gentoo-dev 2017-11-26 10:10:05 UTC
Created attachment 506676 [details]
environment
Comment 4 Toralf Förster gentoo-dev 2017-11-26 10:10:08 UTC
Created attachment 506678 [details]
etc.portage.tbz2
Comment 5 Toralf Förster gentoo-dev 2017-11-26 10:10:11 UTC
Created attachment 506680 [details]
logs.tbz2
Comment 6 Toralf Förster gentoo-dev 2017-11-26 10:10:14 UTC
Created attachment 506682 [details]
sci-visualization:gle-4.2.5:20171126-082338.log
Comment 7 Toralf Förster gentoo-dev 2017-11-26 10:10:17 UTC
Created attachment 506684 [details]
temp.tbz2
Comment 8 Andrey Grozin gentoo-dev 2017-11-26 12:44:40 UTC
(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.
Comment 9 Bernd Martin Wollny 2018-01-06 11:46:15 UTC
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.
Comment 10 Jeremy Stent 2018-01-07 04:15:39 UTC
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.
Comment 11 Larry the Git Cow gentoo-dev 2018-01-13 08:15:15 UTC
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(-)