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 660305 - fails to build with -Werror=format-security
fails to build with -Werror=format-security
Status: RESOLVED FIXED
Product: GIMP
Classification: Other
Component: General
2.6.11
Other Linux
: Normal normal
: 2.6
Assigned To: GIMP Bugs
GIMP Bugs
Depends on:
Blocks:
 
 
Reported: 2011-09-27 23:13 UTC by Ari Pollak
Modified: 2011-09-28 09:16 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch to fix the issue (31.64 KB, patch)
2011-09-28 02:35 UTC, Mukund Sivaraman
none Details | Review

Description Ari Pollak 2011-09-27 23:13:41 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
Comment 1 Mukund Sivaraman 2011-09-28 00:31:04 UTC
Hi Ari

Conforming. I'll look at fixing this in the day today.
Comment 2 Mukund Sivaraman 2011-09-28 02:35:00 UTC
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.
Comment 3 Mukund Sivaraman 2011-09-28 02:55:49 UTC
master is not affected by this bug.
Comment 4 Mukund Sivaraman 2011-09-28 09:16:38 UTC
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.