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 131932 - Solaris compilation errors with "__attribute__ ((__packed__))"
Solaris compilation errors with "__attribute__ ((__packed__))"
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins
0.7.3
Other Linux
: Normal normal
: 0.7.4
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2004-01-19 15:27 UTC by david.hawthorne
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: 2.5/2.6



Description david.hawthorne 2004-01-19 15:27:26 UTC
Compiling gst-plugins with forte on Solaris produces the following errors
due to the following struct declaration:

 cc -DHAVE_CONFIG_H -I. -I. -I../.. -I/opt/gnome-2.4/include
-I../../gst-libs -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -mt
-I/opt/gnome-2.4/include/gstreamer-0.7 -I/opt/gnome-2.4/include/glib-2.0
-I/opt/gnome-2.4/lib/glib-2.0/include -I/opt/gnome-2.4/include/libxml2
-DGST_DISABLE_DEPRECATED -g -I/opt/gnome-2.4/include -c gstasfmux.c  -KPIC
-DPIC -o .libs/libgstasf_la-gstasfmux.o
"asfheaders.h", line 153: syntax error before or at: (
"asfheaders.h", line 153: warning: syntax error:  empty declaration

-------------------------------------------
struct _asf_stream_video {
  guint32 width;
  guint32 height;
  guint8  unknown;
  guint16 size;
} __attribute__ ((__packed__));
/* the packed attribute is needed to prevent this thing
 * from expanding 'unknown' to 16 bits */
-------------------------------------------

Commenting "__attribute__ ((__packed__))" temporarily fixes the problem. An
alternative solution would be preferred.
Comment 1 Stephane Loeuillet 2004-01-24 03:06:48 UTC
well, it seems it just was removed from current CVS :
http://freedesktop.org/cgi-bin/viewcvs.cgi/*checkout*/gstreamer/gst-plugins/ChangeLog?rev=1.195
Comment 2 Stephane Loeuillet 2004-01-24 13:03:28 UTC
hum, no. was removed from avidemux, not asfdemux. sorry
Comment 3 Ronald Bultje 2004-01-24 23:38:19 UTC
It can't be removed from asfdemux, gcc (and other compilers) pad the
struct to the wrong size, leading to bugs in ASF parsing. See the
comment in the code.

Please try to come up with an alternative way to parse it. I'm open
for any suggestion, as long as ASF file parsing works.
Comment 4 Benjamin Otte (Company) 2004-01-27 03:56:58 UTC
2004-01-27  Benjamin Otte  <in7y118@public.uni-hamburg.de>
                                                                     
                                                                     
                               
        * gst/asfdemux/asfheaders.h:
        * gst/asfdemux/gstasfdemux.c:
        * gst/asfdemux/gstasfmux.c: (gst_asfmux_put_guid),
        (gst_asfmux_put_string), (gst_asfmux_put_wav_header),
        (gst_asfmux_put_vid_header), (gst_asfmux_put_bmp_header):
          lot's of fixes to make data extraction simpler and get the code
          architecture and compiler independant. Add debugging category