0

Since hadoop 2.6.0 package doesn't contain Windows binaries, I'm trying to build them myself using Windows 7 64 bits, Java 8, Windows SDK 7.1, Apache Maven 3.3.1 and Visual Studio 2013. I'm following these instructions:

Hadoop Windows Install Intructions

After executing this command on the Windows SDK 7.1 Command Prompt:

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

I keep getting the following error:

LINK : fatal error LNK1123: failure during conversion to COFF: file invalid orcorrupt [E:\build\hadoop-common-project\hadoop-common\src\main\winutils\winutils.vcxproj]

....

[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2:exec (compile-ms-winutils) on project hadoop-common: Command execution failed. Process exited with an error: 1(Exit value: 1) -> [Help 1]

I've tried the different solutions suggested in other threads, with unsuccesful results:

Remove .Net Framework 4.5 and install version 4

Replacing cvtres.exe

Can anyone help me with this?

It will also be helpful if you can provide Windows binaries taking into account my PC configuration (Hadoop 2.6.0, Windows 7 64 bits and Java 8).

Thanks!

Community
  • 1
  • 1
  • I used this tutorial for my Windows 8 x64, Windows SDK 7.1, jdk1.6.0_45 with success http://www.srccodes.com/p/article/38/build-install-configure-run-apache-hadoop-2.2.0-microsoft-windows-os%22 – Yuliia Ashomok May 06 '15 at 14:48
  • 1
    Thanks for the link, those are the steps I am following in order to build the binaries. I've finally solved the error by completely removing Visual Studio. – marcos perez May 06 '15 at 15:34

1 Answers1

0

This is known Visual Studio 2012 issue described here.

This MSDN thread explains how to fix it.

To summarize:

  • Either disable incremental linking, by going to

    Project Properties 
       -> Configuration Properties 
           -> Linker (General) 
              -> Enable Incremental Linking -> "No (/INCREMENTAL:NO)"
    
  • or install VS2010 SP1.


Open file BUILDING.txt which located in unzipped hadoop-2.6.0-src.tar.gz or your version.
It says you how to build for Windows - check all of this:

My BUILDING.txt says:

Building on Windows
Requirements:

* Windows System
* JDK 1.6+
* Maven 3.0 or later
* Findbugs 1.3.9 (if running findbugs)
* ProtocolBuffer 2.5.0
* CMake 2.6 or newer
* Windows SDK or Visual Studio 2010 Professional
* Unix command-line tools from GnuWin32 or Cygwin: sh, mkdir, rm, cp, tar, gzip
* zlib headers (if building native code bindings for zlib)
* Internet connection for first build (to fetch all Maven and Hadoop dependencies)

If using Visual Studio, it must be Visual Studio 2010 Professional (not 2012).
Do not use Visual Studio Express.  It does not support compiling for 64-bit,
which is problematic if running a 64-bit system.  The Windows SDK is free to
download here:

http://www.microsoft.com/en-us/download/details.aspx?id=8279    
Community
  • 1
  • 1
Yuliia Ashomok
  • 8,336
  • 2
  • 60
  • 69