maven - Building hadoop 2.3.0 - An Ant BuildException has occured: exec returned: 2 -
i facing warn util.nativecodeloader: unable load native-hadoop library platform... using builtin-java classes applicable
while working on hadoop 2.3.0 stuffs in ubuntu 64 bits. internet says build hadoop source , put output lib.
steps followed here https://github.com/prayagupd/hadoop-prayaman/blob/master/prayaman.sh#l316
so, created following script build hadoop 2.3.0,
[full script @ github]
configurehadooplib(){ sudo apt-get install -y cmake sudo apt-get install -y build-essential sudo apt-get install g++ autoconf automake sudo apt-get install zlib1g-dev sudo apt-get install libssl-dev wget http://apache.mirror.anlx.net/hadoop/core/hadoop-2.3.0/hadoop-2.3.0-src.tar.gz tar -zxvf hadoop-2.3.0-src.tar.gz cd hadoop-2.3.0-src/ #cd $hadoop_home/src echo echo "#######################################################################" echo "[info] packaging hadoop source" echo "#######################################################################" #mvn package -pdist,native -dskiptests -dtar mvn -e package -dmaven.javadoc.skip=true -pdist,native -dskiptests -dtar echo echo "#######################################################################" echo "[info] packaging hadoop source - completed" echo "#######################################################################" #cp $hadoop_home/src/hadoop-dist/target/hadoop-2.3.0-cdh5.0.1/lib/native/* $hadoop_home/lib/native/ #cat ~/.bash_profile > export hadoop_common_lib_native_dir=$hadoop_home/lib/native #cat ~/.bash_profile > export hadoop_opts="-djava.library.path=$hadoop_home/lib" }
i fail following error => failed execute goal o.a.m.p:maven-antrun-plugin:1.7:run (make) on project hadoop-common,
[info] apache hadoop distribution ........................ skipped [info] ------------------------------------------------------------------------ [info] build failure [info] ------------------------------------------------------------------------ [info] total time: 1:06.730s [info] finished at: mon aug 18 18:22:00 npt 2014 [info] final memory: 67m/635m [info] ------------------------------------------------------------------------ [error] failed execute goal org.apache.maven.plugins:maven-antrun-plugin:1.7:run (make) on project hadoop-common: ant buildexception has occured: exec returned: 2 [error] around ant part ...<exec dir="/home/prayagupd/backup/hacker_/w.jvm/hadoop-prayaman/hadoop-2.3.0-src/hadoop-common-project/hadoop-common/target/native" executable="make" failonerror="true">... @ 7:172 in /home/prayagupd/backup/hacker_/w.jvm/hadoop-prayaman/hadoop-2.3.0-src/hadoop-common-project/hadoop-common/target/antrun/build-main.xml [error] -> [help 1] org.apache.maven.lifecycle.lifecycleexecutionexception: failed execute goal org.apache.maven.plugins:maven-antrun-plugin:1.7:run (make) on project hadoop-common: ant buildexception has occured: exec returned: 2 around ant part ...<exec dir="/home/prayagupd/backup/hacker_/w.jvm/hadoop-prayaman/hadoop-2.3.0-src/hadoop-common-project/hadoop-common/target/native" executable="make" failonerror="true">... @ 7:172 in /home/prayagupd/backup/hacker_/w.jvm/hadoop-prayaman/hadoop-2.3.0-src/hadoop-common-project/hadoop-common/target/antrun/build-main.xml @ org.apache.maven.lifecycle.internal.mojoexecutor.execute(mojoexecutor.java:217) @ org.apache.maven.lifecycle.internal.mojoexecutor.execute(mojoexecutor.java:153) @ org.apache.maven.lifecycle.internal.mojoexecutor.execute(mojoexecutor.java:145) @ org.apache.maven.lifecycle.internal.lifecyclemodulebuilder.buildproject(lifecyclemodulebuilder.java:84) @ org.apache.maven.lifecycle.internal.lifecyclemodulebuilder.buildproject(lifecyclemodulebuilder.java:59) @ org.apache.maven.lifecycle.internal.lifecyclestarter.singlethreadedbuild(lifecyclestarter.java:183) @ org.apache.maven.lifecycle.internal.lifecyclestarter.execute(lifecyclestarter.java:161) @ org.apache.maven.defaultmaven.doexecute(defaultmaven.java:320) @ org.apache.maven.defaultmaven.execute(defaultmaven.java:156) @ org.apache.maven.cli.mavencli.execute(mavencli.java:537) @ org.apache.maven.cli.mavencli.domain(mavencli.java:196) @ org.apache.maven.cli.mavencli.main(mavencli.java:141) @ sun.reflect.nativemethodaccessorimpl.invoke0(native method) @ sun.reflect.nativemethodaccessorimpl.invoke(nativemethodaccessorimpl.java:57) @ sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl.java:43) @ java.lang.reflect.method.invoke(method.java:601) @ org.codehaus.plexus.classworlds.launcher.launcher.launchenhanced(launcher.java:290) @ org.codehaus.plexus.classworlds.launcher.launcher.launch(launcher.java:230) @ org.codehaus.plexus.classworlds.launcher.launcher.mainwithexitcode(launcher.java:409) @ org.codehaus.plexus.classworlds.launcher.launcher.main(launcher.java:352) caused by: org.apache.maven.plugin.mojoexecutionexception: ant buildexception has occured: exec returned: 2 around ant part ...<exec dir="/home/prayagupd/backup/hacker_/w.jvm/hadoop-prayaman/hadoop-2.3.0-src/hadoop-common-project/hadoop-common/target/native" executable="make" failonerror="true">... @ 7:172 in /home/prayagupd/backup/hacker_/w.jvm/hadoop-prayaman/hadoop-2.3.0-src/hadoop-common-project/hadoop-common/target/antrun/build-main.xml @ org.apache.maven.plugin.antrun.antrunmojo.execute(antrunmojo.java:355) @ org.apache.maven.plugin.defaultbuildpluginmanager.executemojo(defaultbuildpluginmanager.java:101) @ org.apache.maven.lifecycle.internal.mojoexecutor.execute(mojoexecutor.java:209) ... 19 more caused by: /home/prayagupd/backup/hacker_/w.jvm/hadoop-prayaman/hadoop-2.3.0-src/hadoop-common-project/hadoop-common/target/antrun/build-main.xml:7: exec returned: 2 @ org.apache.tools.ant.taskdefs.exectask.runexecute(exectask.java:646) @ org.apache.tools.ant.taskdefs.exectask.runexec(exectask.java:672) @ org.apache.tools.ant.taskdefs.exectask.execute(exectask.java:498) @ org.apache.tools.ant.unknownelement.execute(unknownelement.java:291) @ sun.reflect.generatedmethodaccessor29.invoke(unknown source) @ sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl.java:43) @ java.lang.reflect.method.invoke(method.java:601) @ org.apache.tools.ant.dispatch.dispatchutils.execute(dispatchutils.java:106) @ org.apache.tools.ant.task.perform(task.java:348) @ org.apache.tools.ant.target.execute(target.java:390) @ org.apache.tools.ant.target.performtasks(target.java:411) @ org.apache.tools.ant.project.executesortedtargets(project.java:1399) @ org.apache.tools.ant.project.executetarget(project.java:1368) @ org.apache.maven.plugin.antrun.antrunmojo.execute(antrunmojo.java:327) ... 21 more [error] [error] re-run maven using -x switch enable full debug logging. [error] [error] more information errors , possible solutions, please read following articles: [error] [help 1] http://cwiki.apache.org/confluence/display/maven/mojoexecutionexception [error] [error] after correcting problems, can resume build command [error] mvn <goals> -rf :hadoop-common ####################################################################### [info] packaging hadoop source - completed #######################################################################
protoc version
$ protoc --version libprotoc 2.5.0
mvn version is
$ mvn --version apache maven 3.0.4 maven home: /usr/share/maven java version: 1.7.0, vendor: oracle corporation java home: /usr/local/jdk1.7.0/jre default locale: en_us, platform encoding: ansi_x3.4-1968 os name: "linux", version: "3.8.0-19-generic", arch: "amd64", family: "unix"
ant version is
$ ant -version apache ant(tm) version 1.8.2 compiled on may 18 2012
funny thing on 2 different machines, build fails @ 2 different projects same ant error.
references
http://www.elcct.com/installing-hadoop-2-3-0-on-ubuntu-13-10/
https://stackoverflow.com/a/17135947/432903
https://stackoverflow.com/a/23127967/432903
hadoop 2.4 failed execute goal org.apache.maven.plugins:maven-antrun-plugin:1.7
if in rush,you use pre-compiled version of hadoop native library downloading https://github.com/mehikmat/hadoop-install/tree/cdh5/native-libs
Comments
Post a Comment