Older blog entries for robilad (starting at number 35)

Kaffe OpenVM

Not much hacking done, as I got stuck in yet another 'GPL interpretation' discussion with developers from a non-GPLd VM. The usual FSF FUD with the same proponents. Basically, those people are trying to say you can't run GPLd Java apps with kaffe. Which is a poor lie, as GPL itself states that it doesn't restrict running of programs.

What I don't get is, why do people waste the time of kaffe developers when they have problems understanding the GPL? None of us is a lawyer. Kaffe doesn't violate any licenses. Can't they take out whatever weird (re)licensing phantasies they have with the application developers instead of with us?

fink

I lost a lot of respect for fink in the last couple of days. It's broken beyound belief. I spent 4 days trying to get fink to upgrade itself, then to get it to build from scratch. Nope. It always breaks for X Windows. The trouble is, that the greedy people from Apple have pulled their X11 for Mac OS 10.2 from their servers, since they are trying to force their users to buy Mac OS 10.3. So you can't have a working fink with X11 anymore if you're on 10.2. Which took me 4 days to find out, during which I did about 20 rebuilds of XFree86, its libraries and all the other code involved. I don't ever want to see X build again in my life.

Bottom line: An Apple is bad for your health.

Kaffe OpenVM

It's been a busy month. I fixed the remaining issues with parisc-hpux by closely following in Helmer Kraemer's footsteps, and with a lot of help from Riccardo Mottola testing my patches. Turned out that mprotect on hpux only works on mmapped memory, and that was the major problem.

Kaffe 1.1.2 was released earlier this month, and again, the usual tide of patches and bug reports came in. Among the more interesting ones, there is recharged interest in getting kaffe to run with mozilla. Aleksandr Abakin has taken the old kaffe-mozilla-oji-lugin code, and updated it to work with mozilla 1.3. He's still fighting with some bugs, though. Supreet Sethi is working on getting a gtk based AWT backend to work with kaffe. It seems that people look at the FTP server and try things out they find near the downloads of a new release, and attempt to fix them. Amazing. We should put more half-finished projects close to our releases ;)

More code has been merged in from GNU Classpath: java.beans, and java.util.jar packages. Java,util.zip is half done. I 'd like to have a Zip Inflater/Deflater SPI, that would allow me to use both pure java and native implementations of Inflaters and Deflaters.

Among the recent success stories, JBoss 3.2.2 loads on kaffe from CVS. Getting the beast to work will take some effort, and contributors are welcome. Having JBoss run on kaffe would mean having a fully free J2EE environment to work with.

On another J2EE front, I'm in touch with OpenEJB developers to try to get that J2EE implementation running on top of kaffe. It currently fails due to some bugs in OpenEJB, that does some pretty ugly (read not portable java) things to work around some limitations of Sun's VM. Which brings me to my rant.

Burn all java code that imports sun.* classes

If you are a Java programmer writing free software, you may have come across Sun's documentation for their programming language. Sun goes to great lengths to explain to people not to use internals of their VM, not to import sun.* classes and so on. A lot of people get the message.

Unfortunately, some people don't get the message. And they all seem to be working on big free software java projects.

Take a look at Java code in OpenOffice, for example. It's a big pile of rubbish that imports sun.* classes almost everywhere. And without reason, as well. Among many pointless lines of code, OpenOffice java code includes a java.util.jar implementation that seems to have been stuck there unmodified before Java 1.1. was released. That was more than 5 years ago, I think.

It causes great pains for those people who'd like to have OpenOffice running on their platforms. As the OpenOffice build system goes, you need a Java VM to build it. Of course, you in fact need some special version of Sun's JVM ported to your platform, as free VMs don't implement any of the undocumented sun.* classes.

Then there are such projects like Ant. Ant, the great make replacement for Java that most Java programmers learn to love as soon as they see it work. The trouble is, many ant tasks are written in really bad, unportable java. For example, for efficiency reasons, ant developers have decided to design for running many applications that one would run in a separate process (like javah) in the same VM in which Ant is running. To do that, as they can't run the applications as Processes, they need to call the main method of those java classes implementing the programs in question.

