Kaffe on HP-UX - now with shared libraries

Pavel.Roskin at ecsoft.co.uk Pavel.Roskin at ecsoft.co.uk
Thu Aug 27 10:24:57 PDT 1998




Hello!

I have found why Kaffe did not work on HP-UX. There was two reasons.
1) My dummy error in my previous patch for slib.h. I've done this error,
I've fixed it. See kaffe-slib.diff.
2) Kaffe expects to find installed libraries not in the right place. In my
opinion, Kaffe should load the libraries where they are installed by "make
install". If it fails, some other paths might be searched. For example,
SHLIB_PATH and LPATH variables could be used on HP-UX, LD_LIBRARY_PATH
could be used on other systems. We could also make Kaffe smart enough to
understand KAFFE_LIBRARY_PATH, overriding everything else.
How it works now (see initNative() in kaffe/kaffevm/external.c):
1) Only one system-dependent environment variable is examined.
2) If it is not set, initNative just issues a warning and returns.
Libraries are not loaded, but Kaffe continues to work! Further errors
happen very far from this place, for example in loadNativeLibrarySym().
3) If this variable is set, but the Kaffe libraries cannot be located,
abort() is called.
By the way, I have successfully compiled hundreds of other programs on
HP-UX, but Kaffe is the first program, which requires SHLIB_PATH to be set!
In my opinion, all this stuff should be seriously cleaned up.
kaffe-ext.diff doesn't fix everything. What it does:
1) DEFAULT_LIBRARYPATH is now always defined in config-hacks.h. It is still
hack :-(
2) Some #ifdef in external.c becomes unnecessary. That coward "return"
should never be there.
3) external.h is included after md.h in external.c to prevent LIBRARYPATH
redefinition on HP-UX.
Please, consider this as a step in the right direction, but not as a
complete solution.

Pavel Roskin <pavel.roskin at ecsoft.co.uk>

(See attached file: kaffe-slib.diff)(See attached file: kaffe-ext.diff)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/octet-stream
Size: 467 bytes
Desc: not available
Url : http://kaffe.org/pipermail/kaffe/attachments/19980827/631d1fb5/attachment-0042.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/octet-stream
Size: 1537 bytes
Desc: not available
Url : http://kaffe.org/pipermail/kaffe/attachments/19980827/631d1fb5/attachment-0043.obj 


More information about the kaffe mailing list