[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Building JavaHL on OS X

From: David James <james_at_cs.toronto.edu>
Date: 2005-12-06 03:46:49 CET

On 12/3/05, Malcolm Rowe <malcolm-svn-dev@farside.org.uk> wrote:
> On Fri, Dec 02, 2005 at 11:35:53AM -0800, Daniel Rall wrote:
> > Well over a year ago, I sent in a patch to fix a problem Justin
> > Erenkrantz noted on OS X when building with Jikes. (Possibly to do
> > with finding his Java runtime JARs? He didn't specify.)
>
> Ok, I understand what's going on now. On OS X, the shipped javac knows
> how to find the Java system classes automatically, but the shipped
> jikes executable (in /usr/bin/jikes) doesn't - it needs to be told via
> JAVA_CLASSPATH.
>
> Since we pick up jikes by preference, we need to fix the JAVA_CLASSPATH
> logic to find the system classes on Darwin.
>
> However, the patch doesn't work for me. I don't have JAVA_HOME set,
> which means that $JDK is correctly set to /Library/Java/Home from the
> start, and so the fixup logic you changed doesn't run.
>
> Since the 'JRE lib dir' is always in the same place on Darwin (or, more
> accurately, we have no better guesses for where it might be located),
> why not set $JRE_LIB_DIR unconditionally on Darwin (we'll only use it
> for jikes-enabled builds, of course)?
>
> Updated patch attached. I can confirm that it appears to fix 'make
> javahl' for me on OS X 10.4.3, anyway, which previously bombed out right
> at the start.
>
> Regards,
> Malcolm
>
>
> Index: build/ac-macros/java.m4
> ===================================================================
> --- build/ac-macros/java.m4 (revision 17597)
> +++ build/ac-macros/java.m4 (working copy)
> @@ -64,6 +64,12 @@
> if test "$os_arch" = "Darwin" -a "$JDK" = "/usr" -a -d "/Library/Java/Home"; then
> JDK="/Library/Java/Home"
> fi
> + if test "$os_arch" = "Darwin"; then
> + JRE_LIB_DIR="/System/Library/Frameworks/JavaVM.framework/Classes"
> + else
> + JRE_LIB_DIR="$JDK/jre/lib"
> + fi

Perhaps use this test instead, to be consistant with the test for
/Library/Java/Home?
  if test "$os_arch" = "Darwin" -a "$JDK" = "/Library/Java/Home"; then

I'm not familiar with Mac OS X, but I'd guess that if $JDK is in a
non-standard location, then we'd be better off using "$JDK/jre/lib"
than the standard location for $JRE_LIB_DIR.

Cheers,

David

--
David James -- http://www.cs.toronto.edu/~james
Received on Tue Dec 6 03:47:36 2005

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.