Bug 699149 - Atomic __sync_fetch_and_{add,or,and} fail on ppc
Summary: Atomic __sync_fetch_and_{add,or,and} fail on ppc
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: gcc
Version: 5.8
Hardware: ppc
OS: Linux
unspecified
medium
Target Milestone: rc
: ---
Assignee: Jakub Jelinek
QA Contact: qe-baseos-tools-bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-04-23 16:14 UTC by Mattias Ellert
Modified: 2011-05-13 11:43 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-04-28 17:17:23 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Mattias Ellert 2011-04-23 16:14:00 UTC
Description of problem:

When compiling xrootd in koji for EPEL 5 ppc I get the following errors:

/builddir/build/BUILD/xrootd-3.0.3/src/Xrd/.libs/libXrd.so: undefined reference to `__sync_fetch_and_add_8'
/builddir/build/BUILD/xrootd-3.0.3/src/Xrd/.libs/libXrd.so: undefined reference to `__sync_fetch_and_or_8'
/builddir/build/BUILD/xrootd-3.0.3/src/Xrd/.libs/libXrd.so: undefined reference to `__sync_fetch_and_and_8'

For a full build log see:
https://koji.fedoraproject.org/koji/getfile?taskID=3021012&name=build.log

The configure script has a test that checks if these functions are implemented and that test succeeds:

"checking whether gcc provide atomic ops... yes"

But the compilation fails anyway.

The compilation works fine on i386 and x86_64.

Version-Release number of selected component (if applicable):
gcc-4.1.2-50.el5.ppc
gcc-c++-4.1.2-50.el5.ppc

How reproducible:
I tried pushing the resubmit button and got the same error again.
(I don't have access to any other ppc system to do testing than submitting things to koji - so it is not easy to figure out what is broken.)

Steps to Reproduce:
1. Submit xrootd 3.0.3 to EPEL 5 koji

Actual results:
Build fails on ppc (succeeds on i386 an x86_64)

Expected results:
Successful builds on all architectures

Comment 1 Jakub Jelinek 2011-04-28 17:17:23 UTC
Wrong assumption of the package.  If the configury test tests for say 32-bit __sync_* and then tries to use 64-bit __sync_*, it can very well fail.
PowerPC 32-bit doesn't have 64-bit atomics (similarly to e.g. i486; i586+ supports even 64-bit ones though).


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