This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
gcj with date manip. and french locale (intel AND linuxppc)
Thanks to the three patches recently posted I've been able to build
gcc/gcj on linuxppc: thank you very much!
------------------------------------------------------------------------
But this doesn't work:
1 - I'm not any more ble to compile any programm dynamicaly
./test: error in loading shared libraries:
/usr/local/pack/gcc-3.0-cvs/powerpc-linux/lib/libzgcj.so.0:
R_PPC_REL24 relocation out of range
(perhaps a bad install, so this is not the problem here))
2 - I get about the same error (with the SimpleDateFormat).
It seems there is something to do with locale (so
U.S. built could work)
this error occure *** on both ppc and intel linux ***
(both are with *** french locale ***)
------------------------------------------------------------------------
Here is the gcc version
gcl -v
Reading specs from /usr/local/pack/gcc-3.0-cvs/powerpc-linux/bin/../lib/gcc-lib/powerpc-unknown-linux-gnu/3.0/specs
Reading specs from /usr/local/pack/gcc-3.0-cvs/powerpc-linux/bin/../lib/gcc-lib/powerpc-unknown-linux-gnu/3.0/../../../libgcj.spec
rename spec lib to liborig
rename spec startfile to startfileorig
Configured with: /arc/hot/work/src/gcc/configure --prefix=/usr/local/pack/gcc-3.0-cvs-20010306/powerpc-linux --enable-shared --enable-threads=posix --disable-multilib --enable-languages=c++,java,f77
gcc version 3.0 20010305 (prerelease)
------------------------------------------------------------------------
Here is the program:
import java.util.*;
import java.text.SimpleDateFormat;
public class Test {
public static void main(String[] args) {
// this work
Date date = new Date();
System.out.println ("getTime=" + date.getTime());
// this doesn't work
System.out.println ("date=" + date.toString());
// this doesn't work neither !!
SimpleDateFormat df =
new SimpleDateFormat( "yyyy-MM-dd HH:mm:ss.SSSS");
return;
}
}
------------------------------------------------------------------------
Here is the run trace:
gcj -O0 -g -static --main=Test -o test Test.java
./test
Exception in thread "main" java.util.MissingResourceException: can't load bundle
at 0x10037b84: java::lang::Throwable::Throwable(java::lang::String*) (/arc/hot/work/src/gcc/libjava/java/lang/Throwable.java:153)
at 0x100264f4: java::lang::Exception::Exception(java::lang::String*) (/arc/hot/work/src/gcc/libjava/java/lang/Exception.java:31)
at 0x1002bab4: java::lang::RuntimeException::RuntimeException(java::lang::String*) (/arc/hot/work/src/gcc/libjava/java/lang/RuntimeException.java:31)
at 0x100d511c: java::util::MissingResourceException::MissingResourceException(java::lang::String*, java::lang::String*, java::lang::String*) (/arc/hot/work/src/gcc/libjava/java/util/MissingResourceException.java:29)
at 0x100d7044: java::util::ResourceBundle::getBundle(java::lang::String*, java::util::Locale*, java::lang::ClassLoader*) (/arc/hot/work/src/gcc/libjava/java/util/ResourceBundle.java:208)
at 0x100d6ed4: java::util::ResourceBundle::getBundle(java::lang::String*, java::util::Locale*) (/arc/hot/work/src/gcc/libjava/java/util/ResourceBundle.java:185)
at 0x100c0328: java::util::Calendar::Calendar(java::util::TimeZone*, java::util::Locale*) (/arc/hot/work/src/gcc/libjava/java/util/Calendar.java:378)
at 0x10043b14: java::util::GregorianCalendar::GregorianCalendar(java::util::TimeZone*, java::util::Locale*) (/arc/hot/work/src/gcc/libjava/java/util/GregorianCalendar.java:111)
at 0x10043ac8: java::util::GregorianCalendar::GregorianCalendar(java::util::Locale*) (/arc/hot/work/src/gcc/libjava/java/util/GregorianCalendar.java:107)
at 0x1006aa9c: java::text::SimpleDateFormat::SimpleDateFormat(java::lang::String*, java::util::Locale*) (/arc/hot/work/src/gcc/libjava/java/text/SimpleDateFormat.java:187)
at 0x100434dc: java::util::Date::toString() (/arc/hot/work/src/gcc/libjava/java/util/Date.java:453)
at 0x10000568: Test::main(JArray<java::lang::String*>*) (/home/diam/projets/jorlab/benchs_java/testbug/Test.java:18)
at 0x1008af7c: gnu::gcj::runtime::FirstThread::run() (/arc/hot/work/src/gcc/libjava/gnu/gcj/runtime/natFirstThread.cc:147)
at 0x1001e194: java::lang::Thread::run_(java::lang::Object*) (/arc/hot/work/src/gcc/libjava/java/lang/natThread.cc:276)
at 0x1007ba34: really_start(void*) (/arc/hot/work/src/gcc/libjava/posix-threads.cc:351)
at 0x1010cc98: GC_start_routine (/arc/hot/work/src/gcc/boehm-gc/linux_threads.c:638)
at 0x101174bc: pthread_start_thread (/usr/src/redhat/BUILD/glibc/linuxthreads/manager.c:207)
at 0x1013a4c8: __get_avphys_pages (/usr/src/redhat/BUILD/glibc/misc/../sysdeps/unix/sysv/linux/getsysstats.c:199)
------------------------------------------------------------------------
Here is the gdb trace :
Gdb -v
GNU gdb 5.0
Copyright 2000 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "powerpc-unknown-linux-gnu".
Gdb
(gdb) run
Starting program: /home/diam/projets/jorlab/benchs_java/testbug/test
[New Thread 9314 (manager thread)]
[New Thread 9273 (initial thread)]
[New Thread 9315]
getTime=983977941925
Exception in thread "main"
Program received signal SIGPIPE, Broken pipe.
[Switching to Thread 9315]
0x10138450 in __libc_write () at herrno.c:33
(gdb) list
28 in herrno.c
------------------------------------------------------------
--
Maurice.Diamantini@ensta.fr - ENSTA/LMA
École Nationale Supérieure de Techniques Avancées
Laboratoire de Mathématiques Appliquées
http://www.ensta.fr/~diam