GNOME Bugzilla – Bug 797209
gst-plugin-bad: add head file "config.h", and resolve redefine issue
Last modified: 2018-09-27 09:05:17 UTC
Created attachment 373776 [details] [review] patch due to using "GST_API_EXPORT" from file "config.h", add the head file In addition, head file "config.h" should be used before head file "gstinfo.h" to avoid redefine "GST_LEVEL_DEFAULT" issue.
Review of attachment 373776 [details] [review]: Erm, #including config.h in public headers is a no go. What exactly are you trying to solve here? If you have configure errors you may need to git clean -xdf all your gstreamer repos after the move around for the API exports patches. I definitely had to.
hi ystreet when I compile gst-bad-plugin with the latest commit 8e8eb41ddfd986b2cce574e0edbd8d2be2e444ce, it occurs below issue. ../../../gst-libs/gst/mpegts/mpegts-prelude.h:29:26: error: unknown type name ‘GST_API_EXPORT’ # define GST_MPEGTS_API GST_API_EXPORT /* from config.h */
why can not add the header file "config.h" in the headers? I have add the condition as below. #ifdef HAVE_CONFIG_H #include "config.h" #endif
(In reply to zj,wang from comment #2) > hi ystreet > > when I compile gst-bad-plugin with the latest commit > 8e8eb41ddfd986b2cce574e0edbd8d2be2e444ce, it occurs below issue. > > ../../../gst-libs/gst/mpegts/mpegts-prelude.h:29:26: error: unknown type > name ‘GST_API_EXPORT’ > # define GST_MPEGTS_API GST_API_EXPORT /* from config.h */ Yea, you need to recompile all of gstreamer with the update patches after running git clean -xdf on the repositories. i.e. you should to start a complete rebuild from scratch with an up to data gstreamer. (In reply to zj,wang from comment #3) > why can not add the header file "config.h" in the headers? I have add the > condition as below. > #ifdef HAVE_CONFIG_H > #include "config.h" > #endif Because in an installed environment, config.h does not exist or would refer to a different config.h file from a dependant project.
Can you give the full error with context? Does it happen when compiling the -enumtypes.c file? If yes, try 'make clean; make' and if that doesn't help make sure your common submodule is up to date (git submodule update from top-level of git check out).
hi Tim you are right, it does happen during compiling -enumtypes.c file as you said, I updated the common submodule to the lates, this issue will be fixed. BTW, why are there two repos in plugin-bad?
Should we optimize our script "autogen.sh", because it does not pull the latest code during using command "git submodule update" automatically if the submodule exists.
For me gst-plugins-bad/autogen.sh contains a "git submodule update". You might want to investigate switching to Meson anyway :)