From 54db828092723738cb637ea38f7b13a63a6666b5 Mon Sep 17 00:00:00 2001 From: Devaraj Das Date: Mon, 19 Mar 2012 23:02:31 +0000 Subject: [PATCH] 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/trunk@1302704 13f79535-47bb-0310-9956-ffa450edef68 --- hadoop-common-project/hadoop-common/CHANGES.txt | 5 +++++ .../hadoop-common/src/main/native/configure.ac | 2 ++ 2 files changed, 7 insertions(+) diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt index fe469284d3..2724f9c910 100644 --- a/hadoop-common-project/hadoop-common/CHANGES.txt +++ b/hadoop-common-project/hadoop-common/CHANGES.txt @@ -52,6 +52,11 @@ Trunk (unreleased changes) HADOOP-7994. Remove getProtocolVersion and getProtocolSignature from the client side translator and server side implementation. (jitendra) + 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) + BUG FIXES HADOOP-8177. MBeans shouldn't try to register when it fails to create MBeanName. diff --git a/hadoop-common-project/hadoop-common/src/main/native/configure.ac b/hadoop-common-project/hadoop-common/src/main/native/configure.ac index debd8f2cc1..4f9e63100e 100644 --- a/hadoop-common-project/hadoop-common/src/main/native/configure.ac +++ b/hadoop-common-project/hadoop-common/src/main/native/configure.ac @@ -57,6 +57,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="$LDFLAGS $JNI_LDFLAGS" AC_CHECK_LIB([jvm], [JNI_GetCreatedJavaVMs])