After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 783878 - Bijiben 3.24.0 fails to build -Werror=redundant-decls
Bijiben 3.24.0 fails to build -Werror=redundant-decls
Status: RESOLVED FIXED
Product: bijiben
Classification: Applications
Component: general
3.24.x
Other Linux
: Normal major
: ---
Assigned To: Bijiben maintainer(s)
Bijiben maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2017-06-17 01:25 UTC by Jeremy Bicha
Modified: 2017-06-21 17:21 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
build: Failed with redundant-decls error (1.90 KB, patch)
2017-06-21 02:29 UTC, Isaque Galdino
committed Details | Review

Description Jeremy Bicha 2017-06-17 01:25:54 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.
Comment 1 Isaque Galdino 2017-06-18 19:58:44 UTC
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?
Comment 2 Jeremy Bicha 2017-06-18 20:31:36 UTC
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
Comment 3 Jeremy Bicha 2017-06-19 17:29:30 UTC
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.
Comment 4 Isaque Galdino 2017-06-21 02:29:29 UTC
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.
Comment 5 Isaque Galdino 2017-06-21 02:30:31 UTC
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.
Comment 6 Jeremy Bicha 2017-06-21 02:51:12 UTC
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
Comment 7 Isaque Galdino 2017-06-21 16:32:04 UTC
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
Comment 8 Isaque Galdino 2017-06-21 16:35:25 UTC
Review of attachment 354132 [details] [review]:

Pushed to master.
Comment 9 Jeremy Bicha 2017-06-21 17:21:40 UTC
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.