2019-04-19 19:46:23

by Szymon Janc

[permalink] [raw]
Subject: [PATCH] build: Bump glib dependency to 2.32

make --no-print-directory all-am
CC client/main.o
In file included from /usr/include/glib-2.0/glib/gasyncqueue.h:32,
from /usr/include/glib-2.0/glib.h:32,
from client/main.c:36:
/usr/include/glib-2.0/glib/gthread.h: In function ‘g_rec_mutex_locker_new’:
/usr/include/glib-2.0/glib/gthread.h:390:3: error: ‘g_rec_mutex_lock’ is deprecated: Not available before 2.32 [-Werror=deprecated-declarations]
g_rec_mutex_lock (rec_mutex);
^~~~~~~~~~~~~~~~
/usr/include/glib-2.0/glib/gthread.h:196:17: note: declared here
void g_rec_mutex_lock (GRecMutex *rec_mutex);
^~~~~~~~~~~~~~~~
/usr/include/glib-2.0/glib/gthread.h: In function ‘g_rec_mutex_locker_free’:
/usr/include/glib-2.0/glib/gthread.h:405:3: error: ‘g_rec_mutex_unlock’ is deprecated: Not available before 2.32 [-Werror=deprecated-declarations]
g_rec_mutex_unlock ((GRecMutex *) locker);
^~~~~~~~~~~~~~~~~~
/usr/include/glib-2.0/glib/gthread.h:200:17: note: declared here
void g_rec_mutex_unlock (GRecMutex *rec_mutex);
^~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[1]: *** [Makefile:6579: client/main.o] Error 1
---
acinclude.m4 | 4 ++--
configure.ac | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/acinclude.m4 b/acinclude.m4
index bc39c6d73..4565f77e3 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -23,8 +23,8 @@ AC_DEFUN([COMPILER_FLAGS], [
with_cflags="$with_cflags -Wswitch-enum"
with_cflags="$with_cflags -Wformat -Wformat-security"
with_cflags="$with_cflags -DG_DISABLE_DEPRECATED"
- with_cflags="$with_cflags -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_28"
- with_cflags="$with_cflags -DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_28"
+ with_cflags="$with_cflags -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_32"
+ with_cflags="$with_cflags -DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_32"
fi
AC_SUBST([WARNING_CFLAGS], $with_cflags)
])
diff --git a/configure.ac b/configure.ac
index 0afe1e6db..1b4ef77f7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -62,8 +62,8 @@ AC_CHECK_LIB(dl, dlopen, dummy=yes,

AC_CHECK_HEADERS(linux/types.h linux/if_alg.h)

-PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.28, dummy=yes,
- AC_MSG_ERROR(GLib >= 2.28 is required))
+PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.32, dummy=yes,
+ AC_MSG_ERROR(GLib >= 2.32 is required))
AC_SUBST(GLIB_CFLAGS)
AC_SUBST(GLIB_LIBS)

--
2.20.1



2019-04-20 06:48:21

by Luiz Augusto von Dentz

[permalink] [raw]
Subject: Re: [PATCH] build: Bump glib dependency to 2.32

Hi Szymon,

On Fri, Apr 19, 2019 at 10:48 PM Szymon Janc <[email protected]> wrote:
>
> make --no-print-directory all-am
> CC client/main.o
> In file included from /usr/include/glib-2.0/glib/gasyncqueue.h:32,
> from /usr/include/glib-2.0/glib.h:32,
> from client/main.c:36:

Weird it seems to be triggering the use of a deprecated API on its
own? That would be a bug in glib, also weird it did not trigger to
other tools only for client.

