Please refer to hadoop-2.7.0-src\BUILDING.txt and install all the required components.1. install jdk1.7.0_25 and configure the JAVA_HOME and PATH, CLASSPATH, install apache-maven-3.3.3 and config MAVEN_HOME and also the PATHuse java -version, javac -version, mvn -version to validate the installation.
2. install windows sdk with the following URL : http://www.microsoft.com/en-us/download/details.aspx?id=8279
Windows SDK 7.1 Command Prompt will appear
3. download and install windows git package Git-1.9.5-preview20150319.exe from site http://git-scm.com/download/win,and add C:\Program Files (x86)\Git\bin to the path so that shell command(shell command in pom.xml) can be used.
4. download and install protoc-2.5.0-win32.zip, place in system32 folder or added to the path.
use command protoc --version to test
5.download cmake and install http://www.cmake.org/download/
cmake -version
6. get hadoop source hadoop 2.7.0 and open Windows SDK 7.1 Command Prompt and build hadoop with the following command
set Platform=x64
cd C:\hadoop\hadoop-2.7.0-src
mvn package -Pdist,native-win -DskipTests -Dtar
The following are the files I have listed which need to install, some of them is for resolving issues of hadoop maven build and if you are not facing them, you can ignore.hadoop-2.7.0-src.tar.gz --->required
Git-1.9.5-preview20150319.exe --->requiredapache-maven-3.3.3 --->requiredcmake-3.2.2-win32-x86.exe --->requiredwinsdk_web.exe --->requiredprotoc-2.5.0-win32.zip --->requiredhadoop-2.7.0-src --->requiredVC-Compiler-KB2519277.exe -----> sp1
ammintrin.h
MicrosoftFixit.ProgramInstallUninstall.RNP.6635582324812150.4.1.Run.exe ------> tool to uninstall the newer version of visual c++ if it exists
The following are the issues encountered when I compile Hadoop 2.7.0
Installation Blockers:
A newer version of Microsoft Visual C++ 2010 Redistributable has been detected on the machine.
Final Result: Installation failed with error code: (0x000013EC), "A StopBlock was hit or a System Requirement was not met." (Elapsed time: 0 00:00:01).Please refer to the link(http://stackoverflow.com/questions/19366006/error-when-installing-windows-sdk-7-1
) when errors are found. Try to uninstall the newer version first. It does have a newer version in my laptop,but I could not find it in windows uninstaller, but this tool (
http://support.microsoft.com/mats/Program_Install_and_Uninstall
)can.
LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or c
orrupt [D:\hadoop\hadoop-2.7.0-src\hadoop-common-project\hadoop-common\src\main\
winutils\winutils.vcxproj]
Answer:
download and install Microsoft Visual C++ 2010 Service Pack 1 Compiler Update for the Windows SDK 7.1
https://www.microsoft.com/en-us/download/details.aspx?id=4422
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 [D:\hadoop\hadoop-2.7.0-src\hadoop-common-project\hadoop-common\src\main\native\native.vcxproj] 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 [D:\hadoop\hadoop-2.7.0-src\hadoop-common-project\hadoop-common\src\main\native\native.vcxproj] 1 Warning(s) 2 Error(s)download file ammintrin.h from the internet and place it in folder C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include