Package: binutils
Version: 2.17cvs20070426-2
Severity: serious
Tags: patch
Justification: Fails to build from source

binutils version 2.17cvs20070426-2 fails to build from source:

Automatic build of binutils_2.17cvs20070426-2 on cats by sbuild/arm 98
Build started at 20070427-2145
******************************************************************************
Checking available source versions...
Fetching source files...
Reading package lists...
Building dependency tree...
Need to get 17.1MB of source archives.
Get:1 http://incoming.debian.org unstable/main binutils 2.17cvs20070426-2 (dsc) 
[906B]
Get:2 http://incoming.debian.org unstable/main binutils 2.17cvs20070426-2 (tar) 
[17.1MB]
Get:3 http://incoming.debian.org unstable/main binutils 2.17cvs20070426-2 
(diff) [45.2kB]
Fetched 17.1MB in 35s (476kB/s)
Download complete and in download only mode
** Using build dependencies supplied by package:
Build-Depends: dpkg-dev (>= 1.13.9), autoconf (>= 2.13), bison, flex, gettext, 
texinfo, binutils (>= 2.9.5.0.12), gcc (>= 2.95.2-1), dejagnu (>= 1.4.2-1.1), 
expect-tcl8.3 (>= 5.32.2-1), dpatch, file, bzip2, lsb-release
Checking for already installed source dependencies...
dpkg-dev: already installed (1.13.25 >= 1.13.9 is satisfied)
autoconf: missing
bison: missing
flex: missing

[...]

