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 135116 - gstflacenc.c fails to build in NetBSD
gstflacenc.c fails to build in NetBSD
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins
git master
Other All
: Normal major
: 0.7.5
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2004-02-22 13:32 UTC by Julio Merino
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Workaround for gstflacenc.c (898 bytes, patch)
2004-02-22 13:33 UTC, Julio Merino
none Details | Review
Real fix for gstelement.h (in gstreamer) (822 bytes, patch)
2004-02-22 13:40 UTC, Julio Merino
none Details | Review

Description Julio Merino 2004-02-22 13:32:49 UTC
The gstflacenc.c file fails to build under NetBSD, which aborts 
gst-plugins build.  Here is the error: 
 
gstflacenc.c: In function `gst_flacenc_chain': 
gstflacenc.c:578: error: parse error before "void" 
gstflacenc.c:613: error: parse error before "void" 
gstflacenc.c:613: error: parse error before "void" 
gmake[3]: *** [libgstflac_la-gstflacenc.lo] Error 1 
 
This is caused by the way NetBSD defines the NULL symbol and how 
gstreamer defines the GST_ELEMENT_ERROR macro; 
from /usr/include/sys/null.h: 
 
#define NULL (void *)0 
 
One way to fix this is to patch gstflacenc.c to surround NULL with 
parenthesis, when using the GST_ELEMENT_ERROR macro.  Another way is to 
fix the macro itself to always surround the value.
Comment 1 Julio Merino 2004-02-22 13:33:36 UTC
Created attachment 24652 [details] [review]
Workaround for gstflacenc.c
Comment 2 Julio Merino 2004-02-22 13:40:31 UTC
Created attachment 24653 [details] [review]
Real fix for gstelement.h (in gstreamer)
Comment 3 Julio Merino 2004-02-22 13:42:48 UTC
I've attached two patch files.  One is just a workaround for the 
file in gst-plugins.  The other is a more generic fix that can be 
applied to gstreamer, so that programs using the GST_ELEMENT_ERROR 
macro do not break.  I really think that the generic fix should be 
applied, not the workaround. 
Comment 4 Julio Merino 2004-02-22 13:56:14 UTC
I should check patches before sending, *SIGH*. 
 
Sorry!!  It seems that the "real fix" doesn't work by the way the 
macro works. 
 
That is, the function could get two parenthesis around its 
arguments, and that makes the build fail.  So go for the workaround, 
as that will put the parenthesis in the right place. 
Comment 5 Benjamin Otte (Company) 2004-02-22 15:24:53 UTC
Yeah, the GST_ELEMENT_ERROR macros is quite confusing, because it
takes 2 printf style strings in and we haven't come up with a good way
to do that yet.

The first patch is the correct one, I've applied it.