我在kubuntu 12.04(64位)上编译3.0.0-alpha1 Hadoop版本时遇到了问题。
显然,此版本需要应用HADOOP-8887 patch。
在准备好所有依赖项的安装后, 根据BUILD.txt并应用补丁,此补丁所纠正的错误仍然存在,如日志文件中所示。
欢迎所有信息以帮助解决问题。
编译命令:
mvn clean package -Pdist -Dtar -Dmaven.javadoc.skip=true -DskipTests -fail-at-end -Pnative
日志文件尾:
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Apache Hadoop Main ................................ SUCCESS [0.601s]
[INFO] Apache Hadoop Build Tools ......................... SUCCESS [0.365s]
[INFO] Apache Hadoop Project POM ......................... SUCCESS [0.584s]
[INFO] Apache Hadoop Annotations ......................... SUCCESS [0.793s]
[INFO] Apache Hadoop Assemblies .......................... SUCCESS [0.100s]
[INFO] Apache Hadoop Project Dist POM .................... SUCCESS [1.017s]
[INFO] Apache Hadoop Maven Plugins ....................... SUCCESS [1.050s]
[INFO] Apache Hadoop MiniKDC ............................. SUCCESS [0.407s]
[INFO] Apache Hadoop Auth ................................ SUCCESS [0.978s]
[INFO] Apache Hadoop Auth Examples ....................... SUCCESS [0.697s]
[INFO] Apache Hadoop Common .............................. SUCCESS [23.360s]
[INFO] Apache Hadoop NFS ................................. SUCCESS [0.600s]
[INFO] Apache Hadoop KMS ................................. SUCCESS [4.903s]
[INFO] Apache Hadoop Common Project ...................... SUCCESS [0.024s]
[INFO] Apache Hadoop HDFS Client ......................... SUCCESS [11.244s]
[INFO] Apache Hadoop HDFS ................................ SUCCESS [17.609s]
[INFO] Apache Hadoop HDFS Native Client .................. SUCCESS [2.746s]
[INFO] Apache Hadoop HttpFS .............................. SUCCESS [12.556s]
[INFO] Apache Hadoop HDFS BookKeeper Journal ............. SUCCESS [0.564s]
[INFO] Apache Hadoop HDFS-NFS ............................ SUCCESS [0.758s]
[INFO] Apache Hadoop HDFS Project ........................ SUCCESS [0.021s]
[INFO] Apache Hadoop YARN ................................ SUCCESS [0.021s]
[INFO] Apache Hadoop YARN API ............................ SUCCESS [3.985s]
[INFO] Apache Hadoop YARN Common ......................... SUCCESS [3.795s]
[INFO] Apache Hadoop YARN Server ......................... SUCCESS [0.056s]
[INFO] Apache Hadoop YARN Server Common .................. SUCCESS [1.618s]
[INFO] Apache Hadoop YARN NodeManager .................... SUCCESS [4.077s]
[INFO] Apache Hadoop YARN Web Proxy ...................... SUCCESS [0.401s]
[INFO] Apache Hadoop YARN ApplicationHistoryService ...... SUCCESS [0.847s]
[INFO] Apache Hadoop YARN Timeline Service ............... SUCCESS [1.369s]
[INFO] Apache Hadoop YARN ResourceManager ................ SUCCESS [5.544s]
[INFO] Apache Hadoop YARN Server Tests ................... SUCCESS [0.749s]
[INFO] Apache Hadoop YARN Client ......................... SUCCESS [1.743s]
[INFO] Apache Hadoop YARN SharedCacheManager ............. SUCCESS [0.449s]
[INFO] Apache Hadoop YARN Timeline Plugin Storage ........ SUCCESS [0.512s]
[INFO] Apache Hadoop YARN Timeline Service HBase tests ... SUCCESS [1.503s]
[INFO] Apache Hadoop YARN Applications ................... SUCCESS [0.017s]
[INFO] Apache Hadoop YARN DistributedShell ............... SUCCESS [0.500s]
[INFO] Apache Hadoop YARN Unmanaged Am Launcher .......... SUCCESS [0.338s]
[INFO] Apache Hadoop YARN Site ........................... SUCCESS [0.018s]
[INFO] Apache Hadoop YARN Registry ....................... SUCCESS [0.844s]
[INFO] Apache Hadoop YARN Project ........................ SUCCESS [8.001s]
[INFO] Apache Hadoop MapReduce Client .................... SUCCESS [0.061s]
[INFO] Apache Hadoop MapReduce Core ...................... SUCCESS [2.869s]
[INFO] Apache Hadoop MapReduce Common .................... SUCCESS [1.362s]
[INFO] Apache Hadoop MapReduce Shuffle ................... SUCCESS [0.390s]
[INFO] Apache Hadoop MapReduce App ....................... SUCCESS [1.791s]
[INFO] Apache Hadoop MapReduce HistoryServer ............. SUCCESS [0.848s]
[INFO] Apache Hadoop MapReduce JobClient ................. SUCCESS [2.293s]
[INFO] Apache Hadoop MapReduce HistoryServer Plugins ..... SUCCESS [0.214s]
[INFO] Apache Hadoop MapReduce NativeTask ................ FAILURE [9.687s]
[INFO] Apache Hadoop MapReduce Examples .................. SUCCESS [0.666s]
[INFO] Apache Hadoop MapReduce ........................... FAILURE [0.515s]
[INFO] Apache Hadoop MapReduce Streaming ................. SUCCESS [0.657s]
[INFO] Apache Hadoop Distributed Copy .................... SUCCESS [2.721s]
[INFO] Apache Hadoop Archives ............................ SUCCESS [0.972s]
[INFO] Apache Hadoop Archive Logs ........................ SUCCESS [0.393s]
[INFO] Apache Hadoop Rumen ............................... SUCCESS [0.554s]
[INFO] Apache Hadoop Gridmix ............................. SUCCESS [0.620s]
[INFO] Apache Hadoop Data Join ........................... SUCCESS [0.264s]
[INFO] Apache Hadoop Extras .............................. SUCCESS [0.304s]
[INFO] Apache Hadoop Pipes ............................... SUCCESS [2.345s]
[INFO] Apache Hadoop OpenStack support ................... SUCCESS [0.336s]
[INFO] Apache Hadoop Amazon Web Services support ......... SUCCESS [0.645s]
[INFO] Apache Hadoop Azure support ....................... SUCCESS [0.622s]
[INFO] Apache Hadoop Client .............................. SUCCESS [3.436s]
[INFO] Apache Hadoop Mini-Cluster ........................ SUCCESS [0.432s]
[INFO] Apache Hadoop Scheduler Load Simulator ............ SUCCESS [1.044s]
[INFO] Apache Hadoop Azure Data Lake support ............. SUCCESS [0.674s]
[INFO] Apache Hadoop Tools Dist .......................... SUCCESS [4.542s]
[INFO] Apache Hadoop Kafka Library support ............... SUCCESS [0.188s]
[INFO] Apache Hadoop Tools ............................... SUCCESS [0.015s]
[INFO] Apache Hadoop Distribution ........................ SUCCESS [18.374s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2:58.223s
[INFO] Finished at: Tue Nov 01 17:10:11 BRST 2016
[INFO] Final Memory: 250M/629M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.hadoop:hadoop-maven-plugins:3.0.0-alpha1:cmake-compile (cmake-compile) on project hadoop-ma
preduce-client-nativetask: make failed with error code 2 -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.hadoop:hadoop-maven-plugins:3.0.0-alpha1:cm
ake-compile (cmake-compile) on project hadoop-mapreduce-client-nativetask: make failed with error code 2
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.apache.maven.plugin.MojoExecutionException: make failed with error code 2
at org.apache.hadoop.maven.plugin.cmakebuilder.CompileMojo.runMake(CompileMojo.java:229)
at org.apache.hadoop.maven.plugin.cmakebuilder.CompileMojo.execute(CompileMojo.java:96)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
... 19 more
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.7:run (dist) on project hadoop-mapreduce: An Ant BuildE
xception has occured: exec returned: 1
[ERROR] around Ant part ...<exec failonerror="true" dir="/home/hadoop/mnt/hadoop-3.0.0-alpha1-src/hadoop-mapreduce-project/target" ex
ecutable="bash">... @ 10:125 in /home/hadoop/mnt/hadoop-3.0.0-alpha1-src/hadoop-mapreduce-project/target/antrun/build-main.xml
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.7:run (
dist) on project hadoop-mapreduce: An Ant BuildException has occured: exec returned: 1
around Ant part ...<exec failonerror="true" dir="/home/hadoop/mnt/hadoop-3.0.0-alpha1-src/hadoop-mapreduce-project/target" executable
="bash">... @ 10:125 in /home/hadoop/mnt/hadoop-3.0.0-alpha1-src/hadoop-mapreduce-project/target/antrun/build-main.xml
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.apache.maven.plugin.MojoExecutionException: An Ant BuildException has occured: exec returned: 1
around Ant part ...<exec failonerror="true" dir="/home/hadoop/mnt/hadoop-3.0.0-alpha1-src/hadoop-mapreduce-project/target" executable
="bash">... @ 10:125 in /home/hadoop/mnt/hadoop-3.0.0-alpha1-src/hadoop-mapreduce-project/target/antrun/build-main.xml
at org.apache.maven.plugin.antrun.AntRunMojo.execute(AntRunMojo.java:355)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
... 19 more
Caused by: /home/hadoop/mnt/hadoop-3.0.0-alpha1-src/hadoop-mapreduce-project/target/antrun/build-main.xml:10: exec returned: 1
at org.apache.tools.ant.taskdefs.ExecTask.runExecute(ExecTask.java:646)
at org.apache.tools.ant.taskdefs.ExecTask.runExec(ExecTask.java:672)
at org.apache.tools.ant.taskdefs.ExecTask.execute(ExecTask.java:498)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
at sun.reflect.GeneratedMethodAccessor23.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:390)
at org.apache.tools.ant.Target.performTasks(Target.java:411)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
at org.apache.maven.plugin.antrun.AntRunMojo.execute(AntRunMojo.java:327)
... 21 more
[ERROR]
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :hadoop-mapreduce-client-nativetask