Pages

Sunday, January 22, 2006

Trouble running the CDK JUnit tests with Cacao and Kaffe

Because I am still looking forward to testing CDK against the latest Classpath 0.20, I downloaded cacao 0.94-1 for Debian sid, then tried to compile CDK with it:

JAVA_HOME=/usr/lib/jvm/cacao ant -Dbuild.compiler=gcj clean test-all

But that hangs at some point with zero load. I have no idea what is going on there. I've spoken with twisti on the #classpath IRC channel, and he helped me run the compile with gdb, which indicated that at some point all threads were waiting.

I also tried it with kaffe 1.1.6.91-2 in sid, but now with a XML parser in the CLASSPATH, as Dalibor in a previous blog item suggested:

export CLASSPATH=/usr/share/java/xercesImpl.jar:xmlParserAPIs.jar
JAVA_HOME=/usr/lib/kaffe ant -Dbuild.compiler=gcj clean test-all

But that failed too with:

test:
[junit] Running org.openscience.cdk.test.CDKTests
[junit] kaffe-bin: /home/mkoch/debian/kaffe/kaffe-1.1.6.91/build-tree/kaffe-1.1.6.91/kaffe/kaffevm/jit3/machine.c:276: translate: Assertion `reinvoke == false' failed.
[junit] Test org.openscience.cdk.test.CDKTests FAILED

It did work previously :(

OK, to reproduce this yourself, you need to check out CDK from CVS (hoping that anonymous CVS is reasonable in sync, and online) with:

cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/cdk login
cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/cdk co -P cdk

1 comment:

  1. I had trouble getting JamVM running the tests, because it did not pick up JAVA_HOME, and therefore I ant used gij to run the CDK JUnit tests. After talking to tashiro and man-di on #debian-java I wrote a patch that solved my problem:

    --- jamvm-1.4.2/src/properties.c 2006-01-22 22:31:46.000000000 +0000
    +++ jamvm-1.4.2_JAVAHOME_patch/src/properties.c 2006-01-29 20:16:32.000000000 +0000
    @@ -116,6 +116,9 @@
    void addDefaultProperties(Object *properties) {
    struct utsname info;

    + char *java_home;
    + java_home = getenv("JAVA_HOME");
    +
    uname(&info);
    setProperty(properties, "java.vm.name", "JamVM");
    setProperty(properties, "java.vm.version", VERSION);
    @@ -125,7 +128,7 @@
    setProperty(properties, "java.version", "1.4.2");
    setProperty(properties, "java.vendor", "GNU Classpath");
    setProperty(properties, "java.vendor.url", "http://www.classpath.org");
    - setProperty(properties, "java.home", INSTALL_DIR);
    + setProperty(properties, "java.home", java_home ? java_home : INSTALL_DIR);
    setProperty(properties, "java.specification.version", "1.4");
    setProperty(properties, "java.specification.vendor", "Sun Microsystems, Inc.");
    setProperty(properties, "java.specification.name", "Java Platform API Specification");

    ReplyDelete