While creating ebuild for eclipse 3.1 and testing with amd64 + ibm jdk I found out that the jawt.h header file is broken. This file is not used normally by native code (they include jni.h instead) which is why this has gone unnoticed quite a long time. The file JDK/include/jawt.h contains the following definition (which is most likely copied from sun's jawt.h): _JNI_IMPORT_OR_EXPORT_ jboolean JNICALL JAWT_GetAWT(JNIEnv* env, JAWT* awt); The problem is that _JNI_IMPORT_OR_EXPORT_ is not defined anywhere (sun defines it in jni.h) and thus the compiling fails. After studying the sun headers it seems that on linux it is always defined to be empty (do nothing). The fix would be thus to remove the _JNI_IMPORT_OR_EXPORT_ totally from the header file when installing ibm jdk for amd64. An alternative is to just define it to be empty in case someone else depends on it existing. Reproducible: Always Steps to Reproduce:
This is an upstream issue. A version bump was commited. Please check if the issue still exists. If so, re-open this bug.
The 1.4.2-sr3 jdk still contains the header bug. I have not found any bug address for reporting bugs in IBM jdk, which is why I opened this in gentoo. I now opened a bug in eclipse bugzilla too just to try to find a way to push this upstream somehow: https://bugs.eclipse.org/bugs/show_bug.cgi?id=115269
SR5 was just added to the tree. Please verify that it is still an issue.
I just downloaded the 142sr5 amd64 release and it does still contain the same problematic header that will not compile.
The jawt_md.h file in ibm-jdk 1.5sr2 has this patch mentioned in the comments: * 83234 210305 rlee Resolve _JNI_IMPORT_OR_EXPORT_ for Unix It appears all they do is add #define _JNI_IMPORT_OR_EXPORT_ before #include "jawt.h" on line 48 Adding #define _JNI_IMPORT_OR_EXPORT_ on line 46 of jawt_md.h fixes the problem in 1.4.2.5
Created attachment 92681 [details, diff] fix for jawt_md.h missing declaration of _JNI_INPORT_OR_EXPORT_
Fixed in 1.4.2.7 *** This bug has been marked as a duplicate of 126105 ***