After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 676087 - gtk+ fails to build against uclibc due to isnan/isinf function check
gtk+ fails to build against uclibc due to isnan/isinf function check
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: Other
3.4.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
: 675893 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2012-05-15 11:04 UTC by ncopa
Modified: 2012-05-17 03:55 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Bug 676087-configure.ac: isnan() and isinf() are macros, not functions (1.48 KB, patch)
2012-05-15 11:13 UTC, ncopa
accepted-commit_now Details | Review
Bug 676087-configure.ac: isnan() and isinf() are macros, not functions (1.48 KB, patch)
2012-05-17 03:55 UTC, Matthias Clasen
committed Details | Review

Description ncopa 2012-05-15 11:04:07 UTC
The c97f0b660c094d005844c0357df9bbc67c03861e introduced a check for isnan and isinf but is checking if those are functions. In uclibc those are defined as macros (just like the posix spec requires) and not as functions. This makes the build fail with the error:

libtool: compile:  ccache gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I.. -DG_LOG_DOMAIN=\"Gdk\" -DGDK_COMPILATION -I.. -I../gdk -I.. -DG_DISABLE_CAST_CHECKS -pthread -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng15 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/gio-unix-2.0/ -march=i486 -Os -fomit-frame-pointer -pipe -march=i486 -Os -fomit-frame-pointer -pipe -Wall -MT gdkrgba.lo -MD -MP -MF .deps/gdkrgba.Tpo -c gdkrgba.c  -fPIC -DPIC -o .libs/gdkrgba.o
In file included from gdkrgba.c:31:0:
fallback-c89.c:28:2: error: expected identifier or '(' before 'sizeof'
In file included from gdkrgba.c:31:0:
fallback-c89.c:40:2: error: expected identifier or '(' before 'sizeof'
make[4]: *** [gdkrgba.lo] Error 1
make[4]: Leaving directory `/home/ncopa/aports/main/gtk+3.0/src/gtk+-3.4.3/gdk'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/home/ncopa/aports/main/gtk+3.0/src/gtk+-3.4.3/gdk'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/ncopa/aports/main/gtk+3.0/src/gtk+-3.4.3/gdk'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/ncopa/aports/main/gtk+3.0/src/gtk+-3.4.3'
make: *** [all] Error 2


A possible fix might be replace AC_CHECK_FUNCS with AC_CHECK_DECLS
Comment 1 ncopa 2012-05-15 11:13:01 UTC
Created attachment 214077 [details] [review]
Bug 676087-configure.ac: isnan() and isinf() are macros, not functions
Comment 2 Matthias Clasen 2012-05-15 12:59:02 UTC
Review of attachment 214077 [details] [review]:

After consulting sus, looks right.
Comment 3 Matthias Clasen 2012-05-16 21:38:17 UTC
*** Bug 675893 has been marked as a duplicate of this bug. ***
Comment 4 Matthias Clasen 2012-05-17 03:55:01 UTC
The following fix has been pushed:
d6aee92 Bug 676087-configure.ac: isnan() and isinf() are macros, not functions
Comment 5 Matthias Clasen 2012-05-17 03:55:05 UTC
Created attachment 214228 [details] [review]
Bug 676087-configure.ac: isnan() and isinf() are macros, not functions

The isnan() and isinf() are C99 macros not functions so use
AC_CHECK_DECL instead of AC_CHECK_FUNCS for those.