Platform is Gentoo Prefix on SUSE Enterprise 10 SP2. media-libs/gegl-0.1.6 fails to emerge, which in turn stops gimp from being emerged. The console output looks like: reinhard05.c: In function 'reinhard05_stats_start': reinhard05.c:88: error: 'NAN' undeclared (first use in this function) reinhard05.c:88: error: (Each undeclared identifier is reported only once reinhard05.c:88: error: for each function it appears in.) make[4]: *** [reinhard05.la] Error 1 make[4]: Leaving directory `/local/scratch/portage/media-libs/gegl-0.1.6/work/gegl-0.1.6/operations/common' make[3]: *** [all-recursive] Error 1 make[3]: Leaving directory `/local/scratch/portage/media-libs/gegl-0.1.6/work/gegl-0.1.6/operations/common' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/local/scratch/portage/media-libs/gegl-0.1.6/work/gegl-0.1.6/operations' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/local/scratch/portage/media-libs/gegl-0.1.6/work/gegl-0.1.6' make: *** [all] Error 2 * ERROR: media-libs/gegl-0.1.6 failed (compile phase): * emake failed
Looks like a bug in gegl, forgotten #include <math.h>. I've hacked around it with CFLAGS="-DNAN=__builtin_nanf\\(\\\"\\\"\\)" emerge -1 gegl. Stole it from my math.h and my gcc>=3.3. Proper way is to add a patch of course.
Thanks Dmitry! With your workaround I can again emerge 'gegl'.
Same problem here. Thanks for solution! Workaround: export CFLAGS="-DNAN=\"(0.0/0.0)\"" then emerge -1 gegl
Created attachment 316101 [details] Adds -std=gnu99 to CFLAGS This problem still exists for me when using media-libs/gegl-0.2.0 on a Red Hat 5, ~amd64-linux Gentoo prefix. There's actually a few more failures now, but it seems that they're all related to floating point stuff. The missing definitions are NAN and fminf, both of which seem to need _ISOC99_SOURCE defined. I've attached a patch that adds "-std=gnu99" to CFLAGS, which allows gegl-0.2.0 to build. I think this is correct as the package seems to be using GNU C extensions (when I just added "-std=c99" the build still failed, I didn't look closely). With the attached patch applied, medias-libs/gegl-0.2.0 builds on my ~amd64-prefix.
I'm also on a RHEL 5 machine running Gentoo Prefix, and I can confirm using those CFLAGS fixes the compilation error.
Upstream bug, upstream is not convinced that the fix should be their end: https://bugzilla.gnome.org/show_bug.cgi?id=567435
I'm sorry, but I believe the package and OS changed considerably since.