gpt4 book ai didi

hadoop - 无法在Windows 7 64位中构建hadoop v2.7.1,出现错误:C编译器标识未知,CXX编译器标识未知

转载 作者:行者123 更新时间:2023-12-02 21:08:52 25 4
gpt4 key购买 nike

在Windows 7 64位中,我尝试按照线程中的描述构建hadoop版本2.7.1:Apache Hadoop 2.7.1 binary for Windows 64-bit platform

我安装了所有必需的软件,对于c编译器,我使用Windows sdk 7.1的c++编译器(未安装Visual Studio 2010)

我从Windows SDK 7.1命令提示符(版本x64)运行以下命令:

    mvn package -Pdist,native-win -DskipTests -Dtar

但是构建失败并出现错误
     The C compiler identification is unknown
-- The CXX compiler identification is unknown
CMake Error in CMakeLists.txt:
No CMAKE_C_COMPILER could be found.


CMake Error in CMakeLists.txt:
No CMAKE_CXX_COMPILER could be found.

命令提示符的主要设置是:
    APPVER=6.1
CL=/AI C:\Windows\Microsoft.NET\Framework64\v4.0.30319
CommandPromptType=Native
CURRENT_CPU=x64
FrameworkVersion=v4.0.30319
platform=x64
PlatformToolset=Windows7.1SDK
PROCESSOR_ARCHITECTURE=AMD64
sdkdir=C:\Program Files\Microsoft SDKs\Windows\v7.1\
SESSIONNAME=Console
TARGET_CPU=x64
TARGET_PLATFORM=WIN7
ToolsVersion=4.0
USERDOMAIN=WIN7X64
VS100COMNTOOLS=C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\Tools\
WindowsSDKDir=C:\Program Files\Microsoft SDKs\Windows\v7.1\
WindowsSDKVersionOverride=v7.1

以下是控制台输出:
    [INFO] ------------------------------------------------------------------------
[INFO] Building Apache Hadoop HDFS 2.7.1
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-enforcer-plugin:1.3.1:enforce (enforce-os) @ hadoop-hdfs ---
....
....

main:
[INFO] Executed tasks
[INFO]
[INFO] --- maven-antrun-plugin:1.7:run (make) @ hadoop-hdfs ---
[INFO] Executing tasks

main:
[exec] -- The C compiler identification is unknown
[exec] -- The CXX compiler identification is unknown
[exec] CMake Error in CMakeLists.txt:
[exec] No CMAKE_C_COMPILER could be found.
[exec]
[exec]
[exec]
[exec] CMake Error in CMakeLists.txt:
[exec] No CMAKE_CXX_COMPILER could be found.
[exec]
[exec]
[exec]
[exec] -- Configuring incomplete, errors occurred!
[exec] See also "E:/hadoop-2.7.1-src/hadoop-hdfs-project/hadoop-hdfs/target
/native/CMakeFiles/CMakeOutput.log".
[exec] See also "E:/hadoop-2.7.1-src/hadoop-hdfs-project/hadoop-hdfs/target
/native/CMakeFiles/CMakeError.log".
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Apache Hadoop Main ................................. SUCCESS [ 2.995 s]
[INFO] Apache Hadoop Project POM .......................... SUCCESS [ 4.477 s]
[INFO] Apache Hadoop Annotations .......................... SUCCESS [ 4.696 s]
[INFO] Apache Hadoop Assemblies ........................... SUCCESS [ 0.250 s]
[INFO] Apache Hadoop Project Dist POM ..................... SUCCESS [ 3.759 s]
[INFO] Apache Hadoop Maven Plugins ........................ SUCCESS [ 3.775 s]
[INFO] Apache Hadoop MiniKDC .............................. SUCCESS [ 3.354 s]
[INFO] Apache Hadoop Auth ................................. SUCCESS [ 4.056 s]
[INFO] Apache Hadoop Auth Examples ........................ SUCCESS [ 3.807 s]
[INFO] Apache Hadoop Common ............................... SUCCESS [02:09 min]
[INFO] Apache Hadoop NFS .................................. SUCCESS [ 12.776 s]
[INFO] Apache Hadoop KMS .................................. SUCCESS [ 15.304 s]
[INFO] Apache Hadoop Common Project ....................... SUCCESS [ 0.031 s]
[INFO] Apache Hadoop HDFS ................................. FAILURE [ 42.105 s]
[INFO] Apache Hadoop HttpFS ............................... SKIPPED
[INFO] Apache Hadoop HDFS BookKeeper Journal .............. SKIPPED
.....
.....


[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 03:55 min
[INFO] Finished at: 2016-12-03T14:30:39+02:00
[INFO] Final Memory: 83M/494M
[INFO] ------------------------------------------------------------------------
.....
....

我用谷歌搜索: The CXX compiler identification is unknown
但是我没有找到解决问题的办法

如何配置cmake或maven以避免此错误,并使用Windows SDK 7.1构建hadoop 2.7.1?

我需要安装Visual Studio 2010吗?

我错过了做什么?

最佳答案

生成失败是由于针对Windows 7的Microsoft Windows SDK的cmake版本3.7.1的中断支持问题引起的。

我使用了cmake-3.6.3-win64-x64并且构建成功,请查看屏幕截图:

enter image description here

我在3.7.1 broke support for Microsoft Windows SDK for Windows 7 发布了问题#16483

Cmake问题计划在Cmake版本3.7.2中解决。

我使用了以下软件工具:

  • apache-maven-3.3.9
  • cmake-3.6.3-win64-x64
  • cygwin64
  • jdk1.7.0_79
  • protoc-2.5.0-win32
  • 关于hadoop - 无法在Windows 7 64位中构建hadoop v2.7.1,出现错误:C编译器标识未知,CXX编译器标识未知,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40948617/

    25 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com