Bug 889781

Summary: ICU endian patch
Product: [Fedora] Fedora Reporter: Bryce <root>
Component: icuAssignee: Eike Rathke <erack>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 18CC: caolanm, denis.arnaud_fedora, erack
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: All   
Whiteboard:
Fixed In Version: icu-49.1.1-6.fc18 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-04-16 10:52:30 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Bryce 2012-12-23 14:00:03 UTC
Avoid the horror of an unintelligible build breakage!

LD_LIBRARY_PATH=../lib:../stubdata:../tools/ctestfw:$LD_LIBRARY_PATH  ../bin/icupkg -tb ./in/icudt49l.dat ./out/icudt49b.dat
udata_swapDataHeader(): header size mismatch - headerSize 32768 infoSize 5120 length 1024
make[1]: *** [out/icudt49b.dat] Error 8
make[1]: Leaving directory `/builddir/build/BUILD/icu/source/data'
make: *** [all-recursive] Error 2


This requires the simple setting of a CPPFLAG which is trivial, as outlined below.


Top  of spec file:
%{!?endian: %global endian %(%{__python} -c "import sys;print (0 if sys.byteorder=='big' else 1)")}


Before the %configure

# Endian: BE=0 LE=1
%if ! 0%{?endian}
CPPFLAGS="-DU_IS_BIG_ENDIAN=1"
%endif


You would think that rpm would have had an endianess macro/test variable by now. Oh well.

Phil
=--=

Comment 1 Bryce 2012-12-23 14:15:01 UTC
export CPPFLAGS="-DU_IS_BIG_ENDIAN=1"
^^^^^^

and
BuildRequires: doxygen, autoconf, python
                                  ^^^^^^
Sorry I was a bit careless

Phil
=--=

Comment 2 Eike Rathke 2013-01-25 13:30:22 UTC
All variables in the %build section are not exported, so it shouldn't be necessary for this one?

Anyhow, just pushed a change without export.