jianrui
jianrui

Reputation: 151

CMake encounter an error while i build the Maven project

I tried to build the hadoop source code on my laptop(Windows 7), the Maven build job encountered an error. the detailed information as below:

     [exec] CMake Error at C:/Program Files/CMake/share/cmake-3.6/Modules/FindPa
ckageHandleStandardArgs.cmake:148 (message):
     [exec]   Could NOT fi-- Configuring incomplete, errors occurred!
     [exec] See also "C:/cygwin64/home/jding27/hadoop-2.7.1-src/hadoop-common-pr
oject/hadoop-cond ZLIB (missing: ZLIB_LIBRARY ZLIB_INCLUDE_DIR)
     [exec] Call Stack (most recent call first):
     [exec]   C:/Program Files/CMake/share/cmake-3.6mmon/target/native/CMakeFile
s/CMakeOutput.log".
     [exec] /Modules/FindPackageHandleStandardArgs.cmake:388 (_FPHSA_FAILURE_MES
SAGE)
     [exec]   C:/Program Files/CMake/share/cmake-3.6/Modules/FindZLIB.cmake:124
(FIND_PACKAGE_HANDLE_STANDARD_ARGS)
     [exec]   CMakeLists.txt:107 (find_package)
     [exec]
     [exec]
[INFO] ------------------------------------------------------------------------

I have already configured the Windows System Environment variables below: ZLIB_INCLUDE_DIR=C:\zlib128\include

ZLIB_LIBRARY=C:\zlib128\lib\zdll.lib

Upvotes: 1

Views: 355

Answers (1)

Florian
Florian

Reputation: 43030

Those errors are not referring to environment variables, but to CMake variables that it was not able to determine. If you have ZLib not in Program Files you have to tell CMake where to find it with ZLIB_ROOT. Call

cmake -D ZLIB_ROOT:PATH=C:\zlib128 ....

Reference

Upvotes: 1

Related Questions