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 310938 - ext/cairo/gsttimeoverlay.c compile fails on call to rint()
ext/cairo/gsttimeoverlay.c compile fails on call to rint()
Status: RESOLVED NOTGNOME
Product: GStreamer
Classification: Platform
Component: gst-plugins
0.8.x
Other Linux
: Normal normal
: NONE
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2005-07-19 22:16 UTC by Stéphan Kochen
Modified: 2005-08-29 15:42 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
proposed patch (for both _possible_ gcc 4 bugs) (1.32 KB, patch)
2005-07-20 11:28 UTC, Stéphan Kochen
none Details | Review
proposed patch (630 bytes, patch)
2005-07-20 11:42 UTC, Stéphan Kochen
rejected Details | Review

Description Stéphan Kochen 2005-07-19 22:16:19 UTC
Version details: cvs BRANCH-GSTREAMER-0_8 as of 2005-07-19
Distribution/Version: Ubuntu Breezy

While compiling gst-plugins using jhbuild, I got the following error:

/opt/gnome2/src/gst-plugins/ext/cairo $ make
if /bin/sh ../../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I.
-I../..    -I../../gst-libs -I../../gst-libs -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -pthread -I/opt/gnome2/include/gstreamer-0.8
-I/opt/gnome2/include/glib-2.0 -I/opt/gnome2/lib/glib-2.0/include
-I/opt/gnome2/include/libxml2   -DGST_DISABLE_DEPRECATED  -Wall -Werror
-D_XOPEN_SOURCE -I/usr/include/freetype2 -I/opt/gnome2/include/cairo
-I/opt/gnome2/include -I/usr/include/libpng12   -I../../gst/videofilter -g -O2
-MT libgstcairo_la-gsttimeoverlay.lo -MD -MP -MF
".deps/libgstcairo_la-gsttimeoverlay.Tpo" -c -o libgstcairo_la-gsttimeoverlay.lo
`test -f 'gsttimeoverlay.c' || echo './'`gsttimeoverlay.c; \
then mv -f ".deps/libgstcairo_la-gsttimeoverlay.Tpo"
".deps/libgstcairo_la-gsttimeoverlay.Plo"; else rm -f
".deps/libgstcairo_la-gsttimeoverlay.Tpo"; exit 1; fi
 gcc -DHAVE_CONFIG_H -I. -I. -I../.. -I../../gst-libs -I../../gst-libs
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -pthread
-I/opt/gnome2/include/gstreamer-0.8 -I/opt/gnome2/include/glib-2.0
-I/opt/gnome2/lib/glib-2.0/include -I/opt/gnome2/include/libxml2
-DGST_DISABLE_DEPRECATED -Wall -Werror -D_XOPEN_SOURCE -I/usr/include/freetype2
-I/opt/gnome2/include/cairo -I/opt/gnome2/include -I/usr/include/libpng12
-I../../gst/videofilter -g -O2 -MT libgstcairo_la-gsttimeoverlay.lo -MD -MP -MF
.deps/libgstcairo_la-gsttimeoverlay.Tpo -c gsttimeoverlay.c  -fPIC -DPIC -o
.libs/libgstcairo_la-gsttimeoverlay.o
cc1: warnings being treated as errors
gsttimeoverlay.c: In function 'gst_timeoverlay_print_smpte_time':
gsttimeoverlay.c:156: warning: implicit declaration of function 'rint'
gsttimeoverlay.c:156: warning: incompatible implicit declaration of built-in
function 'rint'
make: *** [libgstcairo_la-gsttimeoverlay.lo] Fout 1

After some googling, I bumped into a helpful site:
http://ivor.bosloper.nl/2005/05/17/dangerous-gcc-ansi-side-effect/

Modifying Makefile.am to define _GNU_SOURCE seems to have fixed the problem:
libgstcairo_la_CFLAGS = $(GST_CFLAGS) $(CAIRO_CFLAGS) \
    -I$(top_srcdir)/gst/videofilter -D_GNU_SOURCE
Comment 1 Stéphan Kochen 2005-07-20 11:28:21 UTC
Created attachment 49452 [details] [review]
proposed patch (for both _possible_ gcc 4 bugs)
Comment 2 Stéphan Kochen 2005-07-20 11:42:24 UTC
Created attachment 49454 [details] [review]
proposed patch

Sorry, last one was a bogus patch.
I never really meant to attach one, but here's one anyways.
Comment 3 David Schleef 2005-07-20 17:47:51 UTC
rint() is not a GNU extension, so the patch is wrong.
Comment 4 Luis Villa 2005-07-21 23:32:40 UTC
Am seeing the same, FWIW.
Comment 5 Tim-Philipp Müller 2005-07-22 16:08:23 UTC
Maybe __USE_XOPEN_EXTENDED or __USE_MISC will do the trick as well?

 Cheers
  -Tim
Comment 6 Ronald Bultje 2005-07-22 16:14:47 UTC
Those are private macros. I think you need #define _XOPEN_SOURCE or
_XOPEN_SOURCE_EXTENDED, which are public.
Comment 7 Stéphan Kochen 2005-07-25 13:55:10 UTC
Seems this was a bug in xlibs. For reference:
Bug 310903
https://bugs.freedesktop.org/show_bug.cgi?id=3797
https://bugzilla.ubuntu.com/show_bug.cgi?id=12786
(Thanks jamesh!)

This seems to be fixed, compile went fine this time around. (Thanks daniels!)
Looks like this can be closed...
Comment 8 Luis Villa 2005-07-25 14:00:26 UTC
Fixed here too.