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 733162

Summary: icu-4.4.1-3.fc14 fails to build on ARM due to gcc bug
Product: [Fedora] Fedora Reporter: Daniel Drake <dsd>
Component: icuAssignee: Caolan McNamara <caolanm>
Status: CLOSED NEXTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 14CC: caolanm, denis.arnaud_fedora, jakub, pbrobinson
Target Milestone: ---   
Target Release: ---   
Hardware: arm7   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-08-25 11:33:30 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 245418    
Attachments:
Description Flags
test case with instructions inside
none
icu workaround to avoid using GCC atomic builtins on ARM none

Description Daniel Drake 2011-08-24 23:02:30 UTC
Created attachment 519738 [details]
test case with instructions inside

icu fails to build for ARM on f14:

/usr/bin/ld: ../../make[2]: Leaving directory `/builddir/build/BUILD/icu/source/tools/makeconv'
bin/makeconv: hidden symbol `__sync_val_compare_and_swap_4' in /usr/lib/gcc/armv5tel-redhat-linux-gnueabi/4.5.1/libgcc.a(linux-atomic.o) is referenced by DSO
/usr/bin/ld: final link failed: Nonrepresentable section on output
collect2: ld returned 1 exit status

This is somehow related to http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40134
however, the patches mentioned there are shipped in F14 gcc. hmm.

I narrowed this down to a small test case, which I will attach. To summarise, when using GCC's inbuilt atomic functions in a DSO linked with g++, the atomic function code doesn't get copied from libgcc.a into the output DSO like it should. If linking with gcc instead of g++, it works fine.

The test case is already confirmed to work on F15, so even though this is a gcc bug, I think it would be acceptable to work around this in F14 within the icu package, and dedicate our time to moving to F15+ ASAP.

I'm attaching my proposed workaround. Also, an already-upstream patch is needed from http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=589076

then it builds OK :)

Comment 1 Daniel Drake 2011-08-24 23:10:33 UTC
Created attachment 519741 [details]
icu workaround to avoid using GCC atomic builtins on ARM

Comment 2 Caolan McNamara 2011-08-25 08:54:31 UTC
Checked in both fixes to F14, and the asm one for F15. F16 onwards should have the asm fix already.

That sufficient, or anything else needed ?

Comment 3 Peter Robinson 2011-08-25 15:13:12 UTC
> That sufficient, or anything else needed ?

Absolutely perfect! Thanks for the fixes to all branches and the very quick response :)