更新-2 我已经更新了Windows SDK编译器,现在已将错误减少到2。
c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\intrin.h(26): fatal error C1083: Cannot open include file: 'ammintrin.h': No such file or directory [C:\hadoop-2.7.0-src\hadoop-common-project\hadoop-common\src\main\native\native.vcxproj]
现在在哪里搜索过,我发现要获取这个.h文件我需要安装Microsoft Visual Studio Service Pack 1.我没有Visual Studio,我使用的是Windows SDK 7.1。现在,我在哪里可以找到适用于Windows SDK 7.1的等效Service Pack 1?
更新-2结束
更新
在盯着堆栈跟踪一段时间后,我发现错误发生在这里
Midl:
C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\midl.exe /W2 /WX /nologo /char signed /env x64 /Oicf /app_config /out"C:\hadoop-2.7.0-src\hadoop-common-project\hadoop-common\target/winutils/" /h "hadoopwinutilsvc_h.h" /tlb "C:\hadoop-2.7.0-src\hadoop-common-project\hadoop-common\target/winutils/libwinutils.tlb" /robust hadoopwinutilsvc.idl
TRACKER : error TRK0002: Failed to execute command: ""C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\midl.exe" /W2 /WX /nologo /char signed /env x64 /Oicf /app_config /outC:\hadoop-2.7.0-src\hadoop-common-project\hadoop-common\target/winutils/ /h hadoopwinutilsvc_h.h /tlb C:\hadoop-2.7.0-src\hadoop-common-project\hadoop-common\target/winutils/libwinutils.tlb /robust hadoopwinutilsvc.idl". The handle is invalid. [C:\hadoop-2.7.0-src\hadoop-common-project\hadoop-common\src\main\winutils\libwinutils.vcxproj]
所以,我试图只运行这个命令
"C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\midl.exe" /W2 /WX /nologo /char signed /env x64 /Oicf /app_config /outC:\hadoop-2.7.0-src\hadoop-common-project\hadoop-common\target/winutils/ /h hadoopwinutilsvc_h.h /tlb C:\hadoop-2.7.0-src\hadoop-common-project\hadoop-common\target/winutils/libwinutils.tlb /robust hadoopwinutilsvc.idl"
现在我收到以下错误
64 bit Processing .\hadoopwinutilsvc.idl
hadoopwinutilsvc.idl
midl : command line error MIDL1001 : cannot open input file oaidl.idl
当我搜索文件oaidl.ild时。我在文件夹
中找到了它C:\Program Files\Microsoft SDKs\Windows\v7.1\Include
我将其包含在PATH中并再次运行命令并出现相同的错误。我注意到文件名是'OAIdl.Idl'而不是'oaidl.idl'。
文件hadoopwinutilsvc.idl的第一行是'include oaidl.idl'。
这是否意味着这些是hadoop来源中的错误?
END UPDATE - 以下原始问题。
我正在尝试在Windows 7 x64上构建hadoop
我一直收到以下错误
我在下面提供了相关的堆栈跟踪。任何帮助将不胜感激。
我在命令提示符下运行的命令是mvn package -Pdist,native-win -DskipTests -Dtar
[DEBUG] env: PATH=C:\csvn\bin\;C:\csvn\Python25\;C:\Program Files\CollabNet\Subversion Client;C:\Windows\system32;C:\Windows;C:\Windows\system32\wbem;C:\Windows\system32\windowspowershell\v1.0\;c:\program files\ibm\gsk8\lib64;c:\program files (x86)\ibm\gsk8\lib;C:\IBM\WEBSPH~1\APPSER~1\db2\BIN;C:\IBM\WEBSPH~1\APPSER~1\db2\FUNCTION;C:\IBM\WEBSPH~1\APPSER~1\db2\SAMPLES\REPL;C:\Program Files\nodejs\;%JAVA_HOME%\bin;C:\Program Files (x86)\Skype\Phone\;C:\Program Files (x86)\CMake\bin;C:\Program Files (x86)\Git\cmd;C:\Program Files\Microsoft Windows Performance Toolkit\;C:\Users\ajayamrite\AppData\Roaming\npm;C:\apache-maven-3.3.3/bin;C:\cygwin64\bin;C:\protoc-2.5.0-win32;C:\Windows\Microsoft.NET\Framework64\v4.0.30319;C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin;C:\hadoop\bin;c:\hadoop\sbin;C:\Program Files (x86)\CMake\bin;C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\x86_amd64
[DEBUG] env: PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
[DEBUG] env: PLATFORM=x64
[DEBUG] env: PROCESSOR_ARCHITECTURE=AMD64
[DEBUG] env: PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 70 Stepping 1, GenuineIntel
[DEBUG] env: PROCESSOR_LEVEL=6
[DEBUG] env: PROCESSOR_REVISION=4601
[DEBUG] env: PROGRAMDATA=C:\ProgramData
[DEBUG] env: PROGRAMFILES=C:\Program Files
[DEBUG] env: PROGRAMFILES(X86)=C:\Program Files (x86)
[DEBUG] env: PROGRAMW6432=C:\Program Files
[DEBUG] env: PROMPT=$P$G
[DEBUG] env: PSMODULEPATH=C:\Windows\system32\WindowsPowerShell\v1.0\Modules\
[DEBUG] env: PUBLIC=C:\Users\Public
[DEBUG] env: PYTHONHOME=C:\csvn\Python25\
[DEBUG] env: SESSIONNAME=Console
[DEBUG] env: SYSTEMDRIVE=C:
[DEBUG] env: SYSTEMROOT=C:\Windows
[DEBUG] env: TEMP=C:\Users\AJAYAM~1\AppData\Local\Temp
[DEBUG] env: TMP=C:\Users\AJAYAM~1\AppData\Local\Temp
[DEBUG] env: USERDOMAIN=bedouinvm
[DEBUG] env: USERNAME=ajayamrite
[DEBUG] env: USERPROFILE=C:\Users\ajayamrite
[DEBUG] env: WDIR=C:\
[DEBUG] env: WINDIR=C:\Windows
[DEBUG] env: ZLIB_HOME=C:\zlib127-dll
[DEBUG] Executing command line: [msbuild, C:\hadoop-2.7.0-src\hadoop-common-project\hadoop-common/src/main/winutils/winutils.sln, /nologo, /p:Configuration=Release, /p:OutDir=C:\hadoop-2.7.0-src\hadoop-common-project\hadoop-common\target/bin/, /p:IntermediateOutputPath=C:\hadoop-2.7.0-src\hadoop-common-project\hadoop-common\target/winutils/, /p:WsceConfigDir=../etc/hadoop, /p:WsceConfigFile=wsce-site.xml]
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
Build started 5/27/2015 3:13:28 PM.
Project "C:\hadoop-2.7.0-src\hadoop-common-project\hadoop-common\src\main\winutils\winutils.sln" on node 1 (default targets).
ValidateSolutionConfiguration:
Building solution configuration "Release|x64".
Project "C:\hadoop-2.7.0-src\hadoop-common-project\hadoop-common\src\main\winutils\winutils.sln" (1) is building "C:\hadoop-2.7.0-src\hadoop-common-project\hadoop-common\src\main\winutils\winutils.vcxproj.metaproj" (2) on node 1 (default targets).
Project "C:\hadoop-2.7.0-src\hadoop-common-project\hadoop-common\src\main\winutils\winutils.vcxproj.metaproj" (2) is building "C:\hadoop-2.7.0-src\hadoop-common-project\hadoop-common\src\main\winutils\libwinutils.vcxproj" (3) on node 1 (default targets).
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets(297,5): warning MSB8003: Could not find WindowsSDKDir variable from the registry. TargetFrameworkVersion or PlatformToolset may be set to an invalid version number. [C:\hadoop-2.7.0-src\hadoop-common-project\hadoop-common\src\main\winutils\libwinutils.vcxproj]
InitializeBuildStatus:
Touching "C:\hadoop-2.7.0-src\hadoop-common-project\hadoop-common\target/winutils/libwinutils.unsuccessfulbuild".
Midl:
C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\midl.exe /W2 /WX /nologo /char signed /env x64 /Oicf /app_config /out"C:\hadoop-2.7.0-src\hadoop-common-project\hadoop-common\target/winutils/" /h "hadoopwinutilsvc_h.h" /tlb "C:\hadoop-2.7.0-src\hadoop-common-project\hadoop-common\target/winutils/libwinutils.tlb" /robust hadoopwinutilsvc.idl
TRACKER : error TRK0002: Failed to execute command: ""C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\midl.exe" /W2 /WX /nologo /char signed /env x64 /Oicf /app_config /outC:\hadoop-2.7.0-src\hadoop-common-project\hadoop-common\target/winutils/ /h hadoopwinutilsvc_h.h /tlb C:\hadoop-2.7.0-src\hadoop-common-project\hadoop-common\target/winutils/libwinutils.tlb /robust hadoopwinutilsvc.idl". The handle is invalid. [C:\hadoop-2.7.0-src\hadoop-common-project\hadoop-common\src\main\winutils\libwinutils.vcxproj]
Done Building Project "C:\hadoop-2.7.0-src\hadoop-common-project\hadoop-common\src\main\winutils\libwinutils.vcxproj" (default targets) -- FAILED.
Done Building Project "C:\hadoop-2.7.0-src\hadoop-common-project\hadoop-common\src\main\winutils\winutils.vcxproj.metaproj" (default targets) -- FAILED.
Done Building Project "C:\hadoop-2.7.0-src\hadoop-common-project\hadoop-common\src\main\winutils\winutils.sln" (default targets) -- FAILED.
Build FAILED.
"C:\hadoop-2.7.0-src\hadoop-common-project\hadoop-common\src\main\winutils\winutils.sln" (default target) (1) ->
"C:\hadoop-2.7.0-src\hadoop-common-project\hadoop-common\src\main\winutils\winutils.vcxproj.metaproj" (default target) (2) ->
"C:\hadoop-2.7.0-src\hadoop-common-project\hadoop-common\src\main\winutils\libwinutils.vcxproj" (default target) (3) ->
(PrepareForBuild target) ->
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets(297,5): warning MSB8003: Could not find WindowsSDKDir variable from the registry. TargetFrameworkVersion or PlatformToolset may be set to an invalid version number. [C:\hadoop-2.7.0-src\hadoop-common-project\hadoop-common\src\main\winutils\libwinutils.vcxproj]
"C:\hadoop-2.7.0-src\hadoop-common-project\hadoop-common\src\main\winutils\winutils.sln" (default target) (1) ->
"C:\hadoop-2.7.0-src\hadoop-common-project\hadoop-common\src\main\winutils\winutils.vcxproj.metaproj" (default target) (2) ->
"C:\hadoop-2.7.0-src\hadoop-common-project\hadoop-common\src\main\winutils\libwinutils.vcxproj" (default target) (3) ->
(Midl target) ->
TRACKER : error TRK0002: Failed to execute command: ""C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\midl.exe" /W2 /WX /nologo /char signed /env x64 /Oicf /app_config /outC:\hadoop-2.7.0-src\hadoop-common-project\hadoop-common\target/winutils/ /h hadoopwinutilsvc_h.h /tlb C:\hadoop-2.7.0-src\hadoop-common-project\hadoop-common\target/winutils/libwinutils.tlb /robust hadoopwinutilsvc.idl". The handle is invalid. [C:\hadoop-2.7.0-src\hadoop-common-project\hadoop-common\src\main\winutils\libwinutils.vcxproj]
1 Warning(s)
1 Error(s)
Time Elapsed 00:00:01.36
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Apache Hadoop Main ................................. SUCCESS [ 1.558 s]
[INFO] Apache Hadoop Project POM .......................... SUCCESS [ 1.334 s]
[INFO] Apache Hadoop Annotations .......................... SUCCESS [ 2.580 s]
[INFO] Apache Hadoop Assemblies ........................... SUCCESS [ 0.170 s]
[INFO] Apache Hadoop Project Dist POM ..................... SUCCESS [ 2.133 s]
[INFO] Apache Hadoop Maven Plugins ........................ SUCCESS [ 2.585 s]
[INFO] Apache Hadoop MiniKDC .............................. SUCCESS [ 2.008 s]
[INFO] Apache Hadoop Auth ................................. SUCCESS [ 3.022 s]
[INFO] Apache Hadoop Auth Examples ........................ SUCCESS [ 2.663 s]
[INFO] Apache Hadoop Common ............................... FAILURE [ 22.818 s]
[INFO] Apache Hadoop NFS .................................. SKIPPED
[INFO] Apache Hadoop KMS .................................. SKIPPED
[INFO] Apache Hadoop Common Project ....................... SKIPPED
[INFO] Apache Hadoop HDFS ................................. SKIPPED
[INFO] Apache Hadoop HttpFS ............................... SKIPPED
[INFO] Apache Hadoop HDFS BookKeeper Journal .............. SKIPPED
[INFO] Apache Hadoop HDFS-NFS ............................. SKIPPED
[INFO] Apache Hadoop HDFS Project ......................... SKIPPED
[INFO] hadoop-yarn ........................................ SKIPPED
[INFO] hadoop-yarn-api .................................... SKIPPED
[INFO] hadoop-yarn-common ................................. SKIPPED
[INFO] hadoop-yarn-server ................................. SKIPPED
[INFO] hadoop-yarn-server-common .......................... SKIPPED
[INFO] hadoop-yarn-server-nodemanager ..................... SKIPPED
[INFO] hadoop-yarn-server-web-proxy ....................... SKIPPED
[INFO] hadoop-yarn-server-applicationhistoryservice ....... SKIPPED
[INFO] hadoop-yarn-server-resourcemanager ................. SKIPPED
[INFO] hadoop-yarn-server-tests ........................... SKIPPED
[INFO] hadoop-yarn-client ................................. SKIPPED
[INFO] hadoop-yarn-server-sharedcachemanager .............. SKIPPED
[INFO] hadoop-yarn-applications ........................... SKIPPED
[INFO] hadoop-yarn-applications-distributedshell .......... SKIPPED
[INFO] hadoop-yarn-applications-unmanaged-am-launcher ..... SKIPPED
[INFO] hadoop-yarn-site ................................... SKIPPED
[INFO] hadoop-yarn-registry ............................... SKIPPED
[INFO] hadoop-yarn-project ................................ SKIPPED
[INFO] hadoop-mapreduce-client ............................ SKIPPED
[INFO] hadoop-mapreduce-client-core ....................... SKIPPED
[INFO] hadoop-mapreduce-client-common ..................... SKIPPED
[INFO] hadoop-mapreduce-client-shuffle .................... SKIPPED
[INFO] hadoop-mapreduce-client-app ........................ SKIPPED
[INFO] hadoop-mapreduce-client-hs ......................... SKIPPED
[INFO] hadoop-mapreduce-client-jobclient .................. SKIPPED
[INFO] hadoop-mapreduce-client-hs-plugins ................. SKIPPED
[INFO] Apache Hadoop MapReduce Examples ................... SKIPPED
[INFO] hadoop-mapreduce ................................... SKIPPED
[INFO] Apache Hadoop MapReduce Streaming .................. SKIPPED
[INFO] Apache Hadoop Distributed Copy ..................... SKIPPED
[INFO] Apache Hadoop Archives ............................. SKIPPED
[INFO] Apache Hadoop Rumen ................................ SKIPPED
[INFO] Apache Hadoop Gridmix .............................. SKIPPED
[INFO] Apache Hadoop Data Join ............................ SKIPPED
[INFO] Apache Hadoop Ant Tasks ............................ SKIPPED
[INFO] Apache Hadoop Extras ............................... SKIPPED
[INFO] Apache Hadoop Pipes ................................ SKIPPED
[INFO] Apache Hadoop OpenStack support .................... SKIPPED
[INFO] Apache Hadoop Amazon Web Services support .......... SKIPPED
[INFO] Apache Hadoop Azure support ........................ SKIPPED
[INFO] Apache Hadoop Client ............................... SKIPPED
[INFO] Apache Hadoop Mini-Cluster ......................... SKIPPED
[INFO] Apache Hadoop Scheduler Load Simulator ............. SKIPPED
[INFO] Apache Hadoop Tools Dist ........................... SKIPPED
[INFO] Apache Hadoop Tools ................................ SKIPPED
[INFO] Apache Hadoop Distribution ......................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 43.747 s
[INFO] Finished at: 2015-05-27T15:13:30+01:00
[INFO] Final Memory: 68M/306M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.3.1:exec (compile-ms-winutils) on project hadoop-common: Command execution failed. Process exited with an error: 1 (Exit value: 1) -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.3.1:exec (compile-ms-winutils) on project hadoop-common: Command execution failed.
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:216)
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:116)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:862)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:286)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:197)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.MojoExecutionException: Command execution failed.
at org.codehaus.mojo.exec.ExecMojo.execute(ExecMojo.java:303)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
... 20 more
Caused by: org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1)
at org.apache.commons.exec.DefaultExecutor.executeInternal(DefaultExecutor.java:402)
at org.apache.commons.exec.DefaultExecutor.execute(DefaultExecutor.java:164)
at org.codehaus.mojo.exec.ExecMojo.executeCommandLine(ExecMojo.java:750)
at org.codehaus.mojo.exec.ExecMojo.execute(ExecMojo.java:292)
... 22 more
[ERROR]
[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-common
答案 0 :(得分:7)
我也试图在Windows 7 x64上构建hadoop 2.7.1。
对于UPDATE-2的问题:
我已下载文件“ ammintrin.h ”并将其填入:“ C:\ Program Files(x86)\ Microsoft Visual Studio 10.0 \ VC \ include “(我没有Visual Studio,只安装了Windows SDK 7.1)
在没有安装Microsoft Visual Studio Service Pack 1的情况下,它对我有用。
这里有文件:http://www.mathworks.com/matlabcentral/answers/uploaded_files/735/ammintrin.m (请注意,您必须使用.h扩展名重命名)