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 779089 - Gexiv 0.10.4 fails to build on Debian 8 stable
Gexiv 0.10.4 fails to build on Debian 8 stable
Status: RESOLVED FIXED
Product: gexiv2
Classification: Other
Component: general
0.10.x
Other Linux
: Normal normal
: ---
Assigned To: Gexiv2 Maintainers
Gexiv2 Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-02-22 18:27 UTC by media.richard
Modified: 2017-05-10 14:50 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Remove shadowing in StreamIO class (2.40 KB, patch)
2017-02-24 20:42 UTC, Jens Georg
committed Details | Review

Description media.richard 2017-02-22 18:27:34 UTC
As the summary says, the latest pull of gexiv2 fails to build on my Debian Jessie stable setup.  I'm building against exiv2-0.25 and am using a custom prefix, in case that helps.  All make output is included below.

Thanks in advance for your help resolving this!


Making all in .
make[1]: Entering directory '/home/ricky/bin/gexiv2'
  CXX      gexiv2/libgexiv2_la-gexiv2-stream-io.lo
gexiv2/gexiv2-stream-io.cpp: In member function 'virtual long int StreamIo::write(const byte*, long int)':
gexiv2/gexiv2-stream-io.cpp:74:13: error: declaration of 'write' shadows a member of 'this' [-Werror=shadow]
         int write = MIN (write_count - written_bytes, G_MAXINT32);
             ^
gexiv2/gexiv2-stream-io.cpp: In member function 'virtual long int StreamIo::read(Exiv2::byte*, long int)':
gexiv2/gexiv2-stream-io.cpp:182:13: error: declaration of 'read' shadows a member of 'this' [-Werror=shadow]
         int read = cb->Read (cb->handle, (char*)buf + read_bytes, 0, MIN (read_count - read_bytes, G_MAXINT32));
             ^
cc1plus: all warnings being treated as errors
Makefile:771: recipe for target 'gexiv2/libgexiv2_la-gexiv2-stream-io.lo' failed
make[1]: *** [gexiv2/libgexiv2_la-gexiv2-stream-io.lo] Error 1
make[1]: Leaving directory '/home/ricky/bin/gexiv2'
Makefile:969: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1
Comment 1 Jens Georg 2017-02-22 20:00:08 UTC
This is slightly weird because I also compile with -Wshadow and should see at least a warning
Comment 2 Jens Georg 2017-02-22 20:12:46 UTC
Can you make V=1 and paste the whole compiler line here?
Comment 3 media.richard 2017-02-22 23:42:56 UTC
Here's the info you asked for, Jens.  Let me know if you need anything else.

