瀏覽代碼

HADOOP-6924. Adds a directory to the list of directories to search for the libjvm.so file. The new directory is found by running a 'find' command and the first output is taken. This was done to handle the build of Hadoop with IBM's JDK. Contributed by Stephen Watt, Guillermo Cabrera and Devaraj Das.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-1@1302720 13f79535-47bb-0310-9956-ffa450edef68
Devaraj Das 13 年之前
父節點
當前提交
576dac267b
共有 3 個文件被更改,包括 9 次插入0 次删除
  1. 5 0
      CHANGES.txt
  2. 2 0
      src/native/configure
  3. 2 0
      src/native/configure.ac

+ 5 - 0
CHANGES.txt

@@ -163,6 +163,11 @@ Release 1.1.0 - unreleased
 
     MAPREDUCE-2835. Make per-job counter limits configurable. (tomwhite)
 
+    HADOOP-6924. Adds a directory to the list of directories to search for the libjvm.so file. 
+    The new directory is found by running a 'find' command and the first output is taken. 
+    This was done to handle the build of Hadoop with IBM's JDK. (Stephen Watt, 
+    Guillermo Cabrera and ddas) 
+
 Release 1.0.2 - 2012.03.18
 
   NEW FEATURES

+ 2 - 0
src/native/configure

@@ -19777,6 +19777,8 @@ JNI_LDFLAGS=""
 if test $JAVA_HOME != ""
 then
   JNI_LDFLAGS="-L$JAVA_HOME/jre/lib/$OS_ARCH/server"
+  JVMSOPATH=`find $JAVA_HOME/jre/ -name libjvm.so | head -n 1`
+  JNI_LDFLAGS="$JNI_LDFLAGS -L`dirname $JVMSOPATH`"
 fi
 ldflags_bak=$LDFLAGS
 LDFLAGS="$LDFLAGS $JNI_LDFLAGS"

+ 2 - 0
src/native/configure.ac

@@ -55,6 +55,8 @@ JNI_LDFLAGS=""
 if test $JAVA_HOME != ""
 then
   JNI_LDFLAGS="-L$JAVA_HOME/jre/lib/$OS_ARCH/server"
+  JVMSOPATH=`find $JAVA_HOME/jre/ -name libjvm.so | head -n 1`
+  JNI_LDFLAGS="$JNI_LDFLAGS -L`dirname $JVMSOPATH`"
 fi
 ldflags_bak=$LDFLAGS
 LDFLAGS="$LDFLAGS $JNI_LDFLAGS"