Debian Bug report logs - #648016
[gcc-avr] FTBFS on mips, mipsel and sparc

version graph

Package: gcc-4.6; Maintainer for gcc-4.6 is Debian GCC Maintainers <debian-gcc@lists.debian.org>; Source for gcc-4.6 is src:gcc-4.6.

Reported by: Maximilian Engelhardt <maxi@daemonizer.de>

Date: Tue, 18 Oct 2011 20:30:01 UTC

Severity: important

Tags: confirmed, fixed-upstream

Found in version gcc-4.6/4.6.2-4

Done: Matthias Klose <doko@debian.org>

Bug is archived. No further changes may be made.

Forwarded to http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51187

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Hakan Ardo <hakan@debian.org>:
Bug#645822; Package gcc-avr. (Tue, 18 Oct 2011 20:30:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Maximilian Engelhardt <maxi@daemonizer.de>:
New Bug report received and forwarded. Copy sent to Hakan Ardo <hakan@debian.org>. (Tue, 18 Oct 2011 20:30:04 GMT) Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Maximilian Engelhardt <maxi@daemonizer.de>
To: submit@bugs.debian.org
Subject: [gcc-avr] FTBFS on mips, mipsel and sparc
Date: Tue, 18 Oct 2011 22:20:57 +0200
[Message part 1 (text/plain, inline)]
Package: gcc-avr
Version: 1:4.5.3-1
Severity: normal

gcc-avr failed to build on mips, mipsel and sparc. Thus it can't migrate to 
testing. See this link here:

http://release.debian.org/migration/testing.pl?package=gcc-avr


It would be nice to see this fixed, so avr-gcc can enter testing again and be 
released with the next stable Debian version (wheezy).

Greetings,
Maxi
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Hakan Ardo <hakan@debian.org>:
Bug#645822; Package gcc-avr. (Tue, 01 Nov 2011 00:15:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to peter green <peter.green@postgrad.manchester.ac.uk>:
Extra info received and forwarded to list. Copy sent to Hakan Ardo <hakan@debian.org>. (Tue, 01 Nov 2011 00:15:03 GMT) Full text and rfc822 format available.

Message #10 received at 645822@bugs.debian.org (full text, mbox):

From: peter green <peter.green@postgrad.manchester.ac.uk>
To: 645822@bugs.debian.org
Cc: control@bugs.debian.org
Subject: [gcc-avr] FTBFS on mips, mipsel and sparc
Date: Tue, 01 Nov 2011 00:11:13 +0000
severity 645822 serious
Thanks

From the rc policy: http://release.debian.org/wheezy/rc_policy.txt
>Packages must autobuild without failure on all architectures on
>which they are supported. Packages must be supported on as many
>architectures as is reasonably possible. Packages are assumed to
>be supported on all architectures for which they have previously
>built successfully. Prior builds for unsupported architectures
>must be removed from the archive (contact -release or ftpmaster
>if this is the case).

By my reading of that paragraph this is rc until/unless the maintainer
explicitly declares that they consider continuing to support those
architectures unreasonable and requests removal of the old binaries
from the archive.




