Summary: | media-libs/gegl - reinhard05.c: In function 'reinhard05_stats_start': reinhard05.c:88: error: 'NAN' undeclared (first use in this function) | ||
---|---|---|---|
Product: | Gentoo/Alt | Reporter: | Rabbe Fogelholm <rabbe> |
Component: | Prefix Support | Assignee: | Gentoo Prefix <prefix> |
Status: | RESOLVED OBSOLETE | ||
Severity: | normal | CC: | divanorama, kripton, palmer |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | x86 | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: | Adds -std=gnu99 to CFLAGS |
Description
Rabbe Fogelholm
2011-06-14 11:41:02 UTC
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. |