gcc -DHAVE_CONFIG_H -I. -I../../gas -I. -D_GNU_SOURCE -I. -I../../gas -I../bfd 
-I../../gas/config -I../../gas/../include -I../../gas/.. -I../../gas/../bfd 
-DLOCALEDIR="\"/usr/share/locale\""   -W -Wall -Wstrict-prototypes 
-Wmissing-prototypes -Werror -g -O2 -c ../../gas/stabs.c
gcc -DHAVE_CONFIG_H -I. -I../../gas -I. -D_GNU_SOURCE -I. -I../../gas -I../bfd 
-I../../gas/config -I../../gas/../include -I../../gas/.. -I../../gas/../bfd 
-DLOCALEDIR="\"/usr/share/locale\""   -W -Wall -Wstrict-prototypes 
-Wmissing-prototypes -Werror -g -O2 -c ../../gas/subsegs.c
gcc -DHAVE_CONFIG_H -I. -I../../gas -I. -D_GNU_SOURCE -I. -I../../gas -I../bfd 
-I../../gas/config -I../../gas/../include -I../../gas/.. -I../../gas/../bfd 
-DLOCALEDIR="\"/usr/share/locale\""   -W -Wall -Wstrict-prototypes 
-Wmissing-prototypes -Werror -g -O2 -c ../../gas/symbols.c
gcc -DHAVE_CONFIG_H -I. -I../../gas -I. -D_GNU_SOURCE -I. -I../../gas -I../bfd 
-I../../gas/config -I../../gas/../include -I../../gas/.. -I../../gas/../bfd 
-DLOCALEDIR="\"/usr/share/locale\""   -W -Wall -Wstrict-prototypes 
-Wmissing-prototypes -Werror -g -O2 -c ../../gas/write.c
gcc -DHAVE_CONFIG_H -I. -I../../gas -I. -D_GNU_SOURCE -I. -I../../gas -I../bfd 
-I../../gas/config -I../../gas/../include -I../../gas/.. -I../../gas/../bfd 
-DLOCALEDIR="\"/usr/share/locale\""   -W -Wall -Wstrict-prototypes 
-Wmissing-prototypes -Werror -g -O2 -c ../../gas/config/tc-arm.c
cc1: warnings being treated as errors
../../gas/config/tc-arm.c: In function 'md_apply_fix':
../../gas/config/tc-arm.c:18699: warning: format '%08lX' expects type 'long 
unsigned int', but argument 4 has type 'bfd_vma'
../../gas/config/tc-arm.c:18699: warning: format '%08lX' expects type 'long 
unsigned int', but argument 4 has type 'bfd_vma'
../../gas/config/tc-arm.c:18739: warning: format '%08lX' expects type 'long 
unsigned int', but argument 4 has type 'bfd_vma'
../../gas/config/tc-arm.c:18739: warning: format '%08lX' expects type 'long 
unsigned int', but argument 4 has type 'bfd_vma'
../../gas/config/tc-arm.c:18778: warning: format '%08lX' expects type 'long 
unsigned int', but argument 4 has type 'bfd_vma'
../../gas/config/tc-arm.c:18778: warning: format '%08lX' expects type 'long 
unsigned int', but argument 4 has type 'bfd_vma'
../../gas/config/tc-arm.c:18818: warning: format '%08lX' expects type 'long 
unsigned int', but argument 4 has type 'bfd_vma'
../../gas/config/tc-arm.c:18818: warning: format '%08lX' expects type 'long 
unsigned int', but argument 4 has type 'bfd_vma'
../../gas/config/tc-arm.c:18823: warning: format '%08lX' expects type 'long 
unsigned int', but argument 4 has type 'bfd_vma'
../../gas/config/tc-arm.c:18823: warning: format '%08lX' expects type 'long 
unsigned int', but argument 4 has type 'bfd_vma'
make[5]: *** [tc-arm.o] Error 1
make[5]: Leaving directory 
`/build/buildd/binutils-2.17cvs20070426/builddir-multi/gas'
make[4]: *** [all-recursive] Error 1


Paul Brook (the main upstream committer of this file) suggested a cast
of the value to unsigned long. Please find a patch below to fix that.


diff -u binutils-2.17cvs20070426/debian/patches/00list 
binutils-2.17cvs20070426/debian/patches/00list
--- binutils-2.17cvs20070426/debian/patches/00list
+++ binutils-2.17cvs20070426/debian/patches/00list
@@ -5,2 +5,3 @@
 012_check_ldrunpath_length
+100_warning_arm
 127_x86_64_i386_biarch
--- binutils-2.17cvs20070426.orig/debian/patches/100_warning_arm.dpatch
+++ binutils-2.17cvs20070426/debian/patches/100_warning_arm.dpatch
@@ -0,0 +1,69 @@
+#!/bin/sh -e
+## 100_warning_arm.dpatch by Aurelien Jarno <[EMAIL PROTECTED]>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Fix a few warnings in the arm part that cause a build failure
+
+if [ $# -ne 1 ]; then
+    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+    exit 1
+fi
+
+[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
+patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
+
+case "$1" in
+       -patch) patch $patch_opts -p1 < $0;;
+       -unpatch) patch $patch_opts -p1 -R < $0;;
+        *)
+                echo >&2 "`basename $0`: script expects -patch|-unpatch as 
argument"
+                exit 1;;
+esac
+
+exit 0
+
[EMAIL PROTECTED]@
+--- binutils-2.17cvs20070426.orig/gas/config/tc-arm.c
++++ binutils-2.17cvs20070426/gas/config/tc-arm.c
+@@ -18696,7 +18696,7 @@
+          if (encoded_addend == (unsigned int) FAIL)
+          as_bad_where (fixP->fx_file, fixP->fx_line,
+                        _("the offset 0x%08lX is not representable"),
+-                         addend_abs);
++                         (unsigned long)addend_abs);
+ 
+          /* Extract the instruction.  */
+          insn = md_chars_to_number (buf, INSN_SIZE);
+@@ -18736,7 +18736,7 @@
+           if (addend_abs >= 0x1000)
+           as_bad_where (fixP->fx_file, fixP->fx_line,
+                         _("bad offset 0x%08lX (only 12 bits available for the 
magnitude)"),
+-                          addend_abs);
++                          (unsigned long) addend_abs);
+ 
+           /* Extract the instruction.  */
+           insn = md_chars_to_number (buf, INSN_SIZE);
+@@ -18775,7 +18775,7 @@

+           if (addend_abs >= 0x100)
+           as_bad_where (fixP->fx_file, fixP->fx_line,
+                         _("bad offset 0x%08lX (only 8 bits available for the 
magnitude)"),
+-                          addend_abs);
++                          (unsigned long) addend_abs);
+ 
+           /* Extract the instruction.  */
+           insn = md_chars_to_number (buf, INSN_SIZE);
+@@ -18815,12 +18815,12 @@
+           if (addend_abs & 0x3)
+           as_bad_where (fixP->fx_file, fixP->fx_line,
+                         _("bad offset 0x%08lX (must be word-aligned)"),
+-                          addend_abs);
++                          (unsigned long) addend_abs);
+ 
+           if ((addend_abs >> 2) > 0xff)
+           as_bad_where (fixP->fx_file, fixP->fx_line,
+                         _("bad offset 0x%08lX (must be an 8-bit number of 
words)"),
+-                          addend_abs);
++                          (unsigned long) addend_abs);
+ 
+           /* Extract the instruction.  */
+           insn = md_chars_to_number (buf, INSN_SIZE);




-- System Information:
Debian Release: 4.0
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: amd64 (x86_64)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.18-3-xen-amd64
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)

Versions of packages binutils depends on:
ii  libc6                  2.3.6.ds1-13etch1 GNU C Library: Shared libraries

binutils recommends no packages.

-- no debconf information


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to