[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug in gcc for powerpc?



On Tue, Jul 31, 2012 at 6:56 PM, Roger Leigh <rleigh@codelibre.net> wrote:
> On Tue, Jul 31, 2012 at 11:47:00PM +0100, Roger Leigh wrote:
>> On Tue, Jul 31, 2012 at 09:39:58AM -0400, Felipe Sateler wrote:
>> > On Mon, Jul 30, 2012 at 5:09 PM, Roger Leigh <rleigh@codelibre.net> wrote:
>> > > On Sat, Jul 28, 2012 at 08:43:16PM -0400, Felipe Sateler wrote:
>> > >> On Sat, Jul 28, 2012 at 8:34 PM, Roger Leigh <rleigh@codelibre.net> wrote:
>> > >> > On Sat, Jul 28, 2012 at 04:45:35PM -0400, Felipe Sateler wrote:
>> > >> >> Hi gcc and powerpc teams,
>> > >> >>
>> > >> >> Supercollider recently failed to build in powerpc[1] with some weird
>> > >> >> errors about operand out of range. Googling around suggests working
>> > >> >> around the problem by avoiding inlining. And in fact, SC builds after
>> > >> >> avoiding inlining one function. However, it seems to me this is a bug
>> > >> >> in gcc, since it shouldn't ouptut invalid assembler. I'm not quite
>> > >> >> sure how to handle this sort of bug, however. Where should I file this
>> > >> >> bug (that is, which package)? This bug seems to have happened a few
>> > >> >> times already, so I'm not quite sure if this is supposed to be fixed
>> > >> >> or not.
>> > >> >
>> > >> > Just as a data point, I've reproduced this identically on current
>> > >> > unstable (powerpc).  Have you tried using a different compiler
>> > >> > version e.g. 4.7?  I can do further investigation tomorrow if you
>> > >> > would like.
>> > >>
>> > >> I am testing on partch, I don't have access to other ppc hardware.
>> > >> Partch has gcc 4.4 and 4.6, it fails with both, with the same error
>> > >> but in different places (4.4 has lots of errors, 4.6 just 2).
>> > >
>> > > I can give you access to a G4 ppc running current testing with
>> > > build chroots available on it if you would find that useful.e  The
>> > > only thing is that you'll need IPv6 to access it.
>> >
>> > I don't think it'd be useful. I definitely do not have the expertise
>> > to debug gcc.
>>
>> I'll try doing a binary-only NMU build with sbuild (á la the buildds),
>> and if that also succeeds, I'll upload it.  If I can reproduce the
>> failure, I'll see if I can dump the preprocessed source and make a
>> testcase; but given the elusive nature of the bug this might not be
>> possible.
>
> Hmm, I see 1:3.5.3~repack-3 has built successfully over two days ago.
> Did you find out what the problem was here?

It appears I wasn't clear in my first e-mail. I have found
a workaround for the issue (which doesn't mean the fix is correct,
unfortunately). As I understand the issue:

1. The GNU assembler on PowerPC requires (maybe an ELF limitation?)
that some sections have some maximum size (this is where I don't know
what I'm talking about, just repeating what google told me).
2. Under some conditions that involve function inlining, some bug
prevents gcc from enforcing that limit, and outputs assembler that
cannot be processed by gas.

Supercollider happens to be a heavy user of header-only libs, which in
turn are usually inlined by gcc. I have worked around the issue[1] by
arbitrarily declaring the offending function to be non-inlineable.

My original mail was sent after I produced a "fix" for supercollider.
The real issue, however, is still present in gcc. Seems strange nobody
ran into this in debian before, google says some people have
encountered it before.

[1] http://patch-tracker.debian.org/patch/series/view/supercollider/1:3.5.3~repack-3/no-inline-ppc-ftbfs.patch
-- 

Saludos,
Felipe Sateler


Reply to: