Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 97421 - ibm-jdk-bin-1.4.2 for amd64 has broken include/jawt.h header file
Summary: ibm-jdk-bin-1.4.2 for amd64 has broken include/jawt.h header file
Status: RESOLVED DUPLICATE of bug 126105
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: Java team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-06-29 13:30 UTC by Mikko Tiihonen
Modified: 2006-12-18 03:40 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
fix for jawt_md.h missing declaration of _JNI_INPORT_OR_EXPORT_ (jni-import-or-export-fix.patch,286 bytes, patch)
2006-07-24 21:48 UTC, Joseph Yasi
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mikko Tiihonen 2005-06-29 13:30:40 UTC
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:
Comment 1 Saleem Abdulrasool (RETIRED) gentoo-dev 2005-11-05 13:19:55 UTC
This is an upstream issue.  A version bump was commited.  Please check if the
issue still exists.  If so, re-open this bug.
Comment 2 Mikko Tiihonen 2005-11-06 23:52:00 UTC
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
Comment 3 Josh Nichols (RETIRED) gentoo-dev 2006-07-01 14:14:34 UTC
SR5 was just added to the tree. Please verify that it is still an issue. 
Comment 4 Mikko Tiihonen 2006-07-02 08:13:49 UTC
I just downloaded the 142sr5 amd64 release and it does still contain the same problematic header that will not compile.
Comment 5 Joseph Yasi 2006-07-24 19:43:44 UTC
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
Comment 6 Joseph Yasi 2006-07-24 21:48:49 UTC
Created attachment 92681 [details, diff]
fix for jawt_md.h missing declaration of _JNI_INPORT_OR_EXPORT_
Comment 7 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2006-12-18 03:40:44 UTC
Fixed in 1.4.2.7

*** This bug has been marked as a duplicate of 126105 ***