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 669036 - Missing include in gstpreset.h causes build error
Missing include in gstpreset.h causes build error
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other All
: Normal major
: 0.10.36
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2012-01-30 14:53 UTC by Joao Paulo Pizani Flor
Modified: 2012-02-02 13:23 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch to fix the missing include at gst/gstpreset.h (262 bytes, patch)
2012-01-30 15:43 UTC, Joao Paulo Pizani Flor
none Details | Review
Same fix patch as the last one, but now with git metadata (766 bytes, patch)
2012-01-30 16:59 UTC, Joao Paulo Pizani Flor
committed Details | Review

Description Joao Paulo Pizani Flor 2012-01-30 14:53:11 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).
Comment 1 Vincent Penquerc'h 2012-01-30 15:19:07 UTC
This seems like a valid change at first glance.
gst/gstpreset.h is not autogenerated, so a patch would be good.
Comment 2 Joao Paulo Pizani Flor 2012-01-30 15:43:11 UTC
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?
Comment 3 Vincent Penquerc'h 2012-01-30 16:02:51 UTC
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.
Comment 4 Vincent Penquerc'h 2012-01-30 16:07:48 UTC
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.
Comment 5 Joao Paulo Pizani Flor 2012-01-30 16:59:26 UTC
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 :)
Comment 6 Vincent Penquerc'h 2012-01-30 17:27:27 UTC
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