Apache OpenOffice (AOO) Bugzilla – Issue 80023
bean: jawt_md.h should be included before jawt.h
Last modified: 2013-02-24 21:09:55 UTC
I had problems to compile the bean module with IMB Java on ppc: IBM Java version: --- cut --- $> java -version java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build pxp32dev-20070511(SR5)) IBM J9 VM (build 2.3, J2RE 1.5.0 IBM J9 2.3 Linux ppc-32 j9vmxp3223-20070426 (JIT enabled) J9VM - 20070420_12448_bHdSMR JIT - 20070419_1806_r8 GC - 200704_19) JCL - 20070511 --- cut --- I has got the following error message: --- cut --- In file included from com_sun_star_beans_LocalOfficeWindow.c:41: /usr/lib/jvm/java/include/jawt.h:302: error: expected '=', ',', ';', 'asm' or '_ _attribute__' before 'jboolean' dmake: Error code 1, while making '../../unxlngppc.pro/slo/com_sun_star_beans_L ocalOfficeWindow.obj' ---* tg_merge.mk *--- ERROR: Error 65280 occurred while making /usr/src/packages/BUILD/ooo-build-src68 0-m221/build/src680-m221/bean/native/unix --- cut --- Here is the snippet from jawt.h: --- cut --- _JNI_IMPORT_OR_EXPORT_ jboolean JNICALL JAWT_GetAWT(JNIEnv* env, JAWT* awt); --- cut --- The problem is that _JNI_IMPORT_OR_EXPORT_ is defined in jawt_md.h and com_sun_star_beans_LocalOfficeWindow.c includes it after jawt.h Yeah, it looks like a bug in the IBM Java. On the other hand, the jawt.h includes a sample code where only jawt_md.h is included. I have found this sample even in Sun JDK. I have checked gcj, Sun JDK and IBM JDK. It seems that jawt_md.h includes the other two: jawt.h and jni.h in all three implemtations. So, it should be enough to include just the jawt_md.h. I'll attach the proposed patch.
Created attachment 47077 [details] Proposed change.
ericb->pmladeck FYI, no problem building m221 with IBM dk1.4.2, on Linux PowerPC
pmladek->ericb I believe you. I think that there is a bug in the IBM JDK 1.5.0. Anyway, I think the includes in OOo are unnecessary complex. We could change the order of jawt_md.h and jawt.h at least.
bean belongs to the API project
set target.
Will be fixed in CWS pmladek06 as i#81385 *** This issue has been marked as a duplicate of 81385 ***
close the duplicate