GNOME Bugzilla – Bug 712811
Don't use -DG_DISABLE_DEPRECATED flag
Last modified: 2014-06-22 16:02:49 UTC
I stumbled upon a GStreamer compilation failure following the removal of g_memmove(). I've been told it's because of the G_DISABLE_DEPRECATED usage. It should be replaced by -DGLIB_VERSION_MIN_REQUIRED=...
Fallout from https://bugzilla.gnome.org/show_bug.cgi?id=710519 Yep, this is breaking the build in gnome-continuous: http://build.gnome.org/continuous/buildmaster/builds/2013/11/21/24/build/output.txt G_DISABLE_DEPRECATED is itself basically deprecated. We now use the GCC symbol-based deprecation stuff, which is just fundamentally better since it allows you to choose your particular version. It doesn't work for macros, which is why you're now hitting this..but I think GLib consumers would be better off only injecting G_DISABLE_DEPRECATED occasionally than defaulting to on.
I've tagged glib for now: https://git.gnome.org/browse/gnome-continuous/commit/?id=109556b5225038e88d934d174db10223bc977165
I think we kind of use this on purpose, so that we do get failures when something gets deprecated in the latest glib versions, and can fix it. We do want to do that as stuff gets deprecated and better API appears and not only when we bump the minimum requirement. As far as I can see we can't do that with the MIN_REQUIRED/MAX_ALLOWED system, can we?
In the same category, we should set GLIB_VERSION_MAX_ALLOWED to GLib 2.32 to make sure we don't use anything newer.
> In the same category, we should set GLIB_VERSION_MAX_ALLOWED to GLib 2.32 to > make sure we don't use anything newer. I think that's another thing that doesn't really work for us. If I remember correctly, if you set MAX_ALLOWED you can't even use newer API conditionally, and we often want to do that.
g_memmove() usage should be fixed in all main modules now btw.
(In reply to comment #6) > g_memmove() usage should be fixed in all main modules now btw. Looks good to me, I've reverted the glib tag: https://git.gnome.org/browse/gnome-continuous/commit/?id=13e311eaf44bb10658b2c23b92993fdfa157ff7a
@tim: We can just #undef MAX_ALLOWED in the files that want to use it. I'm more worried about unintended use.
Created attachment 275805 [details] [review] W32 gst: g_memmove() is deprecated