Making all in .
make[1]: Entering directory '/home/ricky/bin/gexiv2'
/bin/bash ./libtool  --tag=CXX   --mode=compile g++ -DPACKAGE_NAME=\"gexiv2\" -DPACKAGE_TARNAME=\"gexiv2\" -DPACKAGE_VERSION=\"0.10.4\" -DPACKAGE_STRING=\"gexiv2\ 0.10.4\" -DPACKAGE_BUGREPORT=\"https://bugzilla.gnome.org/enter_bug.cgi\?product=gexiv2\" -DPACKAGE_URL=\"https://wiki.gnome.org/Projects/gexiv2\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DSIZEOF_INT_P=8 -DARCH_X86=1 -DARCH_X86_64=1 -I.  -I/home/ricky/bin/gimp-clean/install/include  -I/home/ricky/bin/gimp-clean/install/include/glib-2.0 -I/home/ricky/bin/gimp-clean/install/lib/glib-2.0/include    -I./gexiv2 -fno-strict-aliasing -Wall -Wextra -Wundef -Wwrite-strings -Wpointer-arith -Wmissing-declarations -Wredundant-decls -Wno-unused-parameter -Wno-missing-field-initializers -Wformat=2 -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 -Wreturn-type -Wno-overloaded-virtual -Wswitch-enum -Wswitch-default -Werror -Wno-suggest-attribute=format -Wno-error=unused-parameter -Wno-error=missing-field-initializers -Wno-error=overloaded-virtual -O2 -g -pipe -nostdlib -shared -MT gexiv2/libgexiv2_la-gexiv2-stream-io.lo -MD -MP -MF gexiv2/.deps/libgexiv2_la-gexiv2-stream-io.Tpo -c -o gexiv2/libgexiv2_la-gexiv2-stream-io.lo `test -f 'gexiv2/gexiv2-stream-io.cpp' || echo './'`gexiv2/gexiv2-stream-io.cpp
libtool: compile:  g++ -DPACKAGE_NAME=\"gexiv2\" -DPACKAGE_TARNAME=\"gexiv2\" -DPACKAGE_VERSION=\"0.10.4\" "-DPACKAGE_STRING=\"gexiv2 0.10.4\"" "-DPACKAGE_BUGREPORT=\"https://bugzilla.gnome.org/enter_bug.cgi?product=gexiv2\"" -DPACKAGE_URL=\"https://wiki.gnome.org/Projects/gexiv2\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DSIZEOF_INT_P=8 -DARCH_X86=1 -DARCH_X86_64=1 -I. -I/home/ricky/bin/gimp-clean/install/include -I/home/ricky/bin/gimp-clean/install/include/glib-2.0 -I/home/ricky/bin/gimp-clean/install/lib/glib-2.0/include -I./gexiv2 -fno-strict-aliasing -Wall -Wextra -Wundef -Wwrite-strings -Wpointer-arith -Wmissing-declarations -Wredundant-decls -Wno-unused-parameter -Wno-missing-field-initializers -Wformat=2 -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 -Wreturn-type -Wno-overloaded-virtual -Wswitch-enum -Wswitch-default -Werror -Wno-suggest-attribute=format -Wno-error=unused-parameter -Wno-error=missing-field-initializers -Wno-error=overloaded-virtual -O2 -g -pipe -nostdlib -MT gexiv2/libgexiv2_la-gexiv2-stream-io.lo -MD -MP -MF gexiv2/.deps/libgexiv2_la-gexiv2-stream-io.Tpo -c gexiv2/gexiv2-stream-io.cpp  -fPIC -DPIC -o gexiv2/.libs/libgexiv2_la-gexiv2-stream-io.o
gexiv2/gexiv2-stream-io.cpp: In member function 'virtual long int StreamIo::write(const byte*, long int)':
gexiv2/gexiv2-stream-io.cpp:74:13: error: declaration of 'write' shadows a member of 'this' [-Werror=shadow]
         int write = MIN (write_count - written_bytes, G_MAXINT32);
             ^
gexiv2/gexiv2-stream-io.cpp: In member function 'virtual long int StreamIo::read(Exiv2::byte*, long int)':
gexiv2/gexiv2-stream-io.cpp:182:13: error: declaration of 'read' shadows a member of 'this' [-Werror=shadow]
         int read = cb->Read (cb->handle, (char*)buf + read_bytes, 0, MIN (read_count - read_bytes, G_MAXINT32));
             ^
cc1plus: all warnings being treated as errors
Makefile:771: recipe for target 'gexiv2/libgexiv2_la-gexiv2-stream-io.lo' failed
make[1]: *** [gexiv2/libgexiv2_la-gexiv2-stream-io.lo] Error 1
make[1]: Leaving directory '/home/ricky/bin/gexiv2'
Makefile:969: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1
Comment 4 Jens Georg 2017-02-23 11:51:57 UTC
Apparently the gcc 4.9 on debian is more strict than 6.x on Ubuntu. Seen on Jessie as well, but fail to see it on Ubuntu
Comment 5 Jens Georg 2017-02-24 20:42:16 UTC
Created attachment 346668 [details] [review]
Remove shadowing in StreamIO class

Signed-off-by: Jens Georg <mail@jensge.org>
Comment 6 Jens Georg 2017-02-24 20:42:43 UTC
Attachment 346668 [details] pushed as 05a463b - Remove shadowing in StreamIO class
Comment 7 Debarshi Ray 2017-05-10 14:50:27 UTC
Thanks Jens! I noticed these during a Coverity scan of the RHEL package. This removes one item from my TODO list.