由于https://github.com/kontext-tech/winutils还未发布3.3.6版本,因此尝试源码编译

环境安装包准备,见2

zlib编译

方法一:

zlibvs sln解决方案文件包含6个工程。其中:
(1). zlibvc生成动态链接库zlibwapi.dll对应导入库zlibwapi.lib
(2). zlibstat生成静态链接库zlibstat.lib
(3). testzlibdll测试生成的动态链接库zlibwapi.dll
(4). testzlib测试生成静态链接库zlibstat.lib

方法二:

VS命令行工具进入到zlib根目录执行 nmake -f win32/Makefile.msc ,在根目录生成:zlib.lib(静态库) zdll.lib(动态库的导入库) zlib1.dll(动态库)
zlib2

配置文件更改

1. maven阿里镜像

修改apache-maven-3.9.5路径confsettings.xml文件镜像mirrors节点使用阿里仓库添加如下代码

    <mirror&gt;
      <id&gt;aliyunmaven</id&gt;
      <mirrorOf&gt;*</mirrorOf&gt;
      <name&gt;阿里公共仓库</name&gt;
      <url&gt;https://maven.aliyun.com/repository/public</url>
    </mirror>

更改会很慢,亲测!!!

2. Node版本
[ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.11.2:yarn (yarn install) on project 
hadoop-yarn-applications-catalog-webapp: Failed to run task: 'yarn ' failed. 
org.apache.commons.exec.
ExecuteException: Process exited with an error: 1 (Exit value: 1) -> [Help 1]
3. 越过Javadoc检查
  1. pom.xml中禁用严格检查<additionalparam>-Xdoclint:none</additionalparam>
<plugins>
  <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-javadoc-plugin</artifactId>
    <configuration>
      <additionalparam>-Xdoclint:none</additionalparam>
    </configuration>
  </plugin>
</plugins>

特别是hadoop-3.3.6-srchadoop-common-projecthadoop-annotationspom.xml需要更改,否则会出现如下错误

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:3.0.1:jar (module-javadocs) on project hadoop-annotations: MavenReportException: Error while generating Javadoc:
  1. mvn命令构建时跳过 Javadoc
    mvn 其他参数 -Dmaven.javadoc.skip=true verify

编译Hadoop

Error,其他报错见3

  1. RelWithDebInfo does not exist
hadoop-hdfs-projecthadoop-hdfs-native-clienttargetnativebinRelWithDebInfo does not exist

错误是这个目录不存在,则在hadoop-hdfs-projecthadoop-hdfs-native-clienttargetnative手动创建这个目录,并根据提示在重新执行命令添加参数-rf :hadoop-hdfs-native-client,如下。
mvn package -Pdist,native-win -DskipTests -Dtar -Dmaven.javadoc.skip=true -rf :hadoop-hdfs-native-client

  1. hadoop-hdfs-native-client
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.x:run (make) on project hadoop-hdfs-native-client: An Ant BuildException has occured: exec returned: 1
[ERROR] around Ant part ...<exec failonerror="true" dir="hadoop路径hadoop-hdfs-projecthadoop-hdfs-native-clienttarget/native" executable="cmake">

修改hadoop-hdfs-projecthadoop-hdfs-native-clientpom.xml文件failonerror的值truefalse
failonerror


相关文章

  1. windows上编译hadoop
  2. Windows10 Hadoop3.3.0源码编译
  3. Hadoop 3.2.1 win10 64位系统 vs2015 编译
  4. Hadoop源码编译打包
  5. hadoop源码编译
  6. Windows 7 64bit和Visual Studio 2010下安装及使用Zlib 1.2.5
  7. VS2010 编译 Zlib库-1.2.11(zip解压库)
  8. Windows中zlib的安装与配置
  9. Unable to build Maven project due to Javadoc error?
  10. maven项目install时候一直报错,检查Maven-javadoc-plugin声明错误(Java 8 配置Maven-javadoc-plugin)或者警告: @throws没有说明

原文地址:https://blog.csdn.net/feishuoren/article/details/134684024

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。

如若转载,请注明出处:http://www.7code.cn/show_10621.html

如若内容造成侵权/违法违规/事实不符,请联系代码007邮箱suwngjj01@126.com进行投诉反馈,一经查实,立即删除

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注