hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From omal...@apache.org
Subject svn commit: r644621 - in /hadoop/core/trunk: CHANGES.txt build.xml src/native/acinclude.m4 src/native/configure src/native/packageNativeHadoop.sh
Date Fri, 04 Apr 2008 06:19:52 GMT
Author: omalley
Date: Thu Apr  3 23:19:37 2008
New Revision: 644621

URL: http://svn.apache.org/viewvc?rev=644621&view=rev
Log:
HADOOP-3123. Fix the native library build scripts to work on Solaris. 
Contributed by Tom White.

Modified:
    hadoop/core/trunk/CHANGES.txt
    hadoop/core/trunk/build.xml
    hadoop/core/trunk/src/native/acinclude.m4
    hadoop/core/trunk/src/native/configure
    hadoop/core/trunk/src/native/packageNativeHadoop.sh

Modified: hadoop/core/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/CHANGES.txt?rev=644621&r1=644620&r2=644621&view=diff
==============================================================================
--- hadoop/core/trunk/CHANGES.txt (original)
+++ hadoop/core/trunk/CHANGES.txt Thu Apr  3 23:19:37 2008
@@ -458,6 +458,9 @@
     HADOOP-2927. Fix TestDU to acurately calculate the expected file size.
     (shv via nigel)
 
+    HADOOP-3123. Fix the native library build scripts to work on Solaris.
+    (tomwhite via omalley)
+
 Release 0.16.2 - 2008-04-02
 
   BUG FIXES

Modified: hadoop/core/trunk/build.xml
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/build.xml?rev=644621&r1=644620&r2=644621&view=diff
==============================================================================
--- hadoop/core/trunk/build.xml (original)
+++ hadoop/core/trunk/build.xml Thu Apr  3 23:19:37 2008
@@ -119,6 +119,7 @@
   <property name="svn.cmd" value="svn"/>
   <property name="grep.cmd" value="grep"/>
   <property name="patch.cmd" value="patch"/>
+  <property name="make.cmd" value="make"/>
 
 
   <available property="clover.present" classname="com.cenqua.clover.tasks.CloverReportTask"
/>
@@ -348,7 +349,7 @@
 	  <arg line="${native.src.dir}/configure"/>
     </exec>
 
-    <exec dir="${build.native}" executable="make" failonerror="true">
+    <exec dir="${build.native}" executable="${make.cmd}" failonerror="true">
       <env key="OS_NAME" value="${os.name}"/>
       <env key="OS_ARCH" value="${os.arch}"/>
   	  <env key="JVM_DATA_MODEL" value="${sun.arch.data.model}"/>
@@ -907,7 +908,7 @@
   <!-- ================================================================== -->
   <target name="compile-libhdfs" depends="init">
     <mkdir dir="${build.libhdfs}"/>
-    <exec dir="${libhdfs.src}" executable="make" failonerror="true">
+    <exec dir="${libhdfs.src}" executable="${make.cmd}" failonerror="true">
       <env key="OS_NAME" value="${os.name}"/>
       <env key="OS_ARCH" value="${os.arch}"/>
       <env key="SHLIB_VERSION" value="${libhdfs.version}"/>
@@ -921,7 +922,7 @@
     <mkdir dir="${libhdfs.test.dir}/logs"/>
     <mkdir dir="${libhdfs.test.dir}/dfs/name"/>
 
-    <exec dir="${libhdfs.src}" executable="make" failonerror="true">
+    <exec dir="${libhdfs.src}" executable="${make.cmd}" failonerror="true">
         <env key="OS_NAME" value="${os.name}"/>
         <env key="OS_ARCH" value="${os.arch}"/>
         <env key="SHLIB_VERSION" value="${libhdfs.version}"/>
@@ -934,14 +935,14 @@
   </target>
 	
   <target name="clean-libhdfs">
-    <exec dir="${libhdfs.src}" executable="make">
+    <exec dir="${libhdfs.src}" executable="${make.cmd}">
       <env key="LIBHDFS_BUILD_DIR" value="${build.libhdfs}"/>
     	<arg value="clean"/>
     </exec>
   </target>
 
   <target name="doc-libhdfs" depends="compile-libhdfs">
-	<exec dir="${libhdfs.src}" executable="make">
+	<exec dir="${libhdfs.src}" executable="${make.cmd}">
 	  <arg value="doc"/>
 	</exec>
   </target>
@@ -1003,7 +1004,7 @@
 
   <target name="compile-c++-utils" depends="create-c++-utils-makefile"
                                    if="compile.c++">
-    <exec executable="make" dir="${build.c++.utils}" searchpath="yes" 
+    <exec executable="${make.cmd}" dir="${build.c++.utils}" searchpath="yes" 
           failonerror="yes">
       <arg  value="install"/>
     </exec>
@@ -1021,7 +1022,7 @@
   <target name="compile-c++-pipes" 
           depends="create-c++-pipes-makefile,compile-c++-utils"
           if="compile.c++">
-    <exec executable="make" dir="${build.c++.pipes}" searchpath="yes" 
+    <exec executable="${make.cmd}" dir="${build.c++.pipes}" searchpath="yes" 
           failonerror="yes">
       <arg value="install"/>
     </exec>
@@ -1046,7 +1047,7 @@
   <target name="compile-c++-examples-pipes" 
           depends="create-c++-examples-pipes-makefile,compile-c++-pipes"
           if="compile.c++">
-    <exec executable="make" dir="${build.c++.examples.pipes}" searchpath="yes" 
+    <exec executable="${make.cmd}" dir="${build.c++.examples.pipes}" searchpath="yes"

           failonerror="yes">
       <arg  value="install"/>
     </exec>

Modified: hadoop/core/trunk/src/native/acinclude.m4
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/native/acinclude.m4?rev=644621&r1=644620&r2=644621&view=diff
==============================================================================
--- hadoop/core/trunk/src/native/acinclude.m4 (original)
+++ hadoop/core/trunk/src/native/acinclude.m4 Thu Apr  3 23:19:37 2008
@@ -7,12 +7,12 @@
 AC_CACHE_CHECK([Checking for the 'actual' dynamic-library for '-l$1'], ac_cv_libname_$1,
   [
   echo 'int main(int argc, char **argv){return 0;}' > conftest.c
-  if test -z "`${CC} -o conftest conftest.c -l$1 2>&1`"; then
+  if test -z "`${CC} ${LDFLAGS} -o conftest conftest.c -l$1 2>&1`"; then
     dnl Try objdump and ldd in that order to get the dynamic library
-    if test ! -z "`which objdump`"; then
+    if test ! -z "`which objdump | grep -v 'no objdump'`"; then
       ac_cv_libname_$1="`objdump -p conftest | grep NEEDED | grep $1 | sed 's/\W*NEEDED\W*\(.*\)\W*$/\"\1\"/'`"
-    elif test ! -z "`which ldd`"; then
-      ac_cv_libname_$1="`ldd conftest | grep $1 | sed 's/^\W*\(\w*z\.\w*\(\.\w*\)\?\)\W*=>.*$/\"\1\"/'`"
+    elif test ! -z "`which ldd | grep -v 'no ldd'`"; then
+      ac_cv_libname_$1="`ldd conftest | grep $1 | sed 's/^[[[^A-Za-z0-9]]]*\([[[A-Za-z0-9\.]]]*\)[[[^A-Za-z0-9]]]*=>.*$/\"\1\"/'`"
     else
       AC_MSG_ERROR(Can't find either 'objdump' or 'ldd' to compute the dynamic library for
'-l$1')
     fi

Modified: hadoop/core/trunk/src/native/configure
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/native/configure?rev=644621&r1=644620&r2=644621&view=diff
==============================================================================
--- hadoop/core/trunk/src/native/configure (original)
+++ hadoop/core/trunk/src/native/configure Thu Apr  3 23:19:37 2008
@@ -19516,11 +19516,11 @@
 else
 
   echo 'int main(int argc, char **argv){return 0;}' > conftest.c
-  if test -z "`${CC} -o conftest conftest.c -lz 2>&1`"; then
-        if test ! -z "`which objdump`"; then
+  if test -z "`${CC} ${LDFLAGS} -o conftest conftest.c -lz 2>&1`"; then
+        if test ! -z "`which objdump | grep -v 'no objdump'`"; then
       ac_cv_libname_z="`objdump -p conftest | grep NEEDED | grep z | sed 's/\W*NEEDED\W*\(.*\)\W*$/\"\1\"/'`"
-    elif test ! -z "`which ldd`"; then
-      ac_cv_libname_z="`ldd conftest | grep z | sed 's/^\W*\(\w*z\.\w*\(\.\w*\)\?\)\W*=>.*$/\"\1\"/'`"
+    elif test ! -z "`which ldd | grep -v 'no ldd'`"; then
+      ac_cv_libname_z="`ldd conftest | grep z | sed 's/^[^A-Za-z0-9]*\([A-Za-z0-9\.]*\)[^A-Za-z0-9]*=>.*$/\"\1\"/'`"
     else
       { { echo "$as_me:$LINENO: error: Can't find either 'objdump' or 'ldd' to compute the
dynamic library for '-lz'" >&5
 echo "$as_me: error: Can't find either 'objdump' or 'ldd' to compute the dynamic library
for '-lz'" >&2;}
@@ -19712,11 +19712,11 @@
 else
 
   echo 'int main(int argc, char **argv){return 0;}' > conftest.c
-  if test -z "`${CC} -o conftest conftest.c -llzo2 2>&1`"; then
-        if test ! -z "`which objdump`"; then
+  if test -z "`${CC} ${LDFLAGS} -o conftest conftest.c -llzo2 2>&1`"; then
+        if test ! -z "`which objdump | grep -v 'no objdump'`"; then
       ac_cv_libname_lzo2="`objdump -p conftest | grep NEEDED | grep lzo2 | sed 's/\W*NEEDED\W*\(.*\)\W*$/\"\1\"/'`"
-    elif test ! -z "`which ldd`"; then
-      ac_cv_libname_lzo2="`ldd conftest | grep lzo2 | sed 's/^\W*\(\w*z\.\w*\(\.\w*\)\?\)\W*=>.*$/\"\1\"/'`"
+    elif test ! -z "`which ldd | grep -v 'no ldd'`"; then
+      ac_cv_libname_lzo2="`ldd conftest | grep lzo2 | sed 's/^[^A-Za-z0-9]*\([A-Za-z0-9\.]*\)[^A-Za-z0-9]*=>.*$/\"\1\"/'`"
     else
       { { echo "$as_me:$LINENO: error: Can't find either 'objdump' or 'ldd' to compute the
dynamic library for '-llzo2'" >&5
 echo "$as_me: error: Can't find either 'objdump' or 'ldd' to compute the dynamic library
for '-llzo2'" >&2;}

Modified: hadoop/core/trunk/src/native/packageNativeHadoop.sh
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/native/packageNativeHadoop.sh?rev=644621&r1=644620&r2=644621&view=diff
==============================================================================
--- hadoop/core/trunk/src/native/packageNativeHadoop.sh (original)
+++ hadoop/core/trunk/src/native/packageNativeHadoop.sh Thu Apr  3 23:19:37 2008
@@ -27,8 +27,8 @@
 # All these are setup by build.xml.
 #
 
-TAR='tar -c'
-UNTAR='tar -x'
+TAR='tar cf -'
+UNTAR='tar xfBp -'
 
 # Copy the pre-built libraries in $BASE_NATIVE_LIB_DIR
 if [ -d $BASE_NATIVE_LIB_DIR ]
@@ -42,7 +42,7 @@
     fi
     echo "Copying libraries in $BASE_NATIVE_LIB_DIR/$platform to $DIST_LIB_DIR/$platform/"
     cd $BASE_NATIVE_LIB_DIR/$platform/
-    $TAR *hadoop* | $UNTAR -C $DIST_LIB_DIR/$platform/
+    $TAR *hadoop* | (cd $DIST_LIB_DIR/$platform/; $UNTAR)
   done
 fi
 
@@ -58,7 +58,7 @@
     fi
     echo "Copying libraries in $BUILD_NATIVE_DIR/$platform/lib to $DIST_LIB_DIR/$platform/"
     cd $BUILD_NATIVE_DIR/$platform/lib
-    $TAR *hadoop* | $UNTAR -C $DIST_LIB_DIR/$platform/
+    $TAR *hadoop* | (cd $DIST_LIB_DIR/$platform/; $UNTAR)
   done  
 fi
 



Mime
View raw message