<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://jogamp.org/bugzilla/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.2"
          urlbase="https://jogamp.org/bugzilla/"
          
          maintainer="sgothel@jausoft.com"
>

    <bug>
          <bug_id>622</bug_id>
          
          <creation_ts>2012-09-23 04:46:55 +0200</creation_ts>
          <short_desc>Changes required to build JOGL git master on Mac OS X 10.8 with Oracle JDK</short_desc>
          <delta_ts>2013-02-20 14:27:27 +0100</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>3</classification_id>
          <classification>JogAmp</classification>
          <product>Jogl</product>
          <component>macosx</component>
          <version>2</version>
          <rep_platform>pc_x86_64</rep_platform>
          <op_sys>macosx</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>---</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter>jrh</reporter>
          <assigned_to name="Sven Gothel">sgothel</assigned_to>
          <cc>alexander.lex</cc>
          
          <cf_type>---</cf_type>
          <cf_scm_refs>gluegen 4aa36ed61fd1bb434f2a5dd4d7dbffd6f87a446d
gluegen e4fc97f6c08d58d1a62543fdfda92fddfda6ee68
gluegen 6b86764f2e195b4046000fd5a7fcf3331ca72d21
jogl fdc20a0205bb01747055910eb2bb33202edee277
jogl fc9539d50c12f9def7a3babde7384e3d38f61721
jogl a40ee817a3bd537b0de7018772b0835f995a1bed</cf_scm_refs>
          <cf_workaround>---</cf_workaround>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1847</commentid>
    <comment_count>0</comment_count>
      <attachid>369</attachid>
    <who name="">jrh</who>
    <bug_when>2012-09-23 04:46:55 +0200</bug_when>
    <thetext>Created attachment 369
Specify jawt_md.h from JavaVM.framework on Mac OS X.

Apple has transitioned responsibility for Mac Java over to Oracle. To accommodate this, they&apos;ve rearchitected how JDKs/JREs are installed, and actually have brought relative paths closer in line with standard Java.

${java.home} will now be something like /Library/Java/JavaVirtualMachines/jdk1.7.0_07.jdk/Contents/Home/
and it will have the standard layout with {bin,include,jre/bin,jre/lib,lib}.

Several properties in gluegen/make/gluegen-cpptasks-base.xml currently assume the old Apple JavaVM.framework layout and need to be updated in order to get JOGL to compile on Mac OS X 10.8 (Mountain Lion) with an Oracle-provided JDK 1.7:

java.home.dir := ${java.home}/.. 
java.includes.dir.platform := ${java.includes.dir}/darwin 
java.lib.dir.platform := ${java.home.dir}/jre/lib 


I also had to set

macos32 := false

because the libjawt.dylib in Oracle&apos;s JDK 1.7.0_07 build is 64-bit-only and so I got a link error when trying to build 32-bit. The values of macos32 and the others should probably depend upon the results of `file ${java.lib.dir.platform}/libjawt.dylib`.


Unfortunately, I&apos;m not enough of an ANT wizard to figure out the right way to set all of those values while maintaining backwards compatibility with Apple&apos;s Java SE 6. (AFAICT the issue is only with the JDK vendor change and not OS changes per se.)



I also had to work around what I *think* is an Oracle JDK bug (but may be a design choice): it ships with a jawt_md.h set up for X11-based GUIs and not Apple&apos;s AppKit-based one (which defines the JAWT_SurfaceLayers ObjC protocol). Fortunately, JavaVM.framework still ships with Apple&apos;s implementation of this header, so I just had to make sure that we were including the correct one.

JAWT_DrawingSurfaceInfo.c changes like this:
+#ifdef __APPLE__
+#include &lt;JavaVM/jawt_md.h&gt;
+#else
 #include &lt;jawt_md.h&gt;
+#endif

and OSXmisc.m changes like this:
-#include &lt;jawt_md.h&gt;
+#include &lt;JavaVM/jawt_md.h&gt;

(See the attached git diff.)

Prior to Oracle Java, it was always this same jawt_md.h inside of the JavaVM framework that was being included, so this change *should* be fully backwards compatible, but someone with Mac OS X 10.{5,6,7} handy should double check.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1930</commentid>
    <comment_count>1</comment_count>
    <who name="alexsb">alexander.lex</who>
    <bug_when>2012-10-30 15:33:30 +0100</bug_when>
    <thetext>We run into this problem and would really appreciate if the fix would be accepted asap!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1931</commentid>
    <comment_count>2</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2012-10-30 20:44:41 +0100</bug_when>
    <thetext>If this &apos;patch&apos; is actually important to you - please send a pull request to one of your git branches.
