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 685609 - Error compiling directfb example
Error compiling directfb example
Status: RESOLVED NOTGNOME
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
0.10.23
Other Linux
: Normal normal
: NONE
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2012-10-06 14:09 UTC by Alexander Nestorov
Modified: 2013-01-07 20:25 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Alexander Nestorov 2012-10-06 14:09:25 UTC
I'm having some trouble compiling plugins-bad (0.10.23) because of directfb.
This is the actual output of "make":

make -C directfb
make[4]: se ingresa al directorio `/media/HDD/Proyectos/TINY6410/deps/gst-plugins-bad-0.10.23/tests/examples/directfb'
  CC       gstdfb-gstdfb.o
In file included from /usr/include/gstreamer-0.10/gst/gst.h:49:0,
                 from gstdfb.c:39:
/usr/include/gstreamer-0.10/gst/gstinfo.h:274:48: error: expected ‘)’ before ‘__attribute__’
/usr/include/gstreamer-0.10/gst/gstinfo.h:274:48: error: expected ‘,’ or ‘;’ before ‘)’ token
/usr/include/gstreamer-0.10/gst/gstinfo.h:296:68: error: expected ‘)’ before ‘__attribute__’
/usr/include/gstreamer-0.10/gst/gstinfo.h:296:68: error: expected ‘,’ or ‘;’ before ‘)’ token
/usr/include/gstreamer-0.10/gst/gstinfo.h:321:51: error: expected ‘)’ before ‘__attribute__’
/usr/include/gstreamer-0.10/gst/gstinfo.h:321:51: error: expected ‘,’ or ‘;’ before ‘)’ token
/usr/include/gstreamer-0.10/gst/gstinfo.h:333:70: error: expected ‘)’ before ‘__attribute__’
/usr/include/gstreamer-0.10/gst/gstinfo.h:333:70: error: expected ‘,’ or ‘;’ before ‘)’ token
make[4]: *** [gstdfb-gstdfb.o] Error 1
make[4]: se sale del directorio `/media/HDD/Proyectos/TINY6410/deps/gst-plugins-bad-0.10.23/tests/examples/directfb'
make[3]: *** [directfb] Error 2
make[3]: se sale del directorio `/media/HDD/Proyectos/TINY6410/deps/gst-plugins-bad-0.10.23/tests/examples'
make[2]: *** [all-recursive] Error 1
make[2]: se sale del directorio `/media/HDD/Proyectos/TINY6410/deps/gst-plugins-bad-0.10.23/tests'
make[1]: *** [all-recursive] Error 1
make[1]: se sale del directorio `/media/HDD/Proyectos/TINY6410/deps/gst-plugins-bad-0.10.23'
make: *** [all] Error 2


Note that this is just a cut of the entire output.

Running "make" inside ext/directfb" throws the same error, but after googling for a while I found a "fix".
In ext/directfb/dfb-example.c #include <directfb.h> should be included the last, not the first. (According to http://mandriva.598463.n5.nabble.com/Cooker-tp5708724p5710130.html )

After applying this "fix" I can run "make" inside ext/directfb and stuff gets compiled. Anyways, running "make"
globally (aka, from the plugins-bad folder) I get the same error as before.

This is happening on an Arch Linux x64 updated this morning.

Just for the record, compiling on a Kubuntu 12.04.01 LTS (in a Virtual Box) won't throw that error, e.g., it
will compile everything correctly.
Comment 1 Tim-Philipp Müller 2012-10-18 13:02:23 UTC
We just use GLib's G_GNUC_NO_INSTRUMENT define, which should Just Work. If it doesn't, it's likely a bug somewhere else IMHO.

My gmacros.h has:

#if     __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4)
#define G_GNUC_NO_INSTRUMENT \
  __attribute__((__no_instrument_function__))
#else
#define G_GNUC_NO_INSTRUMENT
#endif

which looks ok to me.

http://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html

says "You may also specify attributes with `__' preceding and following each keyword. This allows you to use them in header files without being concerned about a possible macro of the same name. For example, you may use __noreturn__ instead of noreturn.", which is what's done here.

So to me it looks like either a gcc/cpp bug (it should ignore the #define __no_instrument_function__ from that directfb header AFAICT), or a bug in the directfb headers, or $somewhere else anyway.
Comment 2 Tim-Philipp Müller 2012-11-27 19:47:21 UTC
Not sure what's going on here, but looks like a bug somewhere else. Closing for now.

Please re-open if you still think it's a bug in GStreamer.
Comment 3 Dominique Leuenberger 2013-01-07 20:25:57 UTC
From what I verified, very likely directfb is messing up some of the macros...

moving the #include "directfb.h" after  #include <gst/gst.h> actually 'works around' the issue...

no real fix, but at least it helps building.