GNOME Bugzilla – Bug 783878
Bijiben 3.24.0 fails to build -Werror=redundant-decls
Last modified: 2017-06-21 17:21:40 UTC
bijiben 3.24.0 fails to build on Ubuntu 17.10 Alpha. biji-marshalers.c:54:13: error: redundant redeclaration of ‘_biji_marshal_VOID__ENUM_ENUM_POINTER’ [-Werror=redundant-decls] extern void _biji_marshal_VOID__ENUM_ENUM_POINTER (GClosure *closure, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from biji-marshalers.c:1:0: biji-marshalers.h:10:13: note: previous declaration of ‘_biji_marshal_VOID__ENUM_ENUM_POINTER’ was here extern void _biji_marshal_VOID__ENUM_ENUM_POINTER (GClosure *closure, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ biji-marshalers.c:99:13: error: redundant redeclaration of ‘_biji_marshal_VOID__BOOLEAN_BOOLEAN’ [-Werror=redundant-decls] extern void _biji_marshal_VOID__BOOLEAN_BOOLEAN (GClosure *closure, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from biji-marshalers.c:1:0: biji-marshalers.h:18:13: note: previous declaration of ‘_biji_marshal_VOID__BOOLEAN_BOOLEAN’ was here extern void _biji_marshal_VOID__BOOLEAN_BOOLEAN (GClosure *closure, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ biji-marshalers.c:142:13: error: redundant redeclaration of ‘_biji_marshal_VOID__POINTER_ENUM’ [-Werror=redundant-decls] extern void _biji_marshal_VOID__POINTER_ENUM (GClosure *closure, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from biji-marshalers.c:1:0: biji-marshalers.h:26:13: note: previous declaration of ‘_biji_marshal_VOID__POINTER_ENUM’ was here extern void _biji_marshal_VOID__POINTER_ENUM (GClosure *closure, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../.. -DDATADIR=\"/usr/share\" -DPACKAGE_LOCALE_DIR=\"/usr//locale\" -DPACKAGE_SRC_DIR=\".\" -DPACKAGE_DATA_DIR=\"/usr/share\" -I../../libgd -I../../src/ -I../../src/libbiji -pthread -I/usr/include/goa-1.0 -I/usr/lib/x86_64-linux-gnu/goa-1.0/include -I/usr/include/evolution-data-server -I/usr/include/nss -I/usr/include/nspr -I/usr/include/libsecret-1 -I/usr/include/tracker-1.0 -I/usr/include/tracker-1.0/libtracker-sparql -I/usr/include/uuid -I/usr/include/webkitgtk-4.0 -I/usr/include/gtk-3.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0 -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -I/usr/include/gtk-3.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/mirclient -I/usr/include/mircore -I/usr/include/mircookie -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 -I/usr/include/libsoup-2.4 -I/usr/include/libxml2 -I/usr/include/webkitgtk-4.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -pthread -I/usr/include/zeitgeist-2.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -DBUILD_ZEITGEIST -Wdate-time -D_FORTIFY_SOURCE=2 -fno-strict-aliasing -Wall -Wextra -Wundef -Wnested-externs -Wwrite-strings -Wpointer-arith -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls -Wno-unused-parameter -Wno-missing-field-initializers -Wdeclaration-after-statement -Wformat=2 -Wold-style-definition -Wcast-align -Wformat-nonliteral -Wformat-security -Wsign-compare -Wstrict-aliasing -Wshadow -Winline -Wpacked -Wmissing-format-attribute -Wmissing-noreturn -Winit-self -Wmissing-include-dirs -Wunused-but-set-variable -Warray-bounds -Wimplicit-function-declaration -Wreturn-type -Wswitch-enum -Wswitch-default -Werror -Wno-suggest-attribute=format -Wno-error=unused-parameter -Wno-error=missing-field-initializers -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -c deserializer/biji-lazy-deserializer.c -fPIC -DPIC -o deserializer/.libs/libbiji_la-biji-lazy-deserializer.o One problem here is that I don't think -Wall -Werror should be set in a stable release tarball. Maybe that's a problem from AX_COMPILER_FLAGS() in configure.ac.
Hi Jeremy, I couldn't reproduce your error. What's gcc version you're using? Is it 7? Which steps did you use to compile it?
Ok, I cannot duplicate the build failure on Ubuntu 17.04: https://launchpadlibrarian.net/324492180/buildlog_ubuntu-zesty-amd64.bijiben_3.24.0-0ubuntu0~ppa1_BUILDING.txt.gz Ubuntu 17.10 Alpha might be using gcc-7 (both gcc-6 and gcc-7 are installed so it's confusing) https://launchpadlibrarian.net/324492514/buildlog_ubuntu-artful-amd64.bijiben_3.24.0-0ubuntu0~artful1_BUILDING.txt.gz
I asked and was told that Ubuntu 17.10 is *not* using gcc-7 by default. (gcc-7-base is something different). But Ubuntu 17.10 is using glib 2.53.2 which I think is where you figured out the redundant-decls issue was from.
Created attachment 354132 [details] [review] build: Failed with redundant-decls error Ubuntu 17.10 is not being able to build it. Build fails with redundant redeclaration of marshaller code. Ubuntu 17.04 builds fine though. The issue is related to a new version of glib (2.53.2) which changed the way glib-genmarshal generates marshallers code (https://bugzilla.gnome.org/show_bug.cgi?id=781755). This patch fixes that while remains compatible with older glib versions.
Can you please check if this fixes the issue? It would be nice if you could test in both Ubuntu 17.04 and 17.10 as well. Thanks.
With that patch, bijiben 3.24.0 builds on amd64 on Ubuntu 17.04 and 17.10 but not on i386 and armhf (both 32-bit architectures): In file included from /usr/include/glib-2.0/glib.h:62:0, from /usr/include/evolution-data-server/libedataserver/e-cancellable-locks.h:31, from /usr/include/evolution-data-server/libedataserver/libedataserver.h:23, from /usr/include/evolution-data-server/libecal/libecal.h:23, from provider/biji-memo-provider.c:28: provider/biji-memo-provider.c: In function ‘handle_next_item’: provider/biji-memo-provider.c:203:14: error: format ‘%li’ expects argument of type ‘long int’, but argument 4 has type ‘gint64 {aka long long int}’ [-Werror=format=] g_debug ("created=%li", item->set.created); ^ /usr/include/glib-2.0/glib/gmessages.h:342:32: note: in definition of macro ‘g_debug’ __VA_ARGS__) ^~~~~~~~~~~ Full build log at https://launchpadlibrarian.net/324857944/buildlog_ubuntu-artful-i386.bijiben_3.24.0-0ubuntu0~artful2_BUILDING.txt.gz
Hi Jeremy, thanks for your reply. I'm glad to know that it fixed the glib issue. I'll push it to master. For this other issue you are talking about, it was fixed in master already by this patch: https://git.gnome.org/browse/bijiben/commit/?id=bbd6b4ab460a268110e94933c3bf0b667a594ff3
Review of attachment 354132 [details] [review]: Pushed to master.
Thanks, that worked. There's still a remaining issue about building with -Werror -Wall but that will be fixed by the meson port in bug 782707 so I won't worry too much about that any more.