Kaffe on HP-UX - now with shared libraries
kaffe@rufus.w3.org
kaffe@rufus.w3.org
Thu, 27 Aug 1998 18:24:57 +0100
--0__=RuYAk37bKsJQAyOvBg3LZWKUtcJopZF9HXvv7R4zX8ul2kkErpw3BTBH
Content-type: text/plain; charset=US-ASCII
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@ecsoft.co.uk>
(See attached file: kaffe-slib.diff)(See attached file: kaffe-ext.diff)
--0__=RuYAk37bKsJQAyOvBg3LZWKUtcJopZF9HXvv7R4zX8ul2kkErpw3BTBH
Content-type: application/octet-stream;
name="kaffe-slib.diff"
Content-transfer-encoding: base64
LS0tIGthZmZlL2thZmZlL2thZmZldm0vc2xpYi5oLm9yaWcJVGh1IEF1ZyAyNyAwOTozMTo1NiAx
OTk4DQorKysga2FmZmUva2FmZmUva2FmZmV2bS9zbGliLmgJVGh1IEF1ZyAyNyAxNjo1OTo0OSAx
OTk4DQpAQCAtODMsOSArODMsOCBAQA0KICNkZWZpbmUJTElCUkFSWUZVTkNUSU9OKEZVTkMsIFNZ
TSkJCQkJCVwNCiAJewkJCQkJCQkJXA0KIAkJc2hsX3QgYWxsX2xpYnMgPSAwOwkJCQkJXA0KLQkJ
aWYgKCFzaGxfZmluZHN5bSgmYWxsX2xpYnMsU1lNLFRZUEVfUFJPQ0VEVVJFLCZGVU5DKSkJXA0K
KwkJaWYgKHNobF9maW5kc3ltKCZhbGxfbGlicyxTWU0sVFlQRV9QUk9DRURVUkUsJkZVTkMpKQlc
DQogCQkJRlVOQyA9IDA7CQkJCQlcDQotCQl9CQkJCQkJCVwNCiAJfQ0KICNkZWZpbmUJTElCUkFS
WUhBTkRMRQlzaGxfdA0KICNkZWZpbmUJTElCUkFSWUVSUk9SKCkJIk5vIHNwZWNpZmljIGVycm9y
IHN1cHBvcnQiDQo=
--0__=RuYAk37bKsJQAyOvBg3LZWKUtcJopZF9HXvv7R4zX8ul2kkErpw3BTBH
Content-type: application/octet-stream;
name="kaffe-ext.diff"
Content-transfer-encoding: base64
LS0tIGthZmZlL2thZmZlL2thZmZldm0vZXh0ZXJuYWwuYy5vcmlnCVRodSBBdWcgMjcgMDg6Mzk6
NTEgMTk5OA0KKysrIGthZmZlL2thZmZlL2thZmZldm0vZXh0ZXJuYWwuYwlUaHUgQXVnIDI3IDE4
OjAwOjI1IDE5OTgNCkBAIC0yMSwxMyArMjEsMTMgQEANCiAjaW5jbHVkZSAiY29uc3RhbnRzLmgi
DQogI2luY2x1ZGUgImNsYXNzTWV0aG9kLmgiDQogI2luY2x1ZGUgInNsb3RzLmgiDQotI2luY2x1
ZGUgImV4dGVybmFsLmgiDQogI2luY2x1ZGUgImVycm9ycy5oIg0KICNpbmNsdWRlICJleGNlcHRp
b24uaCINCiAjaW5jbHVkZSAic2xpYi5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