build: Bump GLIB_VERSION_MAX_ALLOWED to 2.76#724
build: Bump GLIB_VERSION_MAX_ALLOWED to 2.76#724bbhtt wants to merge 1 commit intoflatpak-builder-1.4.xfrom
Conversation
libglnx update in d7fcee0 uses g_clear_fd() (GLib >= 2.76), but GLIB_VERSION_MAX_ALLOWED was still 2.70, triggering deprecation warnings when compiling with newer Glib. g_clear_fd() has a compat implementation inside libglnx so there's no need to bump the minimum GLib requirement.
5cc3355 to
e6ccd24
Compare
|
this is a bit tricky, if API newer than 2.66 is accidentally used, we won't get the warning and CI has 2.72 so it won't fail. |
|
One option is to wrap it in libglnx for >=2.76 #if !GLIB_CHECK_VERSION(2, 76, 0)
static inline gboolean
g_clear_fd (int *fd_ptr,
GError **error)
{
int fd = *fd_ptr;
*fd_ptr = -1;
if (fd < 0)
return TRUE;
/* Suppress "Not available before" warning */
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
/* This importantly calls _glnx_close to always get async-signal-safe if
* error == NULL */
return _glnx_close (fd, error);
G_GNUC_END_IGNORE_DEPRECATIONS
}
#else
static inline gboolean
_glnx_clear_fd (int *fd_ptr,
GError **error)
{
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
return g_clear_fd (fd_ptr, error);
G_GNUC_END_IGNORE_DEPRECATIONS
}
#define g_clear_fd _glnx_clear_fd
#endif |
|
Yeah, perhaps libglnx should do that. |
|
Opened https://gitlab.gnome.org/GNOME/libglnx/-/issues/7 for this. The min/max macros were added during the Meson port, but the intention is not clear to me in the commit message 62c85a1. I can drop them but it seems somewhat useful to me to have |
|
In the failing builds, is it failing because of a use of If libglnx itself is being compiled with Or if there's a new use of |
Yea, f-b's config.h is leaking into libglnx, the Makefile is globally injecting it through AM_CPPFLAGS which is doing This doesn't affect Meson, only the autotools build system. |
|
actually looks like libglnx is itself doing that https://gitlab.gnome.org/GNOME/libglnx/-/blob/ccea836b799256420788c463a638ded0636b1632/Makefile-libglnx.am#L30 |
|
The unique quirk of flatpak-builder that is making this worse for f-b than for other libglnx users might be as simple as "is still on Autotools", then. |
|
#725 moves it to flatpak-builder only. |
libglnx update in d7fcee0 uses g_clear_fd() (GLib >= 2.76), but GLIB_VERSION_MAX_ALLOWED was still 2.70, triggering deprecation warnings when compiling with newer Glib.
g_clear_fd() has a compat implementation inside libglnx so there's no need to bump the minimum GLib requirement.