This is an automated email from the ASF dual-hosted git repository.

snagel pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nutch.git


The following commit(s) were added to refs/heads/master by this push:
     new 566f3fb  NUTCH-2639 bin/nutch fails to set native library path on 
Cygwin causing jobs to fail with UnsatisfiedLinkError Pick fix contributed by 
rustyx for 2.x
566f3fb is described below

commit 566f3fbe5b9df8347c01758e0d6219b792687a5c
Author: rustyx <m...@rustyx.org>
AuthorDate: Tue Sep 4 12:51:02 2018 +0200

    NUTCH-2639 bin/nutch fails to set native library path on Cygwin causing 
jobs to fail with UnsatisfiedLinkError
    Pick fix contributed by rustyx for 2.x
    
    A fix for NUTCH-2639.
    Will not set java.library.path unnecessarily, so that 
hadoop.dll/libhadoop.so can be found in PATH.
---
 src/bin/nutch | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/bin/nutch b/src/bin/nutch
index 70e1415..ab1df07 100755
--- a/src/bin/nutch
+++ b/src/bin/nutch
@@ -173,10 +173,9 @@ fi
 # used only in local mode 
 JAVA_LIBRARY_PATH=''
 if [ -d "${NUTCH_HOME}/lib/native" ]; then
+  JAVA_PLATFORM=`"${JAVA}" -classpath "$CLASSPATH" 
org.apache.hadoop.util.PlatformName | sed -e 's/ /_/g' -e 's/\r//g'`
 
-  JAVA_PLATFORM=`"${JAVA}" -classpath "$CLASSPATH" 
org.apache.hadoop.util.PlatformName | sed -e 's/ /_/g'`
-
-  if [ -d "${NUTCH_HOME}/lib/native" ]; then
+  if [ -d "${NUTCH_HOME}/lib/native/${JAVA_PLATFORM}" ]; then
     if [ "x$JAVA_LIBRARY_PATH" != "x" ]; then
       
JAVA_LIBRARY_PATH="${JAVA_LIBRARY_PATH}:${NUTCH_HOME}/lib/native/${JAVA_PLATFORM}"
     else

Reply via email to