Hadoop build Failing in Windows: zconf.h is missing from native.sln?

后端 未结 1 366
有刺的猬
有刺的猬 2021-01-17 00:51

I\'m trying to build the following hadoop version on development computer with Windows 10 Home Edition

hadoop-2.7.3-src

Here are the details about my local d

相关标签:
1条回答
  • 2021-01-17 01:20

    So there were quite a few steps I had to take in order to resolve the problems.

    Within the ....\hadoop-2.7.3-src\hadoop-common-project\hadoop-common\src\main\winutils directory, I opened up the following solution in Visual Studio 2015:

    winutils.sln

    Within .....\hadoop-2.7.3-src\hadoop-common-project\hadoop-common\src\main\winutils\libwinutils.c , I commented out the following line of code, and made a modified copy of it as shown below:

    //const WCHAR* wsceConfigRelativePath = WIDEN_STRING(STRINGIFY(WSCE_CONFIG_DIR)) L"\\" WIDEN_STRING(STRINGIFY(WSCE_CONFIG_FILE));
    
    const WCHAR* wsceConfigRelativePath = WIDEN_STRING("../etc/hadoop") L"\\" WIDEN_STRING("wsce-site.xml");
    

    Also, In the winutils solution's property window, I had to set the platform value to x64 as the screenshot below shows:

    Next, I opened Dos command prompt, and checked the exact version of my Windows OS:

    ver

    Microsoft Windows [Version 10.0.14393]

    Also, I opened up the property window of the libwinutils project, and ensured that properties that are marked in the following snapshot had the proper values:

    Also, I took the same steps for the properties of the winutils project:

    (Sorry, stackoverflow would not allow me to place another picture snapshot, but all you basically have to do is make sure the the winutils project's property are set properly )

    I downloaded zlib version 1.2.11 source code. Using Developer Command Prompt for VS2015 ( Visual Studio 2015 ) I built zlib from zlib version 1.2.11 source code using cmake

    c:\zlib\zlib-1.2.11>cmake  -G "Visual Studio 14 2015" -A x64 c:\zlib\zlib-1.2.11\
    -- The C compiler identification is MSVC 19.0.24215.1
    -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.exe
    -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.exe -- works
    -- Detecting C compiler ABI info
    -- Detecting C compiler ABI info - done
    -- Looking for sys/types.h
    -- Looking for sys/types.h - found
    -- Looking for stdint.h
    -- Looking for stdint.h - found
    -- Looking for stddef.h
    -- Looking for stddef.h - found
    -- Check size of off64_t
    -- Check size of off64_t - failed
    -- Looking for fseeko
    -- Looking for fseeko - not found
    -- Looking for unistd.h
    -- Looking for unistd.h - not found
    -- Configuring done
    -- Generating done
    -- Build files have been written to: C:/zlib/zlib-1.2.11
    

    Finally, run the build with cmake

    c:\zlib\zlib-1.2.11>cmake --build .
    

    In Windows System Variables I have the following variable defined:

    ZLIB_HOME is set to C:\zlib\zlib-1.2.11

    0 讨论(0)
提交回复
热议问题