Permalink
Browse files

[Hdfs Fix] Fix the TestNativeIO

Summary:
currently, when we run the TestNativeIO, we will get the error said
"Forked Java VM exited abnormally."

And on my dev box, I find another line said "
/usr/local/jdk-6u14-64/jre/bin/java: symbol lookup error:
/data/users/dikang/freshhadoop/trunk/VENDOR/hadoop-0.20/build/native/Linux-amd64-64/lib/libhadoop.so.1.0.0:
undefined symbol: clock_gettime"

I google it and find that when we build the native libhadoop.so, we need
to add the -lrt to the LDFLAGS. So I add it into the build.xml and it
works for me on my dev box.

ps: the clock_gettime was introduced in the diff D515547

Test Plan: ant test -Dtestcase=TestNativeIO

Reviewers: tylerharter, pritam, sdong, tomasz, hkuang

Reviewed By: tomasz
  • Loading branch information...
1 parent c9b1771 commit 5ad5ffb4f00a4702808fa62d64b348c55b66c17c dikang committed with Alex Feinberg Oct 24, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 build.xml
View
@@ -569,7 +569,7 @@
<env key="JVM_DATA_MODEL" value="${sun.arch.data.model}"/>
<env key="HADOOP_NATIVE_SRCDIR" value="${native.src.dir}"/>
<arg line="${native.src.dir}/configure
- LDFLAGS='-L${snappy.lib} -L${basedir}/nativelib/lzma'
+ LDFLAGS='-L${snappy.lib} -L${basedir}/nativelib/lzma -lrt'
CPPFLAGS='-I${snappy.include} -I${basedir}/nativelib/lzma'"/>
</exec>

0 comments on commit 5ad5ffb

Please sign in to comment.