Re: Building git master on OS X 10.8
Posted by jrh on
URL: https://forum.jogamp.org/Building-git-master-on-OS-X-10-8-tp4025646p4026235.html
I guess 10.8 is still pretty new around these parts. I found this message when trying to build JOGL on my shiny new retina laptop (I'm sure that'll have plenty of its own problems). I can't seem to find the pre-built binaries anymore, so this is my first time attempting to build JOGL.
The change you found is part of the Apple/Oracle transition. You're right that hard-coding a "1.7.0.jdk" path is wrong (my newly-installed 7u7 Oracle JDK has "jdk1.7.0_07.jdk" there instead). There seem to be several places that need to change, e.g. setting java.home.dir to /System/Library/Frameworks/JavaVM.framework/Home. Under the new regime, java.home.dir on Mac OS X should be ${java.home}/.., just like everywhere else, and java.includes.dir.platform should be ${java.includes.dir}/darwin. There are probably a bunch of other similar changes that need to happen, but I'm not enough of an ANT guru to do it right and still maintain backwards compatibility.
Anyway, if you change java.home.dir to point to ${java.home}/.. on OS X, then java.lib.dir.platform can just be ${java.home.dir}/jre/lib. That seemed to work for me well enough to get other compiler errors instead. The first was that 7u7's jawt_md.h includes <X11/Xlib.h> and a couple of other X11 headers. X11.app has been replaced by XQuartz.app, which apparently now puts these headers in /opt/X11/include. So I added that path to compiler.cfg.macosx.nativewindow in build-nativewindow. Then I got conflicting definitions for Boolean from <X11/Intrinsic.h> (as int) and <MacTypes.h> (as unsigned char) when building c.build.nativewindow.windowlib.macosx. That's as far as I am now.
tl;dr: On OS X 10.8 with Oracle JDK 7, these are proper values:
java.home.dir := ${java.home}/..
java.includes.dir.platform := ${java.includes.dir}/darwin
java.lib.dir.platform := ${java.home.dir}/jre/lib
as well as the standard (i.e. non-Mac-specific) values for these two:
target.rt.jar := ${java.home}/lib/rt.jar
host.rt.jar := ${java.home}/lib/rt.jar