GNOME Bugzilla – Bug 669036
Missing include in gstpreset.h causes build error
Last modified: 2012-02-02 13:23:46 UTC
I was trying to compile gstreamermm-0.10 on Windows, and then gcc complained that "GST_PADDING" was "not declared at this scope", namely, in the file "/usr/local/include/gstreamer-0.10/gst/gstpreset.h", that is, in my GSTREAMER CORE installation. Very puzzled with that error, I quickly grep'ed through my system looking for the definition of the GST_PADDING macro (as I found out). It's defined in gst/gstconfig.h. So I just added the line " #include <gst/gstconfig.h> " to the file and compilation WORKED®. I could send you the patch with this one-line change, but I am afraid that gst/gstpreset.h might be somehow generated, could you tell me whether a patch would be useful? Here's what I think that made this bug remain unnoticed until now: People included gst/gstpreset.h in their client files, BUT the definition of GST_PADDING was also always available through some other path in the include graph (thus directly or indirectly, they were including gst/gstconfig.h). However, the bug (missing include) became apparent as an external library tried to use gst/gstpreset.h without an EXTRA PATH including gst/gstconfig.h (namely, this library was gstreamermm).
This seems like a valid change at first glance. gst/gstpreset.h is not autogenerated, so a patch would be good.
Created attachment 206444 [details] [review] Patch to fix the missing include at gst/gstpreset.h Here it is. :) Are there automated test-suites which I could run on my machine to confirm that the patch didn't actually break anything?
Yes, you can run the standard autofoo "make check". For a patch like that I doubt anything would break that would not be caught by the build process though, with the exception of ABI tests maybe.
Could you attach a version done with: git commit gst/gstpreset.h (then enter your commit message) git format-patch -1 This will generate a patch with metadata (eg, your author name/email) ready for merging. If you don't have a git tree I'll do that for you.
Created attachment 206454 [details] [review] Same fix patch as the last one, but now with git metadata DONE. Patch attached ready for merging into git... Thank you, Vincent :)
Thanks, pushed with cosmetic changes to the commit message: commit 3af9544f9554b0a050ac79dcc72f30d2dae9bd38 Author: João Paulo Pizani Flor <joaopizani@gmail.com> Date: Mon Jan 30 14:48:44 2012 -0200 Fixes the lack of an include directive in gst/gstpreset.h It blocked the build of external libraries depending on gstreamer-core (namely, gstreamermm). Complete bug report at https://bugzilla.gnome.org/show_bug.cgi?id=669036