Severity set to 'serious' from 'normal' Request was from peter green <peter.green@postgrad.manchester.ac.uk> to control@bugs.debian.org. (Tue, 01 Nov 2011 00:15:05 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Hakan Ardo <hakan@debian.org>:
Bug#645822; Package gcc-avr. (Tue, 08 Nov 2011 11:18:21 GMT) Full text and rfc822 format available.

Acknowledgement sent to Bastien ROUCARIES <roucaries.bastien@gmail.com>:
Extra info received and forwarded to list. Copy sent to Hakan Ardo <hakan@debian.org>. (Tue, 08 Nov 2011 11:18:24 GMT) Full text and rfc822 format available.

Message #17 received at 645822@bugs.debian.org (full text, mbox):

From: Bastien ROUCARIES <roucaries.bastien@gmail.com>
To: 645822@bugs.debian.org
Subject: gcc-avr FTBS on sparc: gcc bus error during compilation
Date: Tue, 8 Nov 2011 12:14:20 +0100
clone 645822 -1
reassign -1 gcc-4.5
block 645822 by -1
thanks

Dear gcc developper,

gcc-avr fail to build  with bus error compiling a .md file
See https://buildd.debian.org/status/fetch.php?pkg=gcc-avr&arch=sparc&ver=1%3A4.5.3-2&stamp=1313229652

This smell like a gcc bug.

Bastien




Bug 645822 cloned as bug 648016. Request was from Bastien ROUCARIES <roucaries.bastien@gmail.com> to control@bugs.debian.org. (Tue, 08 Nov 2011 11:18:34 GMT) Full text and rfc822 format available.

Bug reassigned from package 'gcc-avr' to 'gcc-4.5'. Request was from Bastien ROUCARIES <roucaries.bastien@gmail.com> to control@bugs.debian.org. (Tue, 08 Nov 2011 11:18:37 GMT) Full text and rfc822 format available.

Bug No longer marked as found in versions gcc-avr/1:4.5.3-1. Request was from Bastien ROUCARIES <roucaries.bastien@gmail.com> to control@bugs.debian.org. (Tue, 08 Nov 2011 11:18:38 GMT) Full text and rfc822 format available.

Added indication that bug 648016 blocks 645822 Request was from Bastien ROUCARIES <roucaries.bastien@gmail.com> to control@bugs.debian.org. (Tue, 08 Nov 2011 11:18:39 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Debian GCC Maintainers <debian-gcc@lists.debian.org>:
Bug#648016; Package gcc-4.5. (Sun, 13 Nov 2011 12:51:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jurij Smakov <jurij@wooyd.org>:
Extra info received and forwarded to list. Copy sent to Debian GCC Maintainers <debian-gcc@lists.debian.org>. (Sun, 13 Nov 2011 12:51:04 GMT) Full text and rfc822 format available.

Message #30 received at 648016@bugs.debian.org (full text, mbox):

From: Jurij Smakov <jurij@wooyd.org>
To: 648016@bugs.debian.org
Subject: Some analysis
Date: Sun, 13 Nov 2011 12:31:24 +0000
reassign 648016 gcc-4.6
found 648016 4.6.2-4
thanks

This bug really is in gcc-4.6, because it is currently the default sid 
gcc and it is used to (mis)compile src/build/genrecog.c during 
gcc-avr build, which later crashes. I'm fairly certain that this is 
gcc problem, because if the binary is compiled with -O0, the problem 
goes away. All debugging output below was obtained on a sparc machine 
running up-to-date sid, invoking build/genrecog under gdb with a 
single argument of '../../src/gcc/config/avr/avr.md'.

Tracing the execution is somewhat tricky, since failure happens within 
write_tree(), and most of the functions write_tree() calls 
(write_tree_1, write_switch, write_node, write_action, etc) are
optimized out. The output generated by 

build/genrecog ../../src/gcc/config/avr/avr.md

is the same as the one produced on an amd64 system until we hit the 
following code in genrecog.c/write_switch(): 

  else if (type == DT_mode
       || type == DT_veclen
       || type == DT_elt_zero_int
       || type == DT_elt_one_int
       || type == DT_elt_zero_wide_safe)
    {
      const char *indent = "";

      /* We cast switch parameter to integer, so we must ensure that the value
     fits.  */
      if (type == DT_elt_zero_wide_safe)
    {
      indent = "  ";
      printf("  if ((int) XWINT (x%d, 0) == XWINT (x%d, 0))\n", depth, depth);
    }
      printf ("%s  switch (", indent);
      switch (type)
    {
    case DT_mode:
      printf ("GET_MODE (x%d)", depth);
      break;
    case DT_veclen:
      printf ("XVECLEN (x%d, 0)", depth);
      break;
    case DT_elt_zero_int:
      printf ("XINT (x%d, 0)", depth);
      break;
    case DT_elt_one_int:
      printf ("XINT (x%d, 1)", depth);
      break;
    case DT_elt_zero_wide_safe:
      /* Convert result of XWINT to int for portability since some C
         compilers won't do it and some will.  */
      printf ("(int) XWINT (x%d, 0)", depth);
      break;
    default:
      gcc_unreachable ();
    }

The problem appears after executing the 

printf ("%s  switch (", indent);

statetement. It looks like compiler generates a number of small stubs 
within write_tree() for calling printf with all possible format 
statements. Here's how the generated assembler code looks for this 
particular one, starting at 0x00013e60:

Dump of assembler code from 0x13e40 to 0x13ea0:
   0x00013e40 <write_tree+2144>:	ld  [ %i5 + 0x1c ], %o2
   0x00013e44 <write_tree+2148>:	sethi  %hi(0x1e800), %o0
   0x00013e48 <write_tree+2152>:	or  %l1, 0x110, %o1
   0x00013e4c <write_tree+2156>:	call  0x3510c <printf@plt>
   0x00013e50 <write_tree+2160>:	or  %o0, 0x258, %o0
   0x00013e54 <write_tree+2164>:	b  %xcc, 0x13bf4 <write_tree+1556>
   0x00013e58 <write_tree+2168>:	ld  [ %i0 ], %i5
   0x00013e5c <write_tree+2172>:	be,pn   %icc, 0x13850 <write_tree+624>
=> 0x00013e60 <write_tree+2176>:	sethi  %hi(0x1f400), %i3
   0x00013e64 <write_tree+2180>:	sethi  %hi(0x1e800), %o0
   0x00013e68 <write_tree+2184>:	or  %o0, 0x2b0, %o0	! 0x1eab0
   0x00013e6c <write_tree+2188>:	call  0x3510c <printf@plt>
   0x00013e70 <write_tree+2192>:	or  %i3, 0xe8, %o1
   0x00013e74 <write_tree+2196>:	cmp  %l7, 7
   0x00013e78 <write_tree+2200>:	sll  %l7, 2, %g1
   0x00013e7c <write_tree+2204>:	sethi  %hi(0x1e800), %o0
   0x00013e80 <write_tree+2208>:	mov  %l6, %o1
   0x00013e84 <write_tree+2212>:	call  0x3510c <printf@plt>
   0x00013e88 <write_tree+2216>:	or  %o0, 0x3e8, %o0
   0x00013e8c <write_tree+2220>:	b  %xcc, 0x13bac <write_tree+1484>
   0x00013e90 <write_tree+2224>:	ld  [ %fp + -192 ], %g3
   0x00013e94 <write_tree+2228>:	b  %xcc, 0x13ad0 <write_tree+1264>
   0x00013e98 <write_tree+2232>:	st  %g2, [ %fp + -188 ]
   0x00013e9c <write_tree+2236>:	cmp  %g0, %i3
End of assembler dump.

Confirmation that 0x1eab0 contains the correct format statement 
(passed to printf in %o0):

(gdb) printf "%s\n", (char *) 0x1eab0
%s  switch (
(gdb)

A remarkable feature of this stub is that it does not have a return 
branch statement, like others do (see 0x00013e54, for example). So, 
instead of returning to the correct location where the stub was 
invoked in write_switch(), we fall through to 0x00013e74, and start 
executing the next stub, which invokes printf with a format 
statement at 0x1ebe8 (== 0x1e800 | 0x3e8):

(gdb) printf "%s\n", (char *) 0x1ebe8
%sreturn gen_split_%d (insn, operands);

(gdb) 

This is completely unrelated code, normally invoked by 
write_action(), line 2182. Once it's done, we jump back to completely 
wrong location at 0x00013e8c, eventually causing a crash.

Best regards,
-- 
Jurij Smakov                                           jurij@wooyd.org
Key: http://www.wooyd.org/pgpkey/                      KeyID: C99E03CC




Bug reassigned from package 'gcc-4.5' to 'gcc-4.6'. Request was from Jurij Smakov <jurij@wooyd.org> to control@bugs.debian.org. (Sun, 13 Nov 2011 12:51:08 GMT) Full text and rfc822 format available.

Bug Marked as found in versions gcc-4.6/4.6.2-4. Request was from Jurij Smakov <jurij@wooyd.org> to control@bugs.debian.org. (Sun, 13 Nov 2011 12:51:09 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Debian GCC Maintainers <debian-gcc@lists.debian.org>:
Bug#648016; Package gcc-4.6. (Mon, 14 Nov 2011 18:27:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Matthias Klose <doko@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian GCC Maintainers <debian-gcc@lists.debian.org>. (Mon, 14 Nov 2011 18:27:03 GMT) Full text and rfc822 format available.

Message #39 received at 648016@bugs.debian.org (full text, mbox):

From: Matthias Klose <doko@debian.org>
To: Jurij Smakov <jurij@wooyd.org>, 648016@bugs.debian.org
Subject: Re: Bug#648016: Some analysis
Date: Mon, 14 Nov 2011 19:24:58 +0100
On 11/13/2011 01:31 PM, Jurij Smakov wrote:
> reassign 648016 gcc-4.6
> found 648016 4.6.2-4
> thanks
> 
> This bug really is in gcc-4.6, because it is currently the default sid 
> gcc and it is used to (mis)compile src/build/genrecog.c during 
> gcc-avr build, which later crashes. I'm fairly certain that this is 
> gcc problem, because if the binary is compiled with -O0, the problem 
> goes away. All debugging output below was obtained on a sparc machine 
> running up-to-date sid, invoking build/genrecog under gdb with a 
> single argument of '../../src/gcc/config/avr/avr.md'.

I don't plan to work on this.

for what reason is the cross compiler built for anything besides x86?




Set Bug forwarded-to-address to 'http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51187'. Request was from Jurij Smakov <jurij@wooyd.org> to control@bugs.debian.org. (Thu, 17 Nov 2011 09:06:08 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Debian GCC Maintainers <debian-gcc@lists.debian.org>:
Bug#648016; Package gcc-4.6. (Fri, 18 Nov 2011 20:57:07 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jurij Smakov <jurij@wooyd.org>:
Extra info received and forwarded to list. Copy sent to Debian GCC Maintainers <debian-gcc@lists.debian.org>. (Fri, 18 Nov 2011 20:57:07 GMT) Full text and rfc822 format available.

Message #46 received at 648016@bugs.debian.org (full text, mbox):

From: Jurij Smakov <jurij@wooyd.org>
To: 648016@bugs.debian.org
Subject: Lower the severity as workaround has been found
Date: Fri, 18 Nov 2011 20:53:45 +0000
severity 648016 important
thanks

I'm dropping the severity of this bug because gcc-avr FTBFS goes away 
if one drops --disable-checking from configure flags (it currently 
uses it), and using it is not recommended by GCC maintainers (see 
discussion in the upstream bug). 

Best regards,
-- 
Jurij Smakov                                           jurij@wooyd.org
Key: http://www.wooyd.org/pgpkey/                      KeyID: C99E03CC




Severity set to 'important' from 'serious' Request was from Jurij Smakov <jurij@wooyd.org> to control@bugs.debian.org. (Fri, 18 Nov 2011 20:57:11 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Debian GCC Maintainers <debian-gcc@lists.debian.org>:
Bug#648016; Package gcc-4.6. (Sat, 19 Nov 2011 22:39:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Bastien ROUCARIES <roucaries.bastien@gmail.com>:
Extra info received and forwarded to list. Copy sent to Debian GCC Maintainers <debian-gcc@lists.debian.org>. (Sat, 19 Nov 2011 22:39:03 GMT) Full text and rfc822 format available.

Message #53 received at 648016@bugs.debian.org (full text, mbox):

From: Bastien ROUCARIES <roucaries.bastien@gmail.com>
To: 648016@bugs.debian.org
Cc: Jurij Smakov <jurij@wooyd.org>, Matthias Klose <doko@debian.org>
Subject: Fixed upstream
Date: Sat, 19 Nov 2011 23:36:04 +0100
tags 648016 + fixed-upstream
tags 648016 + confirmed
thanks

Hi,

This bug is fixed upstream. Please upgrade.

Thanks




Added tag(s) fixed-upstream. Request was from Bastien ROUCARIES <roucaries.bastien@gmail.com> to control@bugs.debian.org. (Sat, 19 Nov 2011 22:39:07 GMT) Full text and rfc822 format available.

Added tag(s) confirmed. Request was from Bastien ROUCARIES <roucaries.bastien@gmail.com> to control@bugs.debian.org. (Sat, 19 Nov 2011 22:39:08 GMT) Full text and rfc822 format available.

Reply sent to Matthias Klose <doko@debian.org>:
You have taken responsibility. (Mon, 14 Jan 2013 17:45:03 GMT) Full text and rfc822 format available.

Notification sent to Maximilian Engelhardt <maxi@daemonizer.de>:
Bug acknowledged by developer. (Mon, 14 Jan 2013 17:45:03 GMT) Full text and rfc822 format available.

Message #62 received at 648016-done@bugs.debian.org (full text, mbox):

From: Matthias Klose <doko@debian.org>
To: 648016-done@bugs.debian.org
Subject: Re: [gcc-avr] FTBFS on mips, mipsel and sparc
Date: Mon, 14 Jan 2013 18:41:10 +0100
closing this issue, fixed upstream, and gcc-avr should build with
--enable-checking=release.



Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Tue, 12 Feb 2013 07:26:02 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Wed Apr 23 13:18:50 2014; Machine Name: buxtehude.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.