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

Kiran Kumar M R commented on HADOOP-9922:
-----------------------------------------

I have been compiling and using Hadoop on both Winx64 and Win32 from past few 
months.
Following are some inputs from my side.

1. Win 7 SDK is no longer supported from Microsoft. After installing some 
updates ( NET 4.5.1 SDK or Windows Update kb2455033) , it stopped working and 
got following error during compilation {code} fatal error C1083: Cannot open 
include file: 'ammintrin.h': No such file or directory' {code}

Microsoft has no solution for this. See the first comment in this link 
https://connect.microsoft.com/VisualStudio/feedback/details/660584/windows-update-kb2455033-breaks-build-with-missing-ammintrin-h
 They recommend using VC++ 2010 SP1 or later compilers like 2012 Express or 
2013 Express. There is no fix for Win7 SDK, which many people may be using.

So to compile x64 build, I used VS 2013 Express and Win8.1 SDK. This needs 
upgrading .sln and .vcxproj files.
I have documented my compilation steps here 
http://zutai.blogspot.com/2014/06/build-install-and-run-hadoop-24-240-on.html?showComment=1422091525887#c2264594416650430988

2. For Win32 build using VS2013, I ended up modifying some C++ code to overcome 
these errors in HDFS
{code}
[exec] thread_local_storage.obj : error LNK2001: unresolved external symbol 
_tls_used 
[D:\h\hadoop-2.6.0-src\hadoop-hdfs-project\hadoop-hdfs\target\native\hdfs.vcxproj]
[exec] thread_local_storage.obj : error LNK2001: unresolved external symbol 
pTlsCallback 
[D:\h\hadoop-2.6.0-src\hadoop-hdfs-project\hadoop-hdfs\target\native\hdfs.vcxproj]

Error   1       error C2440: 'function' : cannot convert from 'DWORD (__cdecl 
*)(LPVOID)' to 'LPTHREAD_START_ROUTINE'   
D:\hadoop-git\hadoop-hdfs-project\hadoop-hdfs\src\main\native\libhdfs\os\windows\thread.c
 
{code}

Issue HDFS-7774 has been logged by others also for similar error. I had 
attached a temp workaround patch there.

3. I also see issue HADOOP-11080 to convert hadoop-common to use cmake

Overall I think, following changes may be needed:
- Parametrize Win32/X64 and VC++ version also ( I think CMake can autodetect)
- Use CMake for both hadoop-common and hdfs. Let it generate proper build files 
based on VC+ version and x64/Win32
- Files that are modified in HDFS-7774 needs to be properly changed to compile 
on both x64/Win32








> hadoop windows native build will fail in 32 bit machine
> -------------------------------------------------------
>
>                 Key: HADOOP-9922
>                 URL: https://issues.apache.org/jira/browse/HADOOP-9922
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: build, native
>    Affects Versions: 3.0.0, 2.1.1-beta
>            Reporter: Vinayakumar B
>            Assignee: Vinayakumar B
>         Attachments: HADOOP-9922.patch
>
>
> Building Hadoop in windows 32 bit machine fails as native project is not 
> having Win32 configuration



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

Reply via email to