You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-user@hadoop.apache.org by stchu <st...@gmail.com> on 2009/04/15 03:13:04 UTC
hadoop pipes problem
Hi,
I tried to use Hadoop Pipes for C++. The program was copied from the Hadoop
Wiki: http://wiki.apache.org/hadoop/C++WordCount.
But I am confused about the file name and the path. Should the program be
named as "examples"? And where should I put this code
for compiling by ant? I used the name:"examples" and put it to
{$HADOOP_HOME}/src/examples/pipes/. When I typed the instruction:
ant -Dcompile.c++=yes examples, I got the message as followed:
===========================================================================
Buildfile: build.xml
clover.setup:
clover.info:
[echo]
[echo] Clover not found. Code coverage reports disabled.
[echo]
clover:
init:
[touch] Creating /tmp/null255878201
[delete] Deleting: /tmp/null255878201
[exec] src/saveVersion.sh: 22: svn: not found
[exec] src/saveVersion.sh: 23: svn: not found
record-parser:
compile-rcc-compiler:
compile-core-classes:
[javac] Compiling 1 source file to /home/chu/hadoop-0.18.1/build/classes
compile-core-native:
check-c++-makefiles:
create-c++-pipes-makefile:
create-c++-utils-makefile:
compile-c++-utils:
[exec] depbase=`echo impl/StringUtils.o | sed
's|[^/]*$|.deps/&|;s|\.o$||'`; \
[exec] if g++ -DHAVE_CONFIG_H -I.
-I/home/chu/hadoop-0.18.1/src/c++/utils -I./impl
-I/home/chu/hadoop-0.18.1/src/c++/utils/api -Wall -g -O2 -MT
impl/StringUtils.o -MD -MP -MF "$depbase.Tpo" -c -o impl/StringUtils.o
/home/chu/hadoop-0.18.1/src/c++/utils/impl/StringUtils.cc; \
[exec] then mv -f "$depbase.Tpo" "$depbase.Po"; else rm -f
"$depbase.Tpo"; exit 1; fi
[exec] /home/chu/hadoop-0.18.1/src/c++/utils/impl/StringUtils.cc: In
function ‘uint64_t HadoopUtils::getCurrentMillis()’:
[exec] /home/chu/hadoop-0.18.1/src/c++/utils/impl/StringUtils.cc:74:
error: ‘strerror’ was not declared in this scope
[exec] /home/chu/hadoop-0.18.1/src/c++/utils/impl/StringUtils.cc: In
function ‘std::string HadoopUtils::quoteString(const std::string&, const
char*)’:
[exec] /home/chu/hadoop-0.18.1/src/c++/utils/impl/StringUtils.cc:103:
error: ‘strchr’ was not declared in this scope
[exec] /home/chu/hadoop-0.18.1/src/c++/utils/impl/StringUtils.cc: In
function ‘std::string HadoopUtils::unquoteString(const std::string&)’:
[exec] /home/chu/hadoop-0.18.1/src/c++/utils/impl/StringUtils.cc:144:
error: ‘strtol’ was not declared in this scope
[exec] make: *** [impl/StringUtils.o] Error 1
BUILD FAILED
/home/chu/hadoop-0.18.1/build.xml:1106: exec returned: 2
Total time: 1 second
======================================================================================================================================
The Hadoop version is 0.18.1, and the jdk path has been set. Can anyone give
me some suggestions or guides?
Thanks a lot.
stchu