Sun has anticipated people being keen to use the internals of their implementation, and pulled classes for their externally callable programs into a separate tools.jar, apparently. So you can't import sun.something.Javah and have it work out of the box. But of course, that won't stop determined 'programmers'. So Ant, and many free java programs, depend on Sun's JRE file layout to be able to add tools.jar to their CLASSPATH using the JAVA_HOME enviroment variable, another undocumented property of Sun's VM. I'd spare my JAVA_HOME rant for some other day.

If the programmers in question were as clever in writing their code, as they were in circumventing Sun's java programming recommendations, they would have at least used reflection to check if the undocumented class they are trying to load is available at all. After all, Sun explicitely states in their docs that they consider their internal classes to be, well, internal and reserve the right to change the internals as they see fit. But nope, a job done in an obviously broken way, is still a job done, to some programmers.

And so on: Xerces uses some internal class from Sun to acess CharacterConverter information. But Sun defined an API to do it in Java 1.4. Since a lot of people use Xerces somewhere, a lot of people have stumbled over that one: the bug database has several double entries covering it. Unfortunately, the developers of Xerces are unwilling to fix it.

I hope that the rise of gcj will root out bad java software out there, and no self respecting free software java project will accept unportable java code in a not too distant future. If it won't build with gcj, a project will become insignificant.

GNU Classpath developer meeting at Linux Kongress

Had a great meeting with other free java hackers during the Linux Kongress. We discussed many things, among those most prominently the quite cool Java2D implementation on top of OpenGL by Jean-Daniel Fakete. I hope to be able to merge it into kaffe soon, as it's some 10-100 times faster than Sun's implementation.

Kaffe OpenVM

Spent the last couple of days trying to get more software to run on kaffe from CVS. Now the eXist XML database works with kaffe. Tomcat 4.1.27 too. And both the pure java mp3 player JavaLayer and the pure java Ogg player JOrbis.

judge: Kaffe comes with a working javax.sound implementation from tritonus. It supports both alsa and esd backends. Give the code in the CVS a try and come to the mailing list to tell us if it worked, or to the #kaffe irc channel on irc.freenode.net.

Kaffe OpenVM

1.1.1 came out, and with it came the bug reports. A lot of things broke, and they were subsequently fixed. Kaffe developers like Guilhem took the lead on bringing in more of GNU Classpath into kaffe, and fixing it to work better, and closer to the specs. A lot of work went into RMI (me), merges of GNU Classpath collections (Helmer Kraemer), java.io and java.net (both Guilhem Laveaux) classses, and a JVMPI implementation. I'd name more names, but it's been almost two months since my last diary entry and kaffe has matured quite a bit since, thanks to all the other great developers working on it. You can find a cute picture of kaffe's growth here.

My own amount of time for contributions has been reduced, as my new found love demands more attention. ;) New developers interested in hacking on a free java environment are always welcome.

Anti EU Software Patents

Went to the demonstrations in Bruxelles with the organizers of Linux Days in Luxembourg, and met with mjw and Arnaud Vandyck to discuss some ideas for improving GNU JAXP, Classpath, and kaffe's XML and javadoc support. We'll meet again for the Linux Kongress in Saarbruecken. There are also pictures on the web, but I look too embarassingly tired on them to post any links ;)

Weird Hacking Projects

I got myself a sparc 5 to play with. I'm planing to have it netboot into linux, netbsd or openbsd. I'm wondering if I can have a 'netboot into grub, and select the os to netboot for real' setup. If someone has pointers how to set such a beast up, I'd be glad to hear about it. I'd like to have a personal sparc regresssion test machine setup for Kaffe. So I want to be able to netboot into different free operating systems.

Kaffe OpenVM

As usual, a lot of things happened while I was too busy to write about it. So you'll get the condensed 'last three weeks in kaffe developement' now.

gonzo started checking in his java verifier implementation, and fixed several bugs on the way. Ito Kazumitsu fixed java.io.StreamTokenizer's nextToken method to do what Sun does, since their API documentation is very poor. Helmer fixed a bunch of tricky locking issues. Guilhem Lavaux nailed an age old bug in the bayer-moore string search implementation. Tony Wyatt has switched over to using 1.1.0 for his JIT hacking on m68k-amigaos, which means that current kaffe sources are almost useable for AmigaOS. mjw has fixed kaffe's JNI to allow java-gnome to run, which he needs for the GUI part of Snark. Together with Helmer, he also got Eclipse to load on kaffe. I'd link to screenshots, but I don't want to crush his server under the advogato effect.

