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

Building JavaHL fails with Red Hat "alternatives"

From: Kenneth Porter <shiva_at_sewingwitch.com>
Date: 2006-01-10 04:01:35 CET

Red Hat Fedora implements a system called "alternatives" for
simultaneous installation of competing solutions for various
technologies, such as email servers and Java suppliers. This is
accomplished through scripts and a network of symbolic links.

When configuring Subversion (ie. running the configure script), the JNI
headers are located based on the supplied JDK root. Code in build/ac-
macros/java.m4 assembles the list of header subdirectories to pass to
the build tools.

This fails on Fedora because the top-level include directory is a
symbolic link, and the find command used doesn't follow the symlink to
find its subdirectories. To fix this, invocations of find in java.m4
should include the -follow switch.

[buildmeister@segw java]$ ls -l /usr/lib/jvm/java/include
lrwxrwxrwx 1 root root 31 Nov 29 19:19 /usr/lib/jvm/java/include ->
/usr/java/j2sdk1.4.2_10/include
[buildmeister@segw java]$ find /usr/lib/jvm/java/include -type d
[buildmeister@segw java]$ find /usr/lib/jvm/java/include -follow -type d
/usr/lib/jvm/java/include
/usr/lib/jvm/java/include/linux

Suggested fix:

--- java.m4 2006-01-09 18:25:03.570422116 -0800
+++ java.m4.new 2006-01-09 18:59:56.069761404 -0800
@@ -136,7 +136,7 @@
     fi

     JNI_INCLUDES="-I$JNI_INCLUDEDIR"
- list="`find "$JNI_INCLUDEDIR" -type d -print`"
+ list="`find "$JNI_INCLUDEDIR" -follow -type d -print`"
     for dir in $list; do
       JNI_INCLUDES="$JNI_INCLUDES -I$dir"
     done

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Jan 10 04:03:11 2006

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