This must be in sync w/ my latest master ofc.

Then I can easily test your patch.

Note: 
I haven&apos;t verified this patch manually yet, since I still build on java6
due to our compatibility baseline.
However, since we provide JNI headers and it&apos;s include path, 
I was under the impression this should not be necessary.

If I get a git pull request, I will give it a try and test on both variation.

Disclaimer:
This is low prio right now until RC11 is delivered, so probably next week!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1943</commentid>
    <comment_count>3</comment_count>
    <who name="">jrh</who>
    <bug_when>2012-10-31 23:32:52 +0100</bug_when>
    <thetext>(In reply to comment #2)
&gt; If this &apos;patch&apos; is actually important to you - please send a pull request to
&gt; one of your git branches.
&gt; This must be in sync w/ my latest master ofc.

I assure you that it is important to me, but I don&apos;t know what this means (git noob, sorry). I take it that it&apos;s something other than giving you the output of &quot;git diff&quot;, which is what I had attached here.

&gt; 
&gt; Then I can easily test your patch.
&gt; 
&gt; Note: 
&gt; I haven&apos;t verified this patch manually yet, since I still build on java6
&gt; due to our compatibility baseline.

So the compatibility baseline is 1.6? Any idea when that&apos;ll get bumped to 1.7? A lot of the Mac quirkiness in the build system can get simplified if we can assume Oracle/OpenJDK 1.7+.

&gt; However, since we provide JNI headers and it&apos;s include path, 
&gt; I was under the impression this should not be necessary.

I don&apos;t understand this statement, either, sorry. What should not be necessary? The &quot;&lt;JavaVM/jawt_md.h&gt;&quot; part? That&apos;s a workaround for the 1.7 JDK. Normally you&apos;d want to use its jawt_md.h (at ${java.includes.dir.platform}), but Oracle&apos;s jawt_md.h is buggy, see:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7181710
so we use the older one from Apple&apos;s JavaVM.framework instead. This change should be viewed as a temporary workaround, to be reverted once the JDK gets fixed.

&gt; 
&gt; If I get a git pull request, I will give it a try and test on both variation.
&gt; 
&gt; Disclaimer:
&gt; This is low prio right now until RC11 is delivered, so probably next week!

Fine with me, I&apos;m plenty busy with non-Java stuff right now.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2202</commentid>
    <comment_count>4</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2013-02-20 14:27:27 +0100</bug_when>
    <thetext>See referenced git sha1 values of gluegen + jogl.

GlueGen and JOGL can be build solely w/ Java7 w/o Java6 dependencies, 
further more - the build w/ Java6 or Java7 no more links against a Java6 native library,
which was previously the case.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>369</attachid>
            <date>2012-09-23 04:46:55 +0200</date>
            <delta_ts>2012-09-23 04:46:55 +0200</delta_ts>
            <desc>Specify jawt_md.h from JavaVM.framework on Mac OS X.</desc>
            <filename>ensure-javavm-framework-jawt_md.patch</filename>
            <type>application/octet-stream</type>
            <size>984</size>
            <attacher>jrh</attacher>
            
              <data encoding="base64">ZGlmZiAtLWdpdCBhL3NyYy9uYXRpdmV3aW5kb3cvbmF0aXZlL0pBV1RfRHJhd2luZ1N1cmZhY2VJ
bmZvLmMgYi9zcmMvbmF0aXZld2luZG93L25hdGl2ZS9KQVdUX0RyYXdpbmdTdXJmYWNlSW5mby5j
CmluZGV4IDJhNjY1MTAuLjgyOWRkMTkgMTAwNjQ0Ci0tLSBhL3NyYy9uYXRpdmV3aW5kb3cvbmF0
aXZlL0pBV1RfRHJhd2luZ1N1cmZhY2VJbmZvLmMKKysrIGIvc3JjL25hdGl2ZXdpbmRvdy9uYXRp
dmUvSkFXVF9EcmF3aW5nU3VyZmFjZUluZm8uYwpAQCAtMzcsNyArMzcsMTEgQEAKICAqIGFuZCBk
ZXZlbG9wZWQg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