Justin R. Cutler is porting kaffe to a Cray. Yes, to a real Cray. He already has the interpreter mostly running, and is starting to work on a jitter. I guess that makes kaffe the NetBSD of JVMs, with over 50 ports in the CVS, and about 10 ports waiting to be merged in.

Guilhem Lavaux implemented VM shutdown hooks, and fixed a few small issues along on the way. He also fixed an ugly bug in kjc, which kept screweing up our regression test suite results. So I'm glad he's joining other kaffe core developers.

I fixed kaffe's build on i386-cygwin, though I'm kind of stuck at a weird SIGSEGV in jar loading code, which occurs when I try to read or set a local variable. The stack trace looks reasonable, though. Oh, and we need a Windows develepor who understands the Windows DLL madness well enough to add a couple of __declspec declarations where they are missing. Then we could build kaffe as a set of DLLs on Windows.

Trent Jarvi from the rxtx project explained ways how to use rxtx as a javax.comm implementation, so expect a fully working javax.comm implementation to hit kaffe's CVS soon.

Andrea Scian, after getting me to improve better Cygwin support, is now working on a port of kaffe to uclinux. I'm looking forward to that one, since a lot of people are asking for it.

LinuxTag and RMLL

I had some great time with other free software java implementation developers last weekend. mjw and I discussed the integration of GNU Classpath into Kaffe OpenVM at great lengths during the RMLL. We had a Classpath developer meeting at LinuxTag. A lot of intersting things came out of this meeting. Classpath is pushing ahead at an amazing speed. I'll leave it to the Mark's next diary entry to explain where Classpath is heading.

We plan to meet again in October, for the Linux Kongress in Saarbruecken.

GNU Libtool

My libtool problems continued, and when I had enough, I started being provocative on the mailing list. It turned out that libtool maintainers were ignoring patches from everyone for a while. Several maintainers of libtool packages for different operating systems want to work with upstream maintainers to get their patches back in. But current upstream maintainers didn't seem to be interested in new developers.

Fortunately, we had some fruitful discussions, and now at least one libtool maintainer is taking care of the dropped patches again. In other good news, there may be new developers on board of libtool soon. Most of the current maintainers seem to be inactive, so it seems to be a good time for a change of generations.

For a very brief period of time, I thought about publicly forking the project. With all due gratitude to FSF, GNU Libtool is a too important piece of infrastructure to let it slowly rot.

I believe that GNU libtool maintainers have been overwhelmed by their success: while the user base expanded quickly, the core developer base stayed small, and they ended up receiving many bizarre little patches, without having the manpower for it. I learned while working on kaffe to plan ahead for growth, and to approach good contributors to join the project. I guess libtool maintainers are learning the lesson now, too.

Kaffe OpenVM

I tried to submit a patch to libtool and got no reply. Libtool has a '10 mails per week' mailing list.

It's somewhat annoying when one sends in a patch, gets no reply for 10 days, posts a patch ping, and again receives no attention. I've got more patches queing up for libtool as kaffe gets tested and fixed on more systems, and the perspective of maintaining a kaffe branch of libtool is not that exciting.

So I'm retrying it today on the libtool-patches mailing list. You may wonder why I didn't send my patches there in the first place, instead of the regular mailing list. Well, libtool's documentation doesn't mention a separate patches mailing list. I'd post a patch, but I'm afraid it would be pointless.

On the positive side, Helmer Kraemer got kaffe to run on sparc-openbsd2, I've fixed some breakage on powerpc-linux, and Ito Kazumitsu has fixed many compilation problems with Linux 2.0.x. Other work has enabled kaffe to build on z390-linux again, and I've done some work recently on fixing all compiler warnings I came accross so far. The only one left on FreeBSD 4.8 for example is in libtool's libltdl. I'd send in a patch, but you know the story already ...

