[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: Malcolm Rowe <malcolm-svn-dev_at_farside.org.uk>
Date: 2005-12-03 13:00:58 CET

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

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.


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
+ if test "$os_arch" = "Darwin"; then
+ JRE_LIB_DIR="/System/Library/Frameworks/JavaVM.framework/Classes"
+ else
+ JRE_LIB_DIR="$JDK/jre/lib"
+ fi
   if test -f "$JDK/include/jni.h"; then
     dnl This *must* be fully expanded, or we'll have problems later in find.
@@ -106,8 +112,8 @@
         if test -z "$jikes_found" -a -x "$jikes"; then
- for jar in $JDK/jre/lib/*.jar; do
+ for jar in $JRE_LIB_DIR/*.jar; do

To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Dec 3 13:02:05 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.