Older blog entries for twisti (starting at number 12)

Switch to OpenSolaris?

I'm thinking about to switch to OpenSolaris on my Apple mac mini. I installed Indiana on my Linux swap partition to see how it works.

Right now I'm trying to get suspend working (http://blogs.sun.com/randyf/entry/solaris_suspend_and_resume_how), but I'm not sure it will work with this version:

May 28 21:19:41 workstation genunix: [ID 314293 kern.info]
device pci8086,27a2@2(display#0) keeps up device
sd@0,0(sd#0), but the latter is not power managed
OpenJDK on ARM

Today I pulled myself together and tried to build IcedTea for ARM again. I had two options: to build it natively on an ARM board or try to cross-compile it. I decided to try the cross-compile approach.

The build did not fully finish, because I don't have ALSA libraries in my cross-build enviroment, so I just took an j2re-image from an x86_64 build and replaced


with the cross-compiled one and copied


into the x86_64 j2re-image.

And it works!!!

$ uname -m
$ java -version
java version "1.6.0"
IcedTea Runtime Environment (build 1.6.0-b06)
CACAO (build 0.98+svn, JIT mode)

(btw. this output calls 10273 Java methods)

Now I'm testing applications like DaCapo and most benchmarks of DaCapo already pass in small size.

IcedTea on Alpha

After some problems with the architecture define in OpenJDK's build system, today I got the stuff built. At least the ECJ-poured one:

$ uname -m
$ openjdk-ecj/build/linux-alpha/bin/java -version
java version "1.7.0"
IcedTea Runtime Environment (build 1.7.0-b24)
CACAO (build 0.98+svn, JIT mode)
$ openjdk-ecj/build/linux-alpha/bin/java -cp ~/cacao/ HelloWorld
Hello World!

Let's see if I get the whole stuff built...

undefined reference to `__tls_get_addr'

I had some problems to get IcedTea compiled on our i386, x86_64 and powerpc64 boxes. It turned out to be the -z def linker option and the glibc version used. A little google'ing revealed the fix. Just add the AS_NEEDED directive as shown below:

$ cat /usr/lib64/libc.so 
/* GNU ld script
   Use the shared library, but some functions are only in
   the static library, so try that secondarily.  */
GROUP ( /lib/libc.so.6 /usr/lib/libc_nonshared.a AS_NEEDED (
/lib/ld64.so.1 ) )
5 Sep 2007 (updated 23 Jul 2008 at 07:37 UTC) »
HotSpot's verifier not verifying

Yesterday I found the problem why we get a VerifyError when running Eclipse with CACAO-OpenJDK, while HotSpot does not. It's again the MagicAccessorImpl class.

Snippet from sun/reflect/MagicAccessorImpl.java (I overlooked that when debugging the access-check bug):

    The bug fix for 4486457 also necessitated disabling
    verification for this class and all subclasses, as
opposed to just
    SerializationConstructorAccessorImpl and subclasses, to
    having to indicate to the VM which of these
    stub classes were known to be able to pass the verifier. 

Finding these magics is really a pain...

IcedTea completely built and running on PowerPC

Today I finally made it to build a complete j2sdk-image on powerpc. As IcedTea has support for FreeType, I could run my first GUI application:

This is soooo cool and exciting, I hope I can sleep now :-)

OpenJDK on s390

Peter Molnar got OpenJDK running on s390. This is exciting :-)

OpenJDK: Eclipse

No comment.

OpenJDK: Getting closer to a full build

On friday I found the bug why Boehm always crashed with OpenJDK's wrappers. The problem is that the wrappers create a thread which then runs the VM. Boehm doesn't like that. But it can simply be removed:

Index: j2se/src/share/bin/java.c
--- j2se/src/share/bin/java.c   (revision 244)
+++ j2se/src/share/bin/java.c   (working copy)
@@ -367,7 +367,8 @@ main(int argc, char ** argv)
       args.classname = classname;
       args.ifn = ifn;
-      return ContinueInNewThread(JavaMain, threadStackSize,
(void*)&args, ret);
+/*       return ContinueInNewThread(JavaMain,
threadStackSize, (void*)&args, ret); */
+      return JavaMain((void*)&args);

With that patch we can use OpenJDK's wrappers with CACAO's libjvm:

$ java -version
LOG: [0x30021b70] JVM_GetStackAccessControlContext:
LOG: [0x30021b70] JVM_GetStackAccessControlContext:
LOG: [0x30021b70] JVM_FindSignal: name=HUP
LOG: [0x30021b70] JVM_RegisterSignal: sig=0, handler=0x2,
LOG: [0x30021b70] JVM_FindSignal: name=INT
LOG: [0x30021b70] JVM_RegisterSignal: sig=0, handler=0x2,
LOG: [0x30021b70] JVM_FindSignal: name=TERM
LOG: [0x30021b70] JVM_RegisterSignal: sig=0, handler=0x2,
LOG: [0x30021b70] JVM_GetStackAccessControlContext:
LOG: [0x30021b70] JVM_GetStackAccessControlContext:
openjdk version "1.7.0-internal-fastdebug"
OpenJDK Runtime Environment (build
CACAO (build 0.98+svn, JIT mode)


That means we can build OpenJDK with its own tools, by providing a CACAO-Sun build to OpenJDK with ALT_HOTSPOT_IMPORT_PATH. Then CACAO's libjvm gets imported and all tools like javac, javah or rmic are called from the currently builing OpenJDK.

With some small patches and the help of IcedTea I get a fully compiled and working j2re-image on my powerpc-linux box!!!

That is _really_ cool!

j2sdk-image is currently failing because of missing annotations support. But the student working on CACAO's annotations support already has a working implementation for OpenJDK and it will be (hopefully) commited tomorrow. That probably means a new blog soon...

Wanna Eclipse on s390?

Peter Molnar, a student of the Vienna University of Technology who is doing his thesis on CACAO, did the undoable. But see for yourself.

3 older entries...

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!