First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 88330
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Java team <java@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Michal Wojciechowski <odyniec@odyniec.fdns.net>
Add CC:
CC:
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 88330 depends on: Show dependency tree
Bug 88330 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2005-04-08 02:29 0000
I installed Kaffe-1.1.4 and tried to compile a standard Java "Hello World"
program:

  public class hello {
    public static void main(String[] args) {
      System.out.println("Hello, World!");
    }
  }

However, it failed with the following error message:

  $ javac hello.java
  Internal error: caught an unexpected exception.
  Please check your CLASSPATH and your installation.
  java/lang/NullPointerException
  Aborted

I compiled the program using another Java compiler (from Blackdown JDK) and
tried to run it with Kaffe, but I got the same error message:

  $ java hello 
  Internal error: caught an unexpected exception.
  Please check your CLASSPATH and your installation.
  java/lang/NullPointerException
  Aborted

I thought it might be a problem with Kaffe itself, but version 1.1.4 installed
from sources works out-of-the-box, so I guess there must be something wrong
with the ebuild.

While trying to work around it, I also noticed that I am able to run the
compiled program if I launch it using the plain kaffe-bin binary with a
specific LD_LIBRARY_PATH:

  $ LD_LIBRARY_PATH=/opt/kaffe-1.1.4/jre/lib/i386 kaffe-bin hello 
  Hello, World!

This might suggest that the problem is caused by incorrect path settings.


Reproducible: Always
Steps to Reproduce:
1. Create hello.java
2. Try to compile it with Kaffe's javac

------- Comment #1 From Karl Trygve Kalleberg (RETIRED) 2005-04-09 11:54:25 0000 -------
Please try 1.1.5 (~x86). If your problem persists, reopen this bug. We'll mark
it stable very soon.

------- Comment #2 From Michal Wojciechowski 2005-04-10 05:16:57 0000 -------
The problem is still there for Kaffe 1.1.5. It does compile the hello.java
program, but only because version 1.1.5 uses a different Java compiler (jikes).
When I try to execute the compiled hello.class, I get the same error message.

But I think I tracked down the problem: it is obviously caused by my CFLAGS
settings (-O2 -march=pentium4 -pipe -fomit-frame-pointer). When I emerged Kaffe
1.1.4 using its default CFLAGS taken from the original Makefile (-g -O2 -Wall
-Wstrict-prototypes), the problem was gone and both compilation and execution
worked fine.

------- Comment #3 From Karl Trygve Kalleberg (RETIRED) 2005-04-10 12:51:40 0000 -------
Could you please use your original CFLAGS, but without -fomit-frame-pointer.

(There seems to be a common misconception that -fomit-frame-pointer will give a performance boost. I recommend you remove it from your CFLAGS, since it breaks a lot of stuff, and also hampers debugging.)

------- Comment #4 From Michal Wojciechowski 2005-04-10 13:14:55 0000 -------
Yes, removing -fomit-frame-pointer did it.

------- Comment #5 From Jan Brinkmann (RETIRED) 2005-04-11 05:47:56 0000 -------
since -fomit-frame-pointer is used by many people i've added a strip-flags lime
to the ebuild. therefor i'm going to mark this one as fixed. thanks for
reporting and for supporting our development.

First Last Prev Next    No search results available      Search page      Enter new bug