[Pkg-acpi-devel] Bug#616194: acpid: FTBFS (error: comparison between signed and unsigned integer expressions)

Jonathan Nieder jrnieder at gmail.com
Thu Mar 3 06:21:31 UTC 2011


Source: acpid
Version: 1:2.0.7-1
Severity: serious
User: debian-gcc at lists.debian.org
Usertags: ftbfs-gcc-4.6 ftbfs-gcc-4.5 ftbfs-gcc-4.4
Tags: patch

Hi,

Trying to build from source (first with gcc-4.6 as gcc and cc, then
gcc-4.5, then gcc-4.4):

| $ debian/rules build
| cc -g -O2 -Wall -Wextra -Wundef -Wshadow -Werror   -c -o libnetlink.o libnetlink.c
| cc1: warnings being treated as errors
| libnetlink.c: In function ‘addraw_l’:
| libnetlink.c:521: error: comparison between signed and unsigned
| make[1]: *** [libnetlink.o] Error 1
| make[1]: Leaving directory `/tmp/acpid-2.0.8/kacpimon'
| make: *** [build] Error 2

How about this patch?

Signed-off-by: Jonathan Nieder <jrnieder at gmail.com>
---
 debian/changelog |   11 +++++++++++
 debian/control   |    2 +-
 debian/rules     |    8 ++++++--
 3 files changed, 18 insertions(+), 3 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 1d9ee9e..09e9bae 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,14 @@
+acpid (1:2.0.8-2) UNRELEASED; urgency=low
+
+  * Do not pass -Werror to gcc at build time.  (Otherwise, the
+    package fails to build from source.)
+  * Allow build flags to be customized by setting
+    DEB_BUILD_OPTIONS=noopt or DEB_CFLAGS_APPEND=-Werror in the
+    build-time environment.
+  * Build-Depends: dpkg-dev (>= 1.15.7) for dpkg-buildflags.
+
+ -- Jonathan Nieder <jrnieder at gmail.com>  Thu, 03 Mar 2011 00:17:43 -0600
+
 acpid (1:2.0.8-1) unstable; urgency=low
 
   * Imported Upstream version 2.0.8
diff --git a/debian/control b/debian/control
index 176adea..312f410 100644
--- a/debian/control
+++ b/debian/control
@@ -5,7 +5,7 @@ Maintainer: Debian Acpi Team <pkg-acpi-devel at lists.alioth.debian.org>
 Uploaders: Michael Meskes <meskes at debian.org>,
            Loic Minier <lool at dooz.org>
 Standards-Version: 3.9.1
-Build-Depends: debhelper (>= 5)
+Build-Depends: debhelper (>= 5), dpkg (>= 1.15.7)
 Vcs-Git: git://git.debian.org/git/pkg-acpi/acpid.git
 Vcs-Browser: http://git.debian.org/?p=pkg-acpi/acpid.git
 Homepage: http://acpid.sourceforge.net/
diff --git a/debian/rules b/debian/rules
index 9f6fd7f..68b8328 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,11 +1,15 @@
 #!/usr/bin/make -f
 
+cflags := -W -Wall -Wundef -Wshadow -D_GNU_SOURCE \
+	$(shell dpkg-buildflags --get CFLAGS) \
+        -fno-strict-aliasing
+
 build: 
 	dh_testdir
 	chmod g-s -R *
-	$(MAKE)
+	$(MAKE) CFLAGS='$(cflags) $$(DEFS)'
 	$(MAKE) man
-	(cd kacpimon; $(MAKE))
+	(cd kacpimon; $(MAKE) CFLAGS='$(cflags) $$(DEFS)')
 
 clean: 
 	dh_testdir
-- 
1.7.4.1






More information about the Pkg-acpi-devel mailing list