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 576499 - build scripts use -Werror option, and build fails because of warnings
build scripts use -Werror option, and build fails because of warnings
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-omx
git master
Other All
: Normal normal
: NONE
Assigned To: Felipe Contreras (banned)
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2009-03-23 22:32 UTC by Don Darling
Modified: 2009-08-10 23:41 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Proposed patch to fix build errors. (13.09 KB, patch)
2009-03-23 22:37 UTC, Don Darling
none Details | Review

Description Don Darling 2009-03-23 22:32:36 UTC
Please describe the problem:
gst-openmax uses the -Werror option by default, which causes the build to fail even if there are build warnings.  There are several warnings that cause the build to fail, all of which fall under one of these two categories:

1)  Failure to include <stdlib.h> and using calloc or free.
2)  Using the incorrect printf format specifier (%lu for a guint, %d for a long int).

Steps to reproduce:
These are common warnings found with -Wall (which is also on by default for gst-openmax).  I would expect that this problem is easily reproducable by most gcc compilers.  In my case, I'm using the MontaVista Pro 5.00 compiler, which is based on gcc 4.2.0.

Actual results:
During a typical build, I see the errors below.  No fancy configure options other than --prefix are used:

gstomx_base_videodec.c:111: warning: implicit declaration of function 'calloc'
gstomx_base_filter.c:387: warning: format '%d' expects type 'int', but argument 8 has type 'OMX_U32'

And many more like this.

Expected results:
I would expect that the build does not fail.  Minimally, developers shouldn't be using -Werror if there are still build warnings.


Does this happen every time?
Yes.

Other information:
I have a patch that fixes the build issue, but don't see a place to attach it on this submission screen.
Comment 1 Don Darling 2009-03-23 22:37:26 UTC
Created attachment 131224 [details] [review]
Proposed patch to fix build errors.

With this patch, the gst-openmax build completes without failure.
Comment 2 Don Darling 2009-03-23 22:39:17 UTC
Even if you can't reproduce this issue, the changes I make in the patch are really simple and it should be easy to verify that it is correct.
Comment 3 Edward Hervey 2009-03-24 08:20:52 UTC
Don, that patch looks empty.
Comment 4 Felipe Contreras (banned) 2009-03-24 12:53:48 UTC
Can you commit your patch and then do 'git format-patch'?
http://www.kernel.org/pub/software/scm/git/docs/git-format-patch.html
Comment 5 Edward Hervey 2009-03-24 12:59:46 UTC
Why not just use the glib methods ? g_malloc, g_new0, g_free, etc...

That would avoid all those issues of portability (amongst other things)
Comment 6 Felipe Contreras (banned) 2009-03-24 13:23:43 UTC
(In reply to comment #5)
> Why not just use the glib methods ? g_malloc, g_new0, g_free, etc...
> 
> That would avoid all those issues of portability (amongst other things)

Huh? stdlib.h is not portable?

I used calloc because I wanted to make a clear distinction between what goes to GStramer and what goes to OpenMAX. Besides, there's no g_calloc.
Comment 7 Tim-Philipp Müller 2009-03-24 13:41:39 UTC
> Besides, there's no g_calloc. 

That's true, it's called g_malloc0() :)

Comment 8 Edward Hervey 2009-03-24 14:37:19 UTC
or g_new0()
Comment 9 Felipe Contreras (banned) 2009-03-25 14:46:58 UTC
Actually, this patch is for 0.10.0.4, this has been fixed in git master a lont time ago, please use that.

I'll try to release 0.10.0.5 ASAP.

So... already fixed.
Comment 10 Felipe Contreras (banned) 2009-03-25 14:48:04 UTC
(In reply to comment #8)
> or g_new0()

or use memset and avoid the alloc completely, which is precisely what I'm going to do.