gentlemen, fix your va_lists

I've spent some time recently fighting very obscure bugs related to va_lists. If you've never heard about them, they are the hack in C that allows printf to take an arbitrary number of arguments. A va_list is quite often implemented as a struct, but on some platforms it's an array.

So you can't just copy va_lists by assigning them to each other as in valist temp = args. Some systems provide a function called va_copy, sometimes there is a gcc provided special function __va_copy. In despair, you may even reach back to use memcpy to copy arrays. But wait, it gets better.

Let's say you're passing around va_list pointers to functions, since you don't want to throw structs on your stack. Well, if va_list defines an array type, you're in for some surprise, when you pass &args to the function. You need to copy it into a local variable first, and must use that to get what you want, otherwise you get weird effects. Read this post for an example.

Kaffe OpenVM

Release ... it feels good, when the pressure drops.

Kaffe 1.1.0 is out. It's the first release on the development branch, that should eventually become the next stable series. It took almost a year to make. Accordingly, there has been a lot of progress. Despite a lack of release candidates before the release, it actually works on most platforms I got to test it on, including more excentric ones, like parisc-linux.

The other side of doing a release without going through the laboursome release candidate process is that one has to deal with the broken systems afterwards. Kaffe's accumulating a growing archive of patches to libtool 1.5 in order to make it run on platforms like AmigaOS and OpenBSD.

Now, if we only had someone who can figure out how the function replacement thing works with autoconf ... Kaffe is suffering from poor implementations of strtod on some platforms, and I am not able able to get that replacement strtod right, or to pick a good one, that can actually parse 4.9E-328 (Java's Double.MIN_VALUE) into a double and not into 0.0.

Kaffe OpenVM

Other things I forgot to mention in yesterday's entry were a new java/lang/reflect/Proxy implementation, merged in from GNU Classpath, support for pure java DNS, IPv6 changes, and a beginning merge of collection classes from GNU Classpath.

Since there are more active developers with CVS write access now, it's all quite exciting and moving quickly. I quite like it that way.

Among things that don't work, or don't work yet are JSSE and JMF. JSSE will have to wait until the GNU Crypto developers come up with a free implementation. Sun's implementation is an obfuscated mess, that's not intended to run on other virtual machines, apparently. JMF is a somewhat different story: we seem to have some problems with player classes there.

Matrix Reloaded

Boring first 30 minutes, followed by Jackie Chan style Kung Fu without any humor. A few nice camera shots, ruined by cheesy music. Miserable, predictable dialogues, with boring monologues thrown in between. Filler scenes, that may make sense once one gets to see the third part. It's the most boring Werewulf movie I ever saw.

It would have been an interesting motion picture if they had shot it from Neo's debugger/aalib perspective, like the opening shot of the clock.

But I guess I shouldn't have gone and seen "No Man's Land" the evening before I went to see Matrix Reloaded.

27 May 2003 (updated 28 May 2003 at 12:48 UTC) »
Kaffe OpenVM

As soon as one says 'release freeze', all of the sudden, a ton of last minute changes need to go in at last minute. And they were some really interesting ones. So now, thanks to the great work of Tim Stack and Helmer Kraemer, kaffe has had it's class loading code revisited and updated to mostly match jdk 1.3. Gwenole Beauchesne fixed some problems with ia64-linux, and contributed a port to x86-64-linux. I got kaffe to work again on alpha-netbsd. And a lot of other exciting things happened that I don't have time to write about, since I gotta run to catch a bus.

Kaffe OpenVM

Release freeze is coming quickly. So I took some time to get 'make dist' and 'make distcheck' to work. 'make dist' works fine now. I'm glad for automake 1.7 having the cool 'nodist' feature. 'make distcheck' breaks in a very strange way, though. There seems to be some file permission problem during a simple 'cp' operation.

Tony Wyatt fixed a nasty 'restoring rubbish in registers' problem with jit3 on m68k, making it useable again. Benja Fallenstein added basic support for assertions, allowing code compiled with javac from JDK 1.4 to be used on kaffe. Helmer Kraemer checked his first patch in, improving the documentation for the jitter. Bug fixes and patches keep coming in.

26 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!