Bug 1116 - Build failure with -Werror=format-security
Status:
RESOLVED DUPLICATE
Component:
Core
Version:
unspecified
Hardware:
All Linux
Importance:
P5 normal
Target Milestone:
---
Assignee:
Rob Caelers
URL:
Depends on:
Blocks:
Reported:
May 12 2013 06:04:18 UTC
by:
Francois Marier
Modified:
May 25 2013 19:40:11 UTC
WhoWhenWhatRemovedAdded
Rob CaelersMay 25 2013 19:40:11 UTCstatusNEWRESOLVED
resolutionDUPLICATE
Description
Francois Marier  May 12 2013 06:04:18 UTC
Debian packages are now built with -Werror=format-security [1] which causes a build failure with Workrave 1.10:

> /bin/bash ../../libtool  --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I. -I../..  -W -DWORKRAVE_PKGDATADIR="\"/usr/share/workrave\"" -DWORKRAVE_DATADIR="\"/usr/share\"" -D_XOPEN_SOURCE=600 -I../../common/include -pthread -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include     -D_FORTIFY_SOURCE=2  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -c -o DBus-gio.lo DBus-gio.cc
> libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I../.. -W -DWORKRAVE_PKGDATADIR=\"/usr/share/workrave\" -DWORKRAVE_DATADIR=\"/usr/share\" -D_XOPEN_SOURCE=600 -I../../common/include -pthread -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -D_FORTIFY_SOURCE=2 -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -c DBus-gio.cc  -fPIC -DPIC -o .libs/DBus-gio.o
> DBus-gio.cc: In static member function 'static void workrave::DBus::on_method_call(GDBusConnection*, const gchar*, const gchar*, const gchar*, const gchar*, GVariant*, GDBusMethodInvocation*, gpointer)':
> DBus-gio.cc:436:65: error: format not a string literal and no format arguments [-Werror=format-security]
> cc1plus: some warnings being treated as errors
> make[5]: *** [DBus-gio.lo] Error 1


The full build log [2] and the original bug report [3] are on the Debian tracker.

Francois


[1] http://wiki.debian.org/Hardening?highlight=(format-security)#DEB_BUILD_HARDENING_FORMAT_.28gcc.2Fg.2B-.2B-_-Wformat_-Wformat-security_-Werror.3Dformat-security.29

[2] http://people.debian.org/~lucas/logs/2013/05/09/workrave_1.9.909+abc941eb70-1_unstable.log

[3] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=707453
Comment 1
Rob Caelers  May 25 2013 19:40:11 UTC
Fixed

(commit 9bb9a7d3d89037a2d12ad2e70b67085eac6462f0)

*** This bug has been marked as a duplicate of bug 1101 ***