OpenJDK Zero PPC Build on OS X Leopard

Kurt Miller kurt at intricatesoftware.com
Fri Sep 16 07:44:20 PDT 2011


On Friday 16 September 2011 03:23:10 am Konstantin Tokarev wrote:
> Seems like I've found possible reason for crash: JNA uses JAWT_MacOSXDrawingSurfaceInfo struct, but we don't provide it. Unmodified JNA just fails to compile. 
> 
> Code fragment from JNA:
> 
> #elif __APPLE__
>       // WARNING: the view ref is not guaranteed to be stable except during
>       // component paint (see jni_md.h)
>       JAWT_MacOSXDrawingSurfaceInfo* mdsi =
>         (JAWT_MacOSXDrawingSurfaceInfo*)dsi->platformInfo;
>       if (mdsi != NULL) {
>         handle = (unsigned long)mdsi->cocoaViewRef;
>         if (!handle) {
>           throwByName(env, EIllegalState, "Can't get Cocoa View");
>         }    
>       }    
>       else {
>         throwByName(env, EError, "Can't get OS X platform info");
>       }
> #else
>       JAWT_X11DrawingSurfaceInfo* xdsi =
>         (JAWT_X11DrawingSurfaceInfo*)dsi->platformInfo;
>       if (xdsi != NULL) {
>         handle = xdsi->drawable;
>         if (!handle) {
>           throwByName(env, EIllegalState, "Can't get Drawable");
>         }
>       }
>       else {
>         throwByName(env, EError, "Can't get X11 platform info");
>       }
> #endif

Check the Max OS X port for that function. Mac OS X is built on-top
of bsd-port, meaning they merge bsd-port changes into their tree from
time to time and then add Cocoa based UI on top. 

I'm thinking that we've not gotten far enough into loading jna to hit
that missing function. We're crashing very earily. The code for
JNI_OnLoad in jna is here:

https://github.com/twall/jna/blob/master/native/dispatch.c

-Kurt



More information about the bsd-port-dev mailing list