GNOME Bugzilla – Bug 660305
fails to build with -Werror=format-security
Last modified: 2011-09-28 09:16:38 UTC
Debian has added hardening flags to builds by default, which adds -Wformat-security and -Werror=format-security. gimp 2.6.11 fails doesn't build with these flags because of errors like this: /bin/bash ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I/build/gimp-O1jlIz/gimp-2.6.11/./libgimpconfig -I.. -I/build/gimp-O1jlIz/gimp-2.6.11/. -pthread -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include -DG_LOG_DOMAIN=\"LibGimpConfig\" -DGIMP_DISABLE_DEPRECATED -DGDK_MULTIHEAD_SAFE -DGTK_MULTIHEAD_SAFE -g -O2 -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -Wall -Wdeclaration-after-statement -Wmissing-prototypes -Wmissing-declarations -Winit-self -Wpointer-arith -Wold-style-definition -c -o gimpconfigwriter.lo /build/gimp-O1jlIz/gimp-2.6.11/./libgimpconfig/gimpconfigwriter.c > libtool: compile: gcc -DHAVE_CONFIG_H -I. -I/build/gimp-O1jlIz/gimp-2.6.11/./libgimpconfig -I.. -I/build/gimp-O1jlIz/gimp-2.6.11/. -pthread -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include -DG_LOG_DOMAIN=\"LibGimpConfig\" -DGIMP_DISABLE_DEPRECATED -DGDK_MULTIHEAD_SAFE -DGTK_MULTIHEAD_SAFE -g -O2 -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -Wall -Wdeclaration-after-statement -Wmissing-prototypes -Wmissing-declarations -Winit-self -Wpointer-arith -Wold-style-definition -c /build/gimp-O1jlIz/gimp-2.6.11/./libgimpconfig/gimpconfigwriter.c -fPIC -DPIC -o .libs/gimpconfigwriter.o > /build/gimp-O1jlIz/gimp-2.6.11/./libgimpconfig/gimpconfigwriter.c: In function 'gimp_config_writer_linefeed': > /build/gimp-O1jlIz/gimp-2.6.11/./libgimpconfig/gimpconfigwriter.c:571:22: error: format not a string literal and no format arguments [-Werror=format-security] > cc1: some warnings being treated as errors
Hi Ari Conforming. I'll look at fixing this in the day today.
Created attachment 197624 [details] [review] Patch to fix the issue I'm not able to push to the gimp-2-6 branch.. some hook script fails. Will commit it when it works, but you can try this patch meanwhile.
master is not affected by this bug.
Patch was pushed to the gimp-2-6 branch: commit 2917a0ee3e3a9ab5955dcd0da803706be3098970 Author: Mukund Sivaraman <muks@banu.com> Date: Wed Sep 28 07:50:50 2011 +0530 Bug 660305 - fails to build with -Werror=format-security According to the bug, Debian enforces -Wformat-security and -Werror=format-security, which is a good thing. Most of these patches are already in master, but I'll check master anyway. Resolving bug as FIXED, milestone 2.6.