Kaffe-1.0.b1 for SunOS4 (was: Re: Which platform kaffe works?)

Kiyo Inaba inaba at src.ricoh.co.jp
Sun Jul 19 01:39:09 PDT 1998

>Since I don't have SunOS 4.1.3 in my lab, I start to make kaffe-1.0.0
>on SunOS 4.1.1. Before starting that, I have to make gcc and so on ;-)
>But anyway, I will let you know whether this attempt works or not.

OK, I made gcc-2.8.1 ready on SunOS 4.1.1. The test revealed me some
interesting results. There are 3 things what I have to point out.

1. Compiler pizza.compiler.Main does not work.
On SunOS 4.1.4/gcc-2.8.1
	Kaffe sun.tools.javac.Main HelloWorldApp.java
works fine, but
	Kaffe pizza.compiler.Main HelloWorldApp.java
produces error as,
	HelloWorldApp.java:2: cannot access class String; bad class file (java.lang.NullPointerException: null)
		public static void main (String args[]) {
	1 error

2. Statically linked Kaffe complains one unimplemented method.
Even with sun.tools.javac, if I use statically linked version, I got
	Failed to locate native function:
		at java/io/InputStreamReader.read(56)
		at java/io/BufferedReader.refillBuffer(168)
		at java/io/BufferedReader.read(69)
		at sun/tools/java/ScannerInputStream.read(line unknown, pc 20)
		at sun/tools/java/Scanner.useInputStream(line unknown, pc 31)
		at sun/tools/java/Scanner.<init>(line unknown, pc 18)
		at sun/tools/java/Parser.<init>(line unknown, pc 3)
		at sun/tools/javac/BatchParser.<init>(line unknown, pc 3)
		at sun/tools/javac/BatchEnvironment.parseFile(line unknown, pc 2d)
		at sun/tools/javac/Main.compile(line unknown, pc 30d)
		at sun/tools/javac/Main.main(line unknown, pc 32)

In libraries/clib/native/external_wrapper.h includes
but I am not so sure whether this is correct name or not.

3. On SunOS 4.1.1, libnative.so is not properly made.
When I made Kaffe on SunOS 4.1.1 and do
	Kaffe sun.tools.javac.Main HelloWorldApp.java
I got,
	ld.so: mmap bss error (9) for /usr/local/lib/libnative.so
This libnative.so was produced by gnu-ld (GNU ld version 2.8 (with BFD 2.8))
and, when I link this with sun's ld, I got correct result.

In summary, you first try to do following things.
	1. Use gcc-2.7.[12] or gcc-2.8.x as you pointed out
	2. But don't use gnu-ld, you have to use sun-ld.
	3. Make Kaffe to be dynamically linked.
		(Don't use --with-staticlib)
	4. Use sun.tools.javac rather than pizza.compiler.

I know they are just work-arounds, but they make Kaffe to be usable
on SunOS4.

Hope this helps.


More information about the kaffe mailing list