GNOME Bugzilla – Bug 731252
gtk+-2.24.23 fails to build with -Werror=format-security in pixbuf*
Last modified: 2014-07-20 05:38:14 UTC
We get: libtool: compile: x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I../../.. -I../../.. -I../../../gdk -I../../../gdk -pthread -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/libdrm -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/freetype2 -DG_DISABLE_SINGLE_INCLUDES -DATK_DISABLE_SINGLE_INCLUDES -DGDK_PIXBUF_DISABLE_SINGLE_INCLUDES -DGTK_DISABLE_SINGLE_INCLUDES -march=native -Werror=format-security -g0 -O2 -Wall -c pixbuf-main.c -fPIC -DPIC -o .libs/pixbuf-main.o libtool: compile: x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I../../.. -I../../.. -I../../../gdk -I../../../gdk -pthread -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/libdrm -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/freetype2 -DG_DISABLE_SINGLE_INCLUDES -DATK_DISABLE_SINGLE_INCLUDES -DGDK_PIXBUF_DISABLE_SINGLE_INCLUDES -DGTK_DISABLE_SINGLE_INCLUDES -march=native -Werror=format-security -g0 -O2 -Wall -c pixbuf-rc-style.c -fPIC -DPIC -o .libs/pixbuf-rc-style.o libtool: compile: x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I../../.. -I../../.. -I../../../gdk -I../../../gdk -pthread -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/libdrm -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/freetype2 -DG_DISABLE_SINGLE_INCLUDES -DATK_DISABLE_SINGLE_INCLUDES -DGDK_PIXBUF_DISABLE_SINGLE_INCLUDES -DGTK_DISABLE_SINGLE_INCLUDES -march=native -Werror=format-security -g0 -O2 -Wall -c pixbuf-render.c -fPIC -DPIC -o .libs/pixbuf-render.o pixbuf-rc-style.c: In function 'clear_theme_pixbuf_and_warn': pixbuf-rc-style.c:672:3: error: format not a string literal and no format arguments [-Werror=format-security] cc1: some warnings being treated as errors pixbuf-render.c: In function 'theme_pixbuf_set_filename': pixbuf-render.c:554:7: warning: 'g_cache_remove' is deprecated (declared at /usr/include/glib-2.0/glib/deprecated/gcache.h:60) [-Wdeprecated-declarations] pixbuf-render.c: In function 'theme_pixbuf_get_pixbuf': pixbuf-render.c:750:2: warning: 'g_cache_new' is deprecated (declared at /usr/include/glib-2.0/glib/deprecated/gcache.h:47) [-Wdeprecated-declarations] pixbuf-render.c:756:7: warning: 'g_cache_insert' is deprecated (declared at /usr/include/glib-2.0/glib/deprecated/gcache.h:57) [-Wdeprecated-declarations] make[4]: *** [pixbuf-rc-style.lo] Error 1 make[4]: *** Waiting for unfinished jobs.... make[4]: Leaving directory `/var/tmp/portage/x11-libs/gtk+-2.24.23/work/gtk+-2.24.23/modules/engines/pixbuf' make[3]: *** [all-recursive] Error 1 make[3]: Leaving directory `/var/tmp/portage/x11-libs/gtk+-2.24.23/work/gtk+-2.24.23/modules/engines' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/var/tmp/portage/x11-libs/gtk+-2.24.23/work/gtk+-2.24.23/modules' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/var/tmp/portage/x11-libs/gtk+-2.24.23/work/gtk+-2.24.23' make: *** [all] Error 2
Looks like it was fixed in redhat: http://pkgs.fedoraproject.org/cgit/gtk2.git/tree/0001-pixbuf-engine-Fix-the-build-with-Werror-format-secur.patch
it is also fixed upstream, see commit 46b0c2938293b0495f65a46fdc632b788532639b