Bug 442514 - Build fails due to missing _LITTLE_ENDIAN definition in fdlibm.h
Summary: Build fails due to missing _LITTLE_ENDIAN definition in fdlibm.h
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: java-1.6.0-openjdk
Version: rawhide
Hardware: ia64
OS: Linux
low
medium
Target Milestone: ---
Assignee: Thomas Fitzsimmons
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: fedora-ia64
TreeView+ depends on / blocked
 
Reported: 2008-04-15 09:08 UTC by Zhan, Yi
Modified: 2008-04-18 14:30 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2008-04-18 14:30:01 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
add _LITTLE_ENDIAN for ia64 (376 bytes, patch)
2008-04-15 09:08 UTC, Zhan, Yi
no flags Details | Diff

Description Zhan, Yi 2008-04-15 09:08:06 UTC
Description of problem:

When trying to build java-1.6.0-openjdk on ia64, we got below error: 

java.lang.IllegalArgumentException: disparate values
        at sun.misc.FDBigInt.quoRemIteration(FloatingDecimal.java:2795)
        at sun.misc.FloatingDecimal.dtoa(FloatingDecimal.java:833)
        at sun.misc.FloatingDecimal.<init>(FloatingDecimal.java:460)
Full log: 
http://ia64.koji.fedoraproject.org/koji/getfile?taskID=51511&name=build.log 

I looked into this issue and found that Math.floor() is used in
FloatingDecimal.dtoa() to calculate decExp. And Math.floor() always returns 0
here, no matter what argument passed to it. 

The implemention of the floor function is in
openjdk/jdk/src/share/native/java/lang/fdlibm/src/s_floor.c and the cause of the
malfuntion is that the definition _LITTLE_ENDIAN is missing when including
openjdk/jdk/src/share/native/java/lang/fdlibm/include/fdlibm.h. So the big
endian macros such as __HI(x) was used instead of the little endian ones. 

Adding the definition of _LITTLE_ENDIAN in fdlibm.h for ia64 could fix the
issue. A successful test build with this fix is at
http://ia64.koji.fedoraproject.org/koji/taskinfo?taskID=60392. 

Version-Release number of selected component (if applicable):
java-1.6.0-openjdk-1.6.0.0-0.0.8.b08.fc9

How reproducible:
always

Steps to Reproduce:

The issue could be reproduced by rebuilding the srpm on ia64 or
1. make icedtea-against-ecj
2. used the just built javac to compile any .java file containing 
   public static final double MAX_VALUE = 0x1.fffffffffffffP+1023;
3.
  
Actual results:

# Running javac:
/builddir/build/BUILD/icedtea6-1.1/bootstrap/jdk1.6.0/bin/java -Xmx896m -Xms896m
-XX:-Inline -Xbootclasspath/p:/builddir/build/BUILD/ice\
dtea6-1.1/openjdk/control/build/linux-ia64/langtools/dist/bootstrap/lib/javac.jar
-jar /builddir/build/BUILD/icedtea6-1.1/openjdk/contro\
l/build/linux-ia64/langtools/dist/bootstrap/lib/javac.jar -g -source 1.5 -target
5 -encoding ascii -Xbootclasspath:/builddir/build/BUILD\
/icedtea6-1.1/openjdk/control/build/linux-ia64/classes -sourcepath
/builddir/build/BUILD/icedtea6-1.1/openjdk/control/build/linux-ia64/g\
ensrc:../../../src/solaris/classes:../../../src/share/classes -d
/builddir/build/BUILD/icedtea6-1.1/openjdk/control/build/linux-ia64/cla\
sses
@/builddir/build/BUILD/icedtea6-1.1/openjdk/control/build/linux-ia64/tmp/java/java.lang/java/.classes.list
An exception has occurred in the compiler (1.6.0-internal_bootstrap). Please
file a bug at the Java Developer Connection (http://java.su\
n.com/webapps/bugreport)  after checking the Bug Parade for duplicates. Include
your program and the following diagnostic in your report\
.  Thank you.
java.lang.IllegalArgumentException: disparate values
        at sun.misc.FDBigInt.quoRemIteration(FloatingDecimal.java:2795)
        at sun.misc.FloatingDecimal.dtoa(FloatingDecimal.java:833)
        at sun.misc.FloatingDecimal.<init>(FloatingDecimal.java:460)
        at sun.misc.FloatingDecimal.parseHexString(FloatingDecimal.java:2297)
        at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:1064)
        at java.lang.Float.valueOf(Float.java:405)

Expected results:


Additional info:

Comment 1 Zhan, Yi 2008-04-15 09:08:06 UTC
Created attachment 302428 [details]
add _LITTLE_ENDIAN for ia64

Comment 2 Gary Benson 2008-04-15 14:45:39 UTC
Fix committed into icedtea6.

Comment 3 Lillian Angel 2008-04-18 14:30:01 UTC
Building new version into rawhide, should be in tomorrow.


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