GNOME Bugzilla – Bug 324900
Problem compiling gst-plugins-base with Forte
Last modified: 2006-01-10 09:40:50 UTC
The ringbuffer code will not compile with Forte because the data structure used contains a union and structure that are not named. The attached patch fixed the build with Forte, but there are probably other ways to set up this structure so it avoids using unnamed structures/unions.
Created attachment 56341 [details] [review] patch fixing ringbuffer to compile with the Forte compiler
Given that you don't seem to have problems compiling the GStreamer-0.10.1 core, I assume that Forte just doesn't like anonymous structs and is fine with anonymous unions, so I've just named the struct (the same as GstBaseSrc, ie. 'ABI', which is a bit more neutral in case other fields are added later). Please re-open if you still have problems with current CVS. 2006-01-02 Tim-Philipp Müller <tim at centricular dot net> * gst-libs/gst/audio/gstringbuffer.c: (gst_ring_buffer_init), (gst_ring_buffer_set_flushing), (gst_ring_buffer_start), (gst_ring_buffer_pause), (wait_segment): * gst-libs/gst/audio/gstringbuffer.h: Sun's Forte compiler doesn't seem to like anonymous structs, so use same setup as in GstBaseSrc (fixes #324900).
I think we do have problems compiling the core. I didn't have this problem with 0.10.0, so I'm guessing that this was added in 0.10.1. I'm attaching a patch to fix the core to name the union. Can gstringbuffer in gst-plugins-base also be fixed so we don't have to patch it when building with Forte?
Created attachment 57075 [details] [review] patch to fix core
In other words, both the structure and the union need a name for Forte to be happy. This convention is followed in other places where unions are used in GStreamer, so it should probably be consistant. Also, it's just better if the code is general enough to compile on different compilers.
Apologies, I was somehow under the impression that you were talking about 0.10.1, which was released only a few hours before you reported the bug (even though you did set the version correctly) :) core and gst-plugins-base should both be fixed in CVS now.