Source: libmaa Version: 1.2.0-1 Severity: important Justification: future ftbfs User: debian-...@lists.debian.org Usertags: ftbfs-gcc-4.6
Hi, gcc 4.6 introduces[1] a new warning -Wunused-but-set-variable that is included in -Wall. libmaa triggers it and uses -Werror, which would cause failure to build from source except that to accomodate cases like this, Debian gcc-4.6 has a workaround (Bug#615157). The plan is to revert the workaround before wheezy is released, making this into a genuine ftbfs. Whew. All that said: to reproduce this today without the warning scrolling by you can use | $ debian/rules build CC='gcc-4.6 -Werror=unused-but-set-variable' |[...] | libtool: compile: gcc -Werror=unused-but-set-variable -c -DHAVE_CONFIG_H -g -O2 -DMAA_MAJOR=1 -DMAA_MINOR=2 -DMAA_TEENY=0 -I. -I. string.c -fPIC -DPIC -o .libs/string.o | string.c: In function 'str_pool_iterate': | string.c:114:10: error: variable 'datum' set but not used [-Werror=unused-but-set-variable] | string.c: In function 'str_pool_iterate_arg': | string.c:143:10: error: variable 'datum' set but not used [-Werror=unused-but-set-variable] | cc1: some warnings being treated as errors | | make[1]: *** [string.o] Error 1 | make[1]: Leaving directory `/tmp/libmaa-1.2.0' | make: *** [build-stamp] Error 2 I would suggest two fixes: 1. see if the latest upstream version still has the unused variables, and if not, fix them :) 2. do not use -Werror, instead using DEB_CFLAGS_APPEND=-Werror locally and grepping through autobuilder build logs for "[-W" to find future warnings. Warnings due to new toolchain or new platforms are not worth delaying release team work, porter work, and toolchain improvements. Unfortunately there is no automated setup for (2) yet, so I can understand if you want to keep the -Werror. (If you'd like a wishlist bug to keep track of that, let me know.) The following patch is only tangentially related --- it gets DEB_CFLAGS_APPEND and DEB_BUILD_OPTIONS working. Upstream's configure script still does if test "$CC" = gcc; then CFLAGS="$CFLAGS -Wall -Werror" else CFLAGS="$CFLAGS" fi (agh!) so for better or worse it does not let users override the Werror without some ugly trick like CC=/usr/bin/gcc. Thanks for keeping dict nicely packaged, and hope that helps. Regards, Jonathan [1] http://lists.debian.org/debian-devel-announce/2011/02/msg00012.html --- debian/changelog | 11 +++++++++++ debian/control | 3 ++- debian/rules | 9 ++------- 3 files changed, 15 insertions(+), 8 deletions(-) diff --git a/debian/changelog b/debian/changelog index 542e1b2..d059e34 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,14 @@ +libmaa (1.2.0-1.1) local; urgency=low + + * Retrieve compiler flags at build time using dpkg-buildflags, + so settings like DEB_CFLAGS_APPEND=-Werror from the environment + can be respected. + * Pass CFLAGS to configure at build time. Previously it was + set but not exported, so DEB_BUILD_OPTIONS=noopt did not work. + * Build-Depends: dpkg-dev (>= 1.15.7) for dpkg-buildflags. + + -- Jonathan Nieder <jrnie...@gmail.com> Fri, 29 Apr 2011 03:46:07 -0500 + libmaa (1.2.0-1) unstable; urgency=low * New upstream release. diff --git a/debian/control b/debian/control index 6b2b9b3..dff6eb0 100644 --- a/debian/control +++ b/debian/control @@ -1,7 +1,8 @@ Source: libmaa Priority: optional Maintainer: Robert Luberda <rob...@debian.org> -Build-Depends: quilt, debhelper (>= 7), autotools-dev, libtool +Build-Depends: quilt, debhelper (>= 7), autotools-dev, libtool, + dpkg-dev (>= 1.15.7) Standards-Version: 3.8.3 Section: libs Homepage: http://sourceforge.net/projects/dict/ diff --git a/debian/rules b/debian/rules index 16c1f5d..326c44f 100755 --- a/debian/rules +++ b/debian/rules @@ -19,12 +19,7 @@ else confflags = --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE) endif -CFLAGS=-D_REENTRANT -ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) - CFLAGS += -g -Wall -O0 -else - CFLAGS += -g -Wall -O2 -endif +CFLAGS := -D_REENTRANT -Wall $(shell dpkg-buildflags --get CFLAGS) LDFLAGS = -Wl,-z,defs -Wl,--as-needed DESTDIR = $(CURDIR)/debian/tmp @@ -59,7 +54,7 @@ configure-stamp: LDFLAGS="$(LDFLAGS)" \ ./configure --verbose \ --prefix=/usr \ - $(confflags) + $(confflags) -- CFLAGS='$(CFLAGS)' touch "$@" build-stamp: -- 1.7.5 -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org