> /usr/include/glib-2.0/glib/gthread.h: In function ‘g_rec_mutex_locker_new’:
> /usr/include/glib-2.0/glib/gthread.h:390:3: error: ‘g_rec_mutex_lock’ is deprecated: Not available before 2.32 [-Werror=deprecated-declarations]
> g_rec_mutex_lock (rec_mutex);
> ^~~~~~~~~~~~~~~~
> /usr/include/glib-2.0/glib/gthread.h:196:17: note: declared here
> void g_rec_mutex_lock (GRecMutex *rec_mutex);
> ^~~~~~~~~~~~~~~~
> /usr/include/glib-2.0/glib/gthread.h: In function ‘g_rec_mutex_locker_free’:
> /usr/include/glib-2.0/glib/gthread.h:405:3: error: ‘g_rec_mutex_unlock’ is deprecated: Not available before 2.32 [-Werror=deprecated-declarations]
> g_rec_mutex_unlock ((GRecMutex *) locker);
> ^~~~~~~~~~~~~~~~~~
> /usr/include/glib-2.0/glib/gthread.h:200:17: note: declared here
> void g_rec_mutex_unlock (GRecMutex *rec_mutex);
> ^~~~~~~~~~~~~~~~~~
> cc1: all warnings being treated as errors
> make[1]: *** [Makefile:6579: client/main.o] Error 1
> ---
> acinclude.m4 | 4 ++--
> configure.ac | 4 ++--
> 2 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/acinclude.m4 b/acinclude.m4
> index bc39c6d73..4565f77e3 100644
> --- a/acinclude.m4
> +++ b/acinclude.m4
> @@ -23,8 +23,8 @@ AC_DEFUN([COMPILER_FLAGS], [
> with_cflags="$with_cflags -Wswitch-enum"
> with_cflags="$with_cflags -Wformat -Wformat-security"
> with_cflags="$with_cflags -DG_DISABLE_DEPRECATED"
> - with_cflags="$with_cflags -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_28"
> - with_cflags="$with_cflags -DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_28"
> + with_cflags="$with_cflags -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_32"
> + with_cflags="$with_cflags -DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_32"
> fi
> AC_SUBST([WARNING_CFLAGS], $with_cflags)
> ])
> diff --git a/configure.ac b/configure.ac
> index 0afe1e6db..1b4ef77f7 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -62,8 +62,8 @@ AC_CHECK_LIB(dl, dlopen, dummy=yes,
>
> AC_CHECK_HEADERS(linux/types.h linux/if_alg.h)
>
> -PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.28, dummy=yes,
> - AC_MSG_ERROR(GLib >= 2.28 is required))
> +PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.32, dummy=yes,
> + AC_MSG_ERROR(GLib >= 2.32 is required))
> AC_SUBST(GLIB_CFLAGS)
> AC_SUBST(GLIB_LIBS)
>
> --
> 2.20.1
>


--
Luiz Augusto von Dentz

2019-04-23 12:35:52

by Szymon Janc

[permalink] [raw]
Subject: Re: [PATCH] build: Bump glib dependency to 2.32

On Saturday, 20 April 2019 08:48:10 CEST Luiz Augusto von Dentz wrote:
> Hi Szymon,
>
> On Fri, Apr 19, 2019 at 10:48 PM Szymon Janc <[email protected]>
wrote:
> > make --no-print-directory all-am
> >
> > CC client/main.o
> >
> > In file included from /usr/include/glib-2.0/glib/gasyncqueue.h:32,
> >
> > from /usr/include/glib-2.0/glib.h:32,
>
> > from client/main.c:36:
> Weird it seems to be triggering the use of a deprecated API on its
> own? That would be a bug in glib, also weird it did not trigger to
> other tools only for client.

Yes, this looks like bug in glib but unfortunatelly that is the version
shipped with Ubuntu 19.04...

It triggers for other files too, this is just first in line in case of single
thread build.

--
pozdrawiam
Szymon Janc



2019-04-23 15:57:24

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [PATCH] build: Bump glib dependency to 2.32

Hi Szymon,

>>> make --no-print-directory all-am
>>>
>>> CC client/main.o
>>>
>>> In file included from /usr/include/glib-2.0/glib/gasyncqueue.h:32,
>>>
>>> from /usr/include/glib-2.0/glib.h:32,
>>
>>> from client/main.c:36:
>> Weird it seems to be triggering the use of a deprecated API on its
>> own? That would be a bug in glib, also weird it did not trigger to
>> other tools only for client.
>
> Yes, this looks like bug in glib but unfortunatelly that is the version
> shipped with Ubuntu 19.04...
>
> It triggers for other files too, this is just first in line in case of single
> thread build.

I am against this change. Can someone fix Ubuntu please. Or we just start aggressively moving towards ELL and get rid of GLib.

Regards

Marcel