Re: Porting Sable VM to SH4
Vincent Verstraete <[email protected]> Wed, 25 Oct 2006 16:30:52 +0200
| Newsgroups | gmane.comp.java.vm.sablevm.devel |
|---|---|
| Message-ID | <[email protected]> |
Hello, I thank you for your quick response. I've also contacted Kaz Kojima who seems to have a whole lot of experience with SH4 (it's a processor), and Anthony Green for an SH4 version of the libffi library, and both helped me a lot. After some adjustments, I even managed to make sablevm and sablevm-classpath. As soon as everything works, I will send you the files (system.h and system.c) as well as the adapted libffi version, and the method how I got it working. But now I have an error while trying to start a simple Hello world example. When I run the command '/usr/local/sablevm/bin/sablevm -v Test' I get a java.lang.UnsatisfiedLinkError: [verbose jni: JNI_CreateJavaVM] [verbose gc: allocating initial heap (16777216 bytes)] [verbose class: loading "java/lang/Object"] [verbose class: loading "java/io/Serializable"] [verbose class: loading "java/lang/Cloneable"] [verbose class: creating "[B"] [verbose class: loading "java/lang/VMClass"] [verbose class: loading "java/lang/Class"] [verbose class: loading "java/lang/StackTraceElement"] [verbose class: loading "java/lang/StringCreator"] [verbose class: loading "java/lang/VirtualMachine"] [verbose class: loading "java/lang/reflect/Constructor"] [verbose class: loading "java/lang/reflect/AccessibleObject"] [verbose class: loading "java/lang/reflect/Member"] [verbose class: loading "java/lang/reflect/Field"] [verbose class: loading "java/lang/reflect/InvocationTargetException"] [verbose class: loading "java/lang/Exception"] [verbose class: loading "java/lang/Throwable"] [verbose class: loading "java/lang/reflect/Method"] [verbose class: loading "java/nio/ByteBuffer$vm"] [verbose class: creating "[Ljava/lang/reflect/Field;"] [verbose class: creating "[Z"] [verbose class: creating "[S"] [verbose class: creating "[C"] [verbose class: creating "[I"] [verbose class: creating "[J"] [verbose class: creating "[F"] [verbose class: creating "[D"] [verbose class: loading "java/lang/ArithmeticException"] [verbose class: loading "java/lang/RuntimeException"] [verbose class: loading "java/lang/ArrayIndexOutOfBoundsException"] [verbose class: loading "java/lang/IndexOutOfBoundsException"] [verbose class: loading "java/lang/ArrayStoreException"] [verbose class: loading "java/lang/ClassCastException"] [verbose class: loading "java/lang/IllegalMonitorStateException"] [verbose class: loading "java/lang/NegativeArraySizeException"] [verbose class: loading "java/lang/NoSuchFieldException"] [verbose class: loading "java/lang/NoSuchMethodException"] [verbose class: loading "java/lang/NullPointerException"] [verbose class: loading "java/lang/InterruptedException"] [verbose class: loading "java/lang/AbstractMethodError"] [verbose class: loading "java/lang/IncompatibleClassChangeError"] [verbose class: loading "java/lang/LinkageError"] [verbose class: loading "java/lang/Error"] [verbose class: loading "java/lang/ClassCircularityError"] [verbose class: loading "java/lang/ClassFormatError"] [verbose class: loading "java/lang/ExceptionInInitializerError"] [verbose class: loading "java/lang/InternalError"] [verbose class: loading "java/lang/VirtualMachineError"] [verbose class: loading "java/lang/NoClassDefFoundError"] [verbose class: loading "java/lang/NoSuchFieldError"] [verbose class: loading "java/lang/NoSuchMethodError"] [verbose class: loading "java/lang/OutOfMemoryError"] [verbose class: loading "java/lang/UnsatisfiedLinkError"] [verbose class: loading "java/lang/UnsupportedClassVersionError"] [verbose class: loading "java/lang/VerifyError"] [verbose class: loading "java/lang/ClassLoader"] [verbose class: loading "java/lang/VMObject"] [verbose class: loading "java/lang/SecurityManager"] [verbose class: loading "java/lang/ClassLoader$StaticData"] [verbose class: loading "java/lang/VMClassLoader"] [verbose class: loading "java/util/HashMap"] [verbose class: loading "java/util/AbstractMap"] [verbose class: loading "java/util/Map"] [verbose class: loading "java/util/HashMap$HashEntry"] [verbose class: loading "java/util/AbstractMap$BasicMapEntry"] [verbose class: loading "java/util/Map$Entry"] [verbose class: creating "[Ljava/util/HashMap$HashEntry;"] [verbose class: loading "java/lang/String"] [verbose class: loading "java/lang/Comparable"] [verbose class: loading "java/lang/CharSequence"] [verbose class: creating "[Ljava/lang/String;"] [verbose class: loading "java/lang/VMSystem"] [verbose class: loading "java/lang/VMString"] [verbose class: loading "java/util/WeakHashMap"] [verbose class: loading "java/util/WeakHashMap$1"] [verbose class: loading "java/util/WeakHashMap$WeakEntrySet"] [verbose class: loading "java/util/AbstractSet"] [verbose class: loading "java/util/AbstractCollection"] [verbose class: loading "java/util/Collection"] [verbose class: loading "java/util/Set"] [verbose class: loading "java/lang/ref/ReferenceQueue"] [verbose class: loading "java/util/WeakHashMap$WeakBucket"] [verbose class: loading "java/lang/ref/WeakReference"] [verbose class: loading "java/lang/ref/Reference"] [verbose class: creating "[Ljava/util/WeakHashMap$WeakBucket;"] [verbose class: loading "java/lang/Math"] [verbose class: loading "java/lang/System"] [verbose class: loading "java/io/BufferedInputStream"] [verbose class: loading "java/io/FilterInputStream"] [verbose class: loading "java/io/InputStream"] [verbose class: loading "java/io/FileInputStream"] [verbose class: loading "java/io/FileDescriptor"] [verbose class: loading "gnu/java/nio/channels/FileChannelImpl"] [verbose class: loading "java/nio/channels/FileChannel"] [verbose class: loading "java/nio/channels/spi/AbstractInterruptibleChannel"] [verbose class: loading "java/nio/channels/Channel"] [verbose class: loading "java/nio/channels/InterruptibleChannel"] [verbose class: loading "java/nio/channels/ByteChannel"] [verbose class: loading "java/nio/channels/ReadableByteChannel"] [verbose class: loading "java/nio/channels/WritableByteChannel"] [verbose class: loading "java/nio/channels/GatheringByteChannel"] [verbose class: loading "java/nio/channels/ScatteringByteChannel"] [verbose class: loading "java/lang/Runtime"] [verbose class: loading "gnu/classpath/SystemProperties"] [verbose class: loading "java/util/Properties"] [verbose class: loading "java/util/Hashtable"] [verbose class: loading "java/util/Dictionary"] [verbose class: loading "java/util/Hashtable$HashEntry"] [verbose class: creating "[Ljava/util/Hashtable$HashEntry;"] [verbose class: loading "gnu/classpath/VMSystemProperties"] [verbose class: loading "java/util/WeakHashMap$WeakBucket$WeakEntry"] [verbose class: loading "java/lang/StringBuffer"] [verbose class: loading "java/util/Hashtable$3"] [verbose class: loading "java/util/Collections$SynchronizedSet"] [verbose class: loading "java/util/Collections$SynchronizedCollection"] [verbose class: loading "java/util/Collections$SynchronizedIterator"] [verbose class: loading "java/util/Iterator"] [verbose class: loading "java/util/Hashtable$HashIterator"] [verbose class: loading "java/util/StringTokenizer"] [verbose class: loading "java/util/Enumeration"] [verbose class: loading "gnu/classpath/VMStackWalker"] [verbose class: loading "java/lang/VMRuntime"] [verbose class: loading "java/io/StringWriter"] [verbose class: loading "java/io/Writer"] [verbose class: loading "java/io/PrintWriter"] java.lang.UnsatisfiedLinkError: Native library `javanio' not found (as file `libjavanio') in gnu.classpath.boot.library.path and java.library.path [verbose gc: total gc time = 0 sec 0 usec] The weird thing is I do find libjavanio on my system in /usr/local/sablevm/lib/sablevm-classpath/ Any idea where this dynamic linking goes wrong? Greetz, Vincent Etienne Gagnon wrote: >Hi Vincent, > >I guess, from the lack of replies, that nobody has yet attempted such a >port. > >I do not know SH4. What kind of system is it (processor, OS, etc.)? It >seems you have identified the important parts of SableVM that need to be >written for a new system (system.[ch] and jni_system_specific.h). > >Just ask on this list if you need help with specific issues. We'll do >what wecan to help you. > >Would you like a sandbox to share your development publicly and simplify >future integration of your port into the trunk? You'll find our >contribution policy at: > >http://sablevm.org/svn/repository/sablevm/trunk/doc/contribution_policy.txt > >Etienne > >Vincent Verstraete wrote: > > >>Hello, >> >>I'm currently trying to port the Sable VM to the SH4 platform, but my >>attempts have not yet succeeded. I've been google-ing for this problem, >>but I am not really satisfied with what I found during my search (small >>bits of information everywhere but nothing really of much use). >>Therefore my questions to this Sable VM developers group: >> >>- Has some work already been done on this subject? >>- If the work has already been done, can anyone provide me with a snapshot? >>- If not, is there any place where I could find the unfinished attempts? >>This would be a good starting point for me, certainly the >>compare_and_swap atomic operation in system.c. >> >>Thanks in advance, >> >>Vincent >> >>_______________________________________________ >>SableVM-devel mailing list >>[email protected] >>http://sablevm.org/lists/control/listinfo/sablevm-devel >> >> >> > > >