Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1862181 - ppc64le as does not understand operator[]
Summary: ppc64le as does not understand operator[]
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: gcc
Version: 33
Hardware: ppc64le
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 1865254
TreeView+ depends on / blocked
 
Reported: 2020-07-30 16:34 UTC by Jerry James
Modified: 2020-10-05 08:10 UTC (History)
13 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug
Embargoed:


Attachments (Terms of Use)
File with bad symbol (261.53 KB, application/x-xz)
2020-07-30 22:13 UTC, Jerry James
no flags Details

Description Jerry James 2020-07-30 16:34:03 UTC
Description of problem:
The primecount package failed to build during the mass rebuild, on ppc64le only.  The error message indicated an assembler problem.  Rerunning the failing g++ command with -save-temps gave me this:

libprimecount.so.6.0.ltrans0.s: Assembler messages:
libprimecount.so.6.0.ltrans0.s:27109: Error: junk at end of line, first unrecognized character is `['
libprimecount.so.6.0.ltrans0.s:27110: Error: expected comma after "operator"
lto-wrapper: fatal error: /usr/bin/g++ returned 1 exit status
compilation terminated.
/usr/bin/ld: error: lto-wrapper failed
collect2: error: ld returned 1 exit status

Lines 27109 and 27110 are:
        .weak operator[]
        .set operator[],_ZNK10primecount7PiTableixEm

Version-Release number of selected component (if applicable):
binutils-2.35-3.fc33.ppc64le

How reproducible:
Always.

Steps to Reproduce:
1. fedpkg clone primecount
2. cd primecount
3. fedpkg srpm
4. On a ppc64le machine: mock -r fedora-rawhide-ppc64le --enablerepo=local --rebuild primecount-6.0-2.fc33.src.rpm

Actual results:
Build failure due to the assembler not being able to process "operator[]".

Expected results:
Successful build, like on the other architectures.

Additional info:

Comment 1 Jerry James 2020-07-30 16:35:27 UTC
See https://koji.fedoraproject.org/koji/buildinfo?buildID=1564806 for the mass rebuild failure.

Comment 2 Florian Weimer 2020-07-30 16:42:03 UTC
Can you try if disabling annobin fixes this? Thanks.

Would it be possible to compile this file with --save-temps and attach the resulting .ii file this bug?

(Something is emitting an invalid symbol name, and it could be either a GCC bug or an annobin bug.)

Comment 3 Jakub Jelinek 2020-07-30 16:44:33 UTC
It might be LTO too, so before trying -save-temps, try
%define _lto_cflags %{nil}
if it doesn't fix it.  And indeed, annobin too.

Comment 4 Nick Clifton 2020-07-30 16:55:48 UTC
It probably isn't annobin as that does not generate this kind of symbol.

Comment 5 Jerry James 2020-07-30 22:01:49 UTC
(In reply to Jakub Jelinek from comment #3)
> It might be LTO too, so before trying -save-temps, try
> %define _lto_cflags %{nil}
> if it doesn't fix it.  And indeed, annobin too.

Indeed, adding %define _lto_cflags %{nil} leads to a good build.

Comment 6 Jerry James 2020-07-30 22:13:36 UTC
Created attachment 1703009 [details]
File with bad symbol

There are no .ii files with the symbol in question, just this .s file (compressed to appease bugzilla).

Comment 7 Tom Stellard 2020-08-04 15:06:12 UTC
Is it possible this is an OOM problem, where the compiler process is getting killed while piping assembly to the assembler?  I've seen similar error messages happen when my own packages run out of memory.

Comment 8 Jerry James 2020-08-05 21:31:51 UTC
I forgot to reply here, but did on fedora-devel-list.  It is possible indeed, although it seems odd that arm would not be affected if so.  I have disabled LTO on ppc64le for now to work around the problem.

Comment 9 Nick Clifton 2020-08-10 10:04:47 UTC
I am going to reassign this bug to gcc.

The assembler is correct in generating an error, although its diagnosis does leave something to be desired.
This is either an LTO bug (most likely) or an OOM bug in gcc, causing an invalid symbol name to be generated.

Comment 10 Ben Cotton 2020-08-11 15:29:05 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 33 development cycle.
Changing version to 33.


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