Bug 182118 - Fails to biuld for ppc arch
Summary: Fails to biuld for ppc arch
Alias: None
Product: Fedora
Classification: Fedora
Component: dietlibc
Version: rawhide
Hardware: powerpc
OS: Linux
Target Milestone: ---
Assignee: Enrico Scholz
QA Contact: Fedora Extras Quality Assurance
Depends On:
Blocks: F-ExcludeArch-ppc 182120
TreeView+ depends on / blocked
Reported: 2006-02-20 17:34 UTC by Enrico Scholz
Modified: 2007-11-30 22:11 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2007-01-17 01:10:57 UTC

Attachments (Terms of Use)
Workaround (1.50 KB, patch)
2006-12-28 14:39 UTC, David Woodhouse
no flags Details | Diff

System ID Priority Status Summary Last Updated
GNU Compiler Collection 26374 None None None Never
GNU Compiler Collection 27054 None None None Never

Description Enrico Scholz 2006-02-20 17:34:24 UTC
Description of problem:

Compilation of dietlibc in devel branch fails on PPC machine at code

| 36 #define B0      +            1.0l/   6/ 1/ 2
|    ...
| 50 static const double  coeff[] = { B0, ... };

The error message is

| libm/gamma.c:50: error: initializer element is not constant
| libm/gamma.c:50: error: (near initialization for 'coeff[0]')

This code looks sane to me, it builds fine on i386 and I do not have a
PPC machine where I can trace it down further.

Therefore, an

| ExcludeArch: ppc

Version-Release number of selected component (if applicable):


Comment 1 David Woodhouse 2006-04-05 13:28:07 UTC
If there's a compiler problem, please make sure a GCC bug is filed. It seems
that this test case doesn't compile:

static const double coeff[] = { +854513.0l /138 };

Comment 2 David Woodhouse 2006-04-05 13:58:24 UTC
Removing the 'l' from the definitions of B0-B12 in libm/gamma.c seems to work
around this problem. Does that result in any loss of precision? I don't think so.

Comment 3 Enrico Scholz 2006-04-05 14:39:40 UTC
I do not want to file GCC bugs without a (minimal) reproducer. I asked on
fedora-devel maillist at 2006-02-18 for help about this issue but did not got a

So, the fastest way to solve this problem would be when a PPC user files a GCC
bug with a minimal program, gcc cmdline, gcc version and error message.

Comment 4 David Woodhouse 2006-04-06 10:46:21 UTC
It is better to file the GCC bug with the whole preprocessed source for the
offending file than not to file it at all. It was trivial to pare it down to a
one-line test case.

I can also provide you with access to PPC machines if you need it, if you
_really_ wanted to make the minimal test case for yourself. Sorry I didn't see
your mail on the fedora-devel list; please feel free to Cc me directly for PPC
issues in future -- although I've also added myself to Cc for the
ppc-excludearch tracker bug.


Comment 5 David Woodhouse 2006-09-09 08:34:26 UTC
Any progress on fixing this in FC5 GCC?

We do also have a workaround which would allow dietlibc to build anyway.

Comment 6 David Woodhouse 2006-12-28 14:39:22 UTC
Created attachment 144464 [details]

Is there any particular reason why this workaround, which was identified eight
months ago, has not yet been applied?

Comment 7 David Woodhouse 2007-01-17 01:10:57 UTC
Fixed (well, worked around) in 0.30-4 for FC-6 and devel (the system thought
that 0.30-3.fc6 already existed). Fixing the GCC bug would be useful though.

Note You need to log in before you can comment on or make changes to this bug.