[ 
https://issues.apache.org/jira/browse/HADOOP-11425?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14251575#comment-14251575
 ] 

Manoj Kumar jain commented on HADOOP-11425:
-------------------------------------------

Well, It will not compile on Win32 platform, the targets are missing. See
below the winutils.sln. All targets are "Release|x64".
I am building on command line only.
The problem exists on version 2.2.0 and 2.6.0 and may be on other versions
also.

BTW if you build setting Platform=x64 (Possibly the build may be
successful, but it will not run on win32 platform)


on version 2.6.0 "lz4hc.c" file is not included in
<ClCompile Include="src\org\apache\hadoop\io\compress\lz4\lz4hc.c" />

It gives linker error " __LZ4_compressHC__ symbol not found

I am not sure how you build is working without these changes, as I am
consistantly getting these error and got fixed by manually changing it.

So to reproduce the issue


So if you set env as
setenv /x86
set TARGET_CPU=x86
set Platform=Win32
set HADOOP_PROTOC_PATH=C:\HDRIVE\Hadoop-2.6.0\Protoc\protoc

mvn clean package -Pdist,native-win -DskipTests


The problem will be

Build FAILED.

"C:\HDRIVE\Hadoop-2.6.0\hadoop-2.6.0-src\hadoop-common-project\hadoop-common\src\main\winutils\winutils.sln"
(default target) (1) -> (ValidateSolutionConfiguration target) ->

C:\HDRIVE\Hadoop-2.6.0\hadoop-2.6.0-src\hadoop-common-project\hadoop-common\src\main\winutils\winutils.sln.metaproj
: error MSB4126: The specified solution configuration "Release|Win32" is
invalid. Please specify a valid solution configuration using the
Configuration and Platform properties (e.g. MSBuild.exe Solution.sln
/p:Configuration=Debug /p:Platform="Any CPU") or leave those properties
blank to use the default solution configuration.
[C:\HDRIVE\Hadoop-2.6.0\hadoop-2.6
.0-src\hadoop-common-project\hadoop-common\src\main\winutils\winutils.sln]

    0 Warning(s)
    1 Error(s)




Here you can see winutils.sln : It doesn't have target "Release|Win32"

Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "winutils",
"winutils.vcxproj", "{D94B3BD7-39CC-47A0-AE9A-353FDE506F33}"
ProjectSection(ProjectDependencies) = postProject
{12131AA7-902E-4A6D-9CE3-043261D22A12} =
{12131AA7-902E-4A6D-9CE3-043261D22A12}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libwinutils",
"libwinutils.vcxproj", "{12131AA7-902E-4A6D-9CE3-043261D22A12}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{D94B3BD7-39CC-47A0-AE9A-353FDE506F33}.Debug|x64.ActiveCfg = Release|x64
{D94B3BD7-39CC-47A0-AE9A-353FDE506F33}.Debug|x64.Build.0 = Release|x64
{D94B3BD7-39CC-47A0-AE9A-353FDE506F33}.Release|x64.ActiveCfg = Release|x64
{D94B3BD7-39CC-47A0-AE9A-353FDE506F33}.Release|x64.Build.0 = Release|x64
{12131AA7-902E-4A6D-9CE3-043261D22A12}.Debug|x64.ActiveCfg = Release|x64
{12131AA7-902E-4A6D-9CE3-043261D22A12}.Debug|x64.Build.0 = Release|x64
{12131AA7-902E-4A6D-9CE3-043261D22A12}.Release|x64.ActiveCfg = Release|x64
{12131AA7-902E-4A6D-9CE3-043261D22A12}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal



On Thu, Dec 18, 2014 at 4:17 PM, Steve Loughran (JIRA) <[email protected]>


> Compilation failed on Windows WIN32 platform
> --------------------------------------------
>
>                 Key: HADOOP-11425
>                 URL: https://issues.apache.org/jira/browse/HADOOP-11425
>             Project: Hadoop Common
>          Issue Type: Bug
>    Affects Versions: 2.2.0, 2.6.0
>         Environment: HDFS on Linux
> Client on Windows 7 (Win32)
>            Reporter: Manoj Kumar jain
>              Labels: Native,, Windows
>   Original Estimate: 72h
>  Remaining Estimate: 72h
>
> Past few days, I am struggling with running my Hadoop application from 
> windows client. and. I started with latest stable build  2.6.0. Installed  
> HDFS on Linux.
> My application is running on Windows  which submits mapreduce jobs remotely. 
> By default we don’t have windows distribution for Hadoop, So I need to build 
> Hadoop on  win32 platform. This turns out the non-trivial tasks as there are 
> so many issue with windows build on both 2.6.0 and 2.2.0. By default Win32 
> support is not there. 
> I am sharing my efforts, so that It can be used by others struggling with 
> same issue.
> By default the targets to build on Windows platforms are missing in Hadoop 
> 2.6.0 and 2.2.0 and other release.
> So modify 
> modify native.sln and native.vcproj (Add targets for win32)
> modify libwinutils.vcproj,  winutils.sln and winutils.vcproj (Add targets for 
> win32)
> Sample for *.sln modification
> 353FDE506F33}.Release|Win32.ActiveCfg = Release|Win32
>               {D94B3BD7-39CC-47A0-AE9A-353FDE506F33}.Release|Win32.Build.0 = 
> Release|Win32
>               {12131AA7-902E-4A6D-9CE3-043261D22A12}.Release|Win32.ActiveCfg 
> = Release|Win32
>               {12131AA7-902E-4A6D-9CE3-043261D22A12}.Release|Win32.Build.0 = 
> Release|Win32
> Sample for *.vcproj modification - modify properties with Win32  platform 
> conditional conf. 
>   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" 
> Label="Configuration">
> Critical Issue - In native.vcproj the following file is not compiled.
> This gives linker error.
>     <ClCompile Include="src\org\apache\hadoop\io\compress\lz4\lz4hc.c" />
> We also need to document to setup the build environment for windows. As there 
> are several issues  creating Windows dev setup for Hadoop. May be we need to 
> documents the steps.
> Steps to set up you windows build environment-
> 1.    Download and install Microsoft Windows SDK v7.1. From link 
> http://www.microsoft.com/en-in/download/details.aspx?id=8279. Please follow 
> the guidelines provided.  You may have to uninstall .Net 4.5 before 
> installing SDK version 7.x
> 2.    You may get following error File Microsoft.Cpp.props  not found,  Patch 
> SDK.  Visual C++ 2010 SP1 Compiler Update for the Windows SDK 7.1. Download 
> from link  http://www.microsoft.com/en-in/download/details.aspx?id=4422
> 3.    You may also get following fatal error C1083: Cannot open include file: 
> 'ammintrin.h': No such file or directory.  This is mIcrosoft SDK bug. Get a 
> patch to download ammintrin.h from 
> https://connect.microsoft.com/VisualStudio/feedback/details/660584/
> 4.    Now your Windows environment is ready to build. Hope there is no other 
> errors reported on your system.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to