Source: dee
Version: 1.2.7+17.10.20170616-4
Severity: important
Tags: ftbfs
Control: block 940161 by -1
To reproduce, build dee against glib2.0 2.62.x, currently in experimental.
glib2.0 2.62.x is part of GNOME 3.34 and will be uploaded to unstable soon,
at which point this bug will become RC.
dee uses compiler options that include -Werror,
-Wno-error=deprecated-declarations and -DG_DISABLE_DEPRECATED:
> libtool: compile: gcc -DHAVE_CONFIG_H
> -I. -I.. -I. -I.. -I.. -DG_LOG_DOMAIN=\"dee\" -DPREFIX=\"/usr\"
> -DLIBDIR=\"/usr/lib/x86_64-linux-gnu\" -DG_DISABLE_DEPRECATED
> -DDEE_COMPILATION -g -Wall -pthread -I/usr/include/gio-unix-2.0
> -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/glib-2.0
> -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -Werror -Wall -Wcast-align
> -Wno-uninitialized -Wempty-body -Wformat-security -Winit-self
> -Wno-error=deprecated-declarations -Wdate-time -D_FORTIFY_SOURCE=2 -g
> -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong
> -Wformat -Werror=format-security -c dee-analyzer.c -fPIC -DPIC -o
> .libs/libdee_1_0_la-dee-analyzer.o
GLib 2.62.x has started to apply deprecation warning markers to
deprecated non-declaration constructs, such as macros and types. In
particular this affects the G_TYPE_INSTANCE_GET_PRIVATE macro,
which is part of the implementation of older conventional macros like
DEE_ANALYZER_GET_PRIVATE. Because this is not actually a declaration,
it is unaffected by -Wno-error=deprecated-declarations:
> dee-analyzer.c: In function ‘dee_analyzer_class_init’:
> dee-analyzer.c:200:3: warning: ‘g_type_class_add_private’ is deprecated
> [-Wdeprecated-declarations]
> 200 | g_type_class_add_private (obj_class, sizeof (DeeAnalyzerPrivate));
> | ^~~~~~~~~~~~~~~~~~~~~~~~
> In file included from /usr/include/glib-2.0/gobject/gobject.h:24,
> from /usr/include/glib-2.0/gobject/gbinding.h:29,
> from /usr/include/glib-2.0/glib-object.h:23,
> from dee-analyzer.h:28,
> from dee-analyzer.c:46:
> /usr/include/glib-2.0/gobject/gtype.h:1308:10: note: declared here
> 1308 | void g_type_class_add_private (gpointer
> g_class,
> | ^~~~~~~~~~~~~~~~~~~~~~~~
> dee-analyzer.c: In function ‘dee_analyzer_init’:
> dee-analyzer.c:208:13: error: G_ADD_PRIVATE [-Werror]
> 208 | priv = self->priv = DEE_ANALYZER_GET_PRIVATE (self);
> | ^~~~~~~~~~~~~~~
The obvious solution is to stop compiling distro packages with -Werror,
which is nearly always a RC bug waiting to happen. Untested patch:
pass --disable-maintainer-flags to dh_auto_configure.
Using -DG_DISABLE_DEPRECATED in distro packages is likely also a bad idea:
if the GLib maintainers had used the older way to deprecate a macro
#ifndef G_DISABLE_DEPRECATED
#define G_TYPE_INSTANCE_GET_PRIVATE ...
#endif
then this code would still FTBFS, but for a different reason.
smcv