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 797209 - gst-plugin-bad: add head file "config.h", and resolve redefine issue
gst-plugin-bad: add head file "config.h", and resolve redefine issue
Status: RESOLVED NOTABUG
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Linux
: Normal normal
: NONE
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2018-09-27 03:32 UTC by zj,wang
Modified: 2018-09-27 09:05 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch (14.34 KB, patch)
2018-09-27 03:32 UTC, zj,wang
rejected Details | Review

Description zj,wang 2018-09-27 03:32: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.
Comment 1 Matthew Waters (ystreet00) 2018-09-27 04:07:08 UTC
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.
Comment 2 zj,wang 2018-09-27 04:20:58 UTC
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 */
Comment 3 zj,wang 2018-09-27 04:29:57 UTC
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
Comment 4 Matthew Waters (ystreet00) 2018-09-27 05:25:28 UTC
(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.
Comment 5 Tim-Philipp Müller 2018-09-27 06:57:48 UTC
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).
Comment 6 zj,wang 2018-09-27 07:42:26 UTC
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?
Comment 7 zj,wang 2018-09-27 08:44:54 UTC
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.
Comment 8 Tim-Philipp Müller 2018-09-27 09:05:17 UTC
For me gst-plugins-bad/autogen.sh contains a "git submodule update".

You might want to investigate switching to Meson anyway :)