You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by su...@apache.org on 2012/09/27 00:56:47 UTC
svn commit: r1390764 - in /hadoop/common/branches/branch-1-win: CHANGES.txt
src/native/acinclude.m4 src/native/configure.ac
Author: suresh
Date: Wed Sep 26 22:56:46 2012
New Revision: 1390764
URL: http://svn.apache.org/viewvc?rev=1390764&view=rev
Log:
HDFS-7868. Merging change r1353691 from branch-1 to branch-1-win.
Modified:
hadoop/common/branches/branch-1-win/CHANGES.txt
hadoop/common/branches/branch-1-win/src/native/acinclude.m4
hadoop/common/branches/branch-1-win/src/native/configure.ac
Modified: hadoop/common/branches/branch-1-win/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-1-win/CHANGES.txt?rev=1390764&r1=1390763&r2=1390764&view=diff
==============================================================================
--- hadoop/common/branches/branch-1-win/CHANGES.txt (original)
+++ hadoop/common/branches/branch-1-win/CHANGES.txt Wed Sep 26 22:56:46 2012
@@ -8,6 +8,9 @@ Release 1.2.0 - unreleased
module external to HDFS to specify how HDFS blocks should be placed.
(Sumadhur Reddy Bolli via szetszwo)
+ HADOOP-7868. Hadoop native fails to compile when default linker
+ option is -Wl,--as-needed. (Trevor Robinson via eli)
+
Release 1.1.0 - unreleased
NEW FEATURES
Modified: hadoop/common/branches/branch-1-win/src/native/acinclude.m4
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-1-win/src/native/acinclude.m4?rev=1390764&r1=1390763&r2=1390764&view=diff
==============================================================================
--- hadoop/common/branches/branch-1-win/src/native/acinclude.m4 (original)
+++ hadoop/common/branches/branch-1-win/src/native/acinclude.m4 Wed Sep 26 22:56:46 2012
@@ -1,4 +1,4 @@
-# AC_COMPUTE_NEEDED_DSO(LIBRARY, PREPROC_SYMBOL)
+# AC_COMPUTE_NEEDED_DSO(LIBRARY, TEST_PROGRAM, PREPROC_SYMBOL)
# --------------------------------------------------
# Compute the 'actual' dynamic-library used
# for LIBRARY and set it to PREPROC_SYMBOL
@@ -6,7 +6,7 @@ AC_DEFUN([AC_COMPUTE_NEEDED_DSO],
[
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
+ echo '$2' > conftest.c
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 | grep -v 'no objdump'`"; then
@@ -22,5 +22,5 @@ AC_CACHE_CHECK([Checking for the 'actual
rm -f conftest*
]
)
-AC_DEFINE_UNQUOTED($2, ${ac_cv_libname_$1}, [The 'actual' dynamic-library for '-l$1'])
+AC_DEFINE_UNQUOTED($3, ${ac_cv_libname_$1}, [The 'actual' dynamic-library for '-l$1'])
])# AC_COMPUTE_NEEDED_DSO
Modified: hadoop/common/branches/branch-1-win/src/native/configure.ac
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-1-win/src/native/configure.ac?rev=1390764&r1=1390763&r2=1390764&view=diff
==============================================================================
--- hadoop/common/branches/branch-1-win/src/native/configure.ac (original)
+++ hadoop/common/branches/branch-1-win/src/native/configure.ac Wed Sep 26 22:56:46 2012
@@ -87,10 +87,20 @@ CPPFLAGS=$cppflags_bak
AC_SUBST([JNI_CPPFLAGS])
dnl Check for zlib headers
-AC_CHECK_HEADERS([zlib.h zconf.h], AC_COMPUTE_NEEDED_DSO(z,HADOOP_ZLIB_LIBRARY), AC_MSG_ERROR(Zlib headers were not found... native-hadoop library needs zlib to build. Please install the requisite zlib development package.))
+AC_CHECK_HEADERS([zlib.h zconf.h],
+ AC_COMPUTE_NEEDED_DSO(z,
+ [#include "zlib.h"
+ int main(int argc, char **argv){zlibVersion();return 0;}],
+ HADOOP_ZLIB_LIBRARY),
+ AC_MSG_ERROR(Zlib headers were not found... native-hadoop library needs zlib to build. Please install the requisite zlib development package.))
dnl Check for snappy headers
-AC_CHECK_HEADERS([snappy-c.h], AC_COMPUTE_NEEDED_DSO(snappy,HADOOP_SNAPPY_LIBRARY), AC_MSG_WARN(Snappy headers were not found... building without snappy.))
+AC_CHECK_HEADERS([snappy-c.h],
+ AC_COMPUTE_NEEDED_DSO(snappy,
+ [#include "snappy-c.h"
+ int main(int argc, char **argv){snappy_compress(0,0,0,0);return 0;}],
+ HADOOP_SNAPPY_LIBRARY),
+ AC_MSG_WARN(Snappy headers were not found... building without snappy.))
dnl Check for headers needed by the native Group resolution implementation
AC_CHECK_HEADERS([fcntl.h stdlib.h string.h unistd.h], [], AC_MSG_ERROR(Some system headers not found... please ensure their presence on your platform.))