I've been having trouble to build Hadoop 2.2.0 using Maven 3.1.1, this is part of the output I get (full log at http://pastebin.com/FE6vu46M):
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Apache Hadoop Main ................................ SUCCESS [27.471s]
[INFO] Apache Hadoop Project POM ......................... SUCCESS [0.936s]
[INFO] Apache Hadoop Annotations ......................... SUCCESS [3.819s]
[INFO] Apache Hadoop Assemblies .......................... SUCCESS [0.414s]
[INFO] Apache Hadoop Project Dist POM .................... SUCCESS [1.834s]
[INFO] Apache Hadoop Maven Plugins ....................... SUCCESS [4.693s]
[INFO] Apache Hadoop MiniKDC ............................. SUCCESS [4.346s]
[INFO] Apache Hadoop Auth ................................ SUCCESS [4.923s]
[INFO] Apache Hadoop Auth Examples ....................... SUCCESS [2.797s]
[INFO] Apache Hadoop Common .............................. FAILURE [22.898s]
[INFO] Apache Hadoop NFS ................................. SKIPPED
..........
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1:17.655s
[INFO] Finished at: Wed Dec 04 16:18:31 CET 2013
[INFO] Final Memory: 64M/420M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.7:
run (make) on project hadoop-common: An Ant BuildException has occured: exec returned: 1
[ERROR] around Ant part ...<exec dir="/home/scaino/hadoop-2.2.0-maven/hadoop-common-project/hadoop-common/target/native"
executable="cmake" failonerror="true">... @ 4:135 in
/home/scaino/hadoop-2.2.0-maven/hadoop-common-project/hadoop-common/target/antrun/build-main.xml
I've checked Protoc and it seems to be working, same with the library path, which is pointing to the libraries (installed in $HOME/install/lib):
~/hadoop-2.2.0-maven$ protoc --version
libprotoc 2.5.0
~/hadoop-2.2.0-maven$ echo $LD_LIBRARY_PATH
/home/scaino/install/lib:/home/software/gcc-4.8/lib64:/home/software/mpich2-1.2.1/lib
This is some system information retrieved by Maven:
~/hadoop-2.2.0-maven$ mvn --version
Apache Maven 3.1.1 (0728685237757ffbf44136acec0402957f723d9a; 2013-09-17 17:22:22+0200)
Maven home: /home/scaino/apache-maven-3.1.1
Java version: 1.7.0_25, vendor: Oracle Corporation
Java home: /home/software/jdk1.7.0_25/jre
Default locale: es_ES, platform encoding: UTF-8
OS name: "linux", version: "2.6.35-32-server", arch: "amd64", family: "unix"
I would appreciate any guidelines or hints that could make me understand what is going on since anything I've tried or seen has worked so far.
Thanks a lot in advance.
Regards,
Río
It turned out to be a library/compiler inconsistency in the node in which I was trying to compile the native libraries. Building in an updated node was enough to achieve a successful build.
Please make sure that your folder name should not have spaces, /home/hadoop2.2/hadoop2.2-src --- Build has no issues,
if your folder is like /home/hadoop 2.2/hadoop2.2-src --- will get build issues.
Make sure you have installed cmake in you machine. If you are using Ubuntu you can install cmake by using the following command
After installing the same, Try compiling...