Porting libgcj...

scottb scottb@netwinder.org
Fri Aug 6 11:58:00 GMT 1999


Hi, 

I'm trying to port libgcj to run on ArmLinux on a NetWinder.  I get the
following error when building:

c++ -DHAVE_CONFIG_H -I. -I../../../../libgcj-2.95/libjava -I./include
-Iinclude -I../../../../libgcj-2.95/libjava/include
-I../../../../libgcj-2.95/libjava/../boehm-gc 
-I./../boehm-gc -DSILENT=1 -DNO_SIGNALS=1 -DNO_DEBUGGING=1
-DJAVA_FINALIZATION=1 
-I../../../../libgcj-2.95/libjava/../compat-include 
-I../../../../libgcj-2.95/libjava/../zlib
-fno-rtti -fvtable-thunks -fpermissive -W -Wall -g -O2 -fvtable-thunks 
-D_GNU_SOURCE -msoft-float -c  -fPIC -DPIC
../../../../libgcj-2.95/libjava/java/lang/natDouble.cc 
-o java/lang/.libs/natDouble.lo
In file included from
../../../../libgcj-2.95/libjava/java/lang/natDouble.cc:30:
java/lang/Double.h:38: `nan' was not declared in this scope

java/lang/Double.h is the following machine generated code:

> // DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
> 
> #ifndef __java_lang_Double__
> #define __java_lang_Double__
> 
> #pragma interface
> 
> #include <java/lang/Number.h>
> 
> class java::lang::Double : public java::lang::Number
> {
> private:
>   static jdouble doubleValueOf (java::lang::String *);
> public:
>   Double (jdouble);
>   Double (java::lang::String *);
>   java::lang::String *toString ();
>   jboolean equals (java::lang::Object *);
>   jint hashCode ();
>   jint intValue ();
>   jlong longValue ();
>   jfloat floatValue ();
>   jdouble doubleValue () { return value; }
>   jbyte byteValue ();
>   jshort shortValue ();
> public: // actually package-private
>   static java::lang::String *toString (jdouble, jboolean);
> public:
>   static java::lang::String *toString (jdouble);
>   static java::lang::Double *valueOf (java::lang::String *);
>   jboolean isNaN ();
>   static jboolean isNaN (jdouble);
>   jboolean isInfinite ();
>   static jboolean isInfinite (jdouble);
>   static jlong doubleToLongBits (jdouble);
>   static jdouble longBitsToDouble (jlong);
>   static const jdouble MIN_VALUE = 2.1219957909652723e-314;
>   static const jdouble MAX_VALUE = nan;
>   static const jdouble NEGATIVE_INFINITY;
>   static const jdouble POSITIVE_INFINITY;
>   static const jdouble NaN;
>   static java::lang::Class *TYPE;
> private:
>   jdouble value;
> };
> 
> #endif /* __java_lang_Double__ */

It seems that when generating this file, the value for MAX_VALUE is
interpreted as a NAN by printf..  I have been looking for the file
generation code but have been unable to find it.  Could someone point me
in the correct direction.

Scott


More information about the Java mailing list