media-gfx/gmic-1.5.0.7 fails to emerge relevant output from build log: ******************************************************** ... x86_64-pc-linux-gnu-g++ -o gmic_char.o -c gmic.cpp -Dgmic_separate_compilation -Dgmic_char -march=core2 -O2 -pipe -fno-strict-aliasing -Dgmic_build -I/usr/include -Dcimg_ display=1 -Dcimg_appname=\"gmic\" -I/usr/X11R6/include -Dcimg_use_xshm -Dcimg_use_png -Dcimg_use_jpeg -Dcimg_use_tiff -Dcimg_use_zlib -Dcimg_use_fftw3 -Dcimg_use_openexr -I/usr/include/OpenEXR -Dcimg_use_magick -I/usr/include/GraphicsMagick -Dcimg_use_ffmpeg -D__STDC_CONSTANT_MACROS -I/usr/include/libavcodec -I/usr/include/libavformat -I/u sr/include/libswscale -I/usr/include/ffmpeg -Dcimg_use_opencv -I/usr/include/opencv In file included from /usr/include/opencv2/flann/dynamic_bitset.h:46:0, from /usr/include/opencv2/flann/kdtree_index.h:41, from /usr/include/opencv2/flann/all_indices.h:36, from /usr/include/opencv2/flann/flann_base.hpp:44, from /usr/include/opencv2/flann/flann.hpp:50, from /usr/include/opencv/cv.h:69, from ./CImg.h:238, from gmic.h:71, from gmic.cpp:789: /usr/include/opencv2/flann/dist.h:82:7: error: expected identifier before numeric constant /usr/include/opencv2/flann/dist.h:82:7: error: expected unqualified-id before numeric constant /usr/include/opencv2/flann/dist.h:86:7: error: expected identifier before numeric constant /usr/include/opencv2/flann/dist.h:86:7: error: expected unqualified-id before numeric constant ****************************************** When I look at the file /usr/include/opencv2/flann/dist.h I see around line 82 that two empty classes named "True" and "False" are defined. I suspect that a header file where "True" and "False" are #defined is getting picked up. One my machine I see a few possible candidates: find . -exec grep "define[[:space:]]*True" {} \; -print #define True ((Bool)1) ./valgrind/libvex_basictypes.h #define True 1 ./X11/ICE/ICElib.h #define True 1 ./X11/Xlib.h #define True 1 ./X11/extensions/XKBsrv.h # define True 1L ./X11/extensions/xtrapdi.h #define True 1 ./X11/fonts/FSlib.h #define TrueColor 4 ./X11/X.h #define True true ./UsageEnvironment/Boolean.hh #define TrueColorMask (1 << TrueColor) ./xorg/micmap.h # define True 1 ./libAfterImage/xwrap.h #define True 1 ./qhull/libqhull.h I also note that /usr/include/opencv2/flann/dist.h belongs to media-libs/opencv-2.3.1a so one could argue that the problem lies there, and that it is the package that needs to be fixed ... although it emerges cleanly. Substituting "IsTrue" and "IsFalse" for "True" and "False" would probably eliminate the issue, although I have not found the time to check this. Reproducible: Always
Created attachment 295139 [details] Complete build log
Created attachment 295141 [details] emerge --info
unmasking this package and emerging with default use flags plus (ffmpeg fftw graphicsmagick opencv openxr) builds ok on amd64 - may help with narrowing down where problem lies.
Looks like bug #392321 but probably isn't.
Created attachment 295225 [details, diff] patch for opencv This patch renames the empty classes "True" and "False" in the opencv 2.3.1a source to XTrue and XFalse. After applying this this fix to opencv, gmic compiles. I will file a bug for opencv since it is really the culprit.
@Tim: I added the patch to opencv-2.3.1a-r1, you can DEPEND on this version and then the problem should be fixed.
(In reply to comment #6) > @Tim: I added the patch to opencv-2.3.1a-r1, you can DEPEND on this version and > then the problem should be fixed. Done.