ContinuumIO / libhdfs3-downstream

a native c/c++ hdfs client (downstream fork from apache-hawq)
Apache License 2.0
40 stars 54 forks source link

Fail to build with new package #7

Closed nihao closed 6 years ago

nihao commented 6 years ago

Hi , When I build the .so file from the source package, got below error:

CMake Error: The following variables are used in this project, but they are set to NOTFOUND. Please set them or make sure they are set and tested correctly in the CMake files: Gmock_LIBRARY linked by target "cmTryCompileExec2264974864" in directory /home/hz/thirdparty/hdfs3/libhdfs3-downstream/libhdfs3/build/CMakeFiles/CMakeTmp Gtest_LIBRARY linked by target "cmTryCompileExec2264974864" in directory /home/hz/thirdparty/hdfs3/libhdfs3-downstream/libhdfs3/build/CMakeFiles/CMakeTmp

CMake Error: Internal CMake error, TryCompile configure of cmake failed -- Performing Test GoogleTest_CHECK_FINE - Failed -- GoogleTest check: CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:108 (message): Could NOT find GoogleTest (missing: GTest_INCLUDE_DIR GMock_INCLUDE_DIR Gtest_LIBRARY Gmock_LIBRARY GoogleTest_CHECK_FINE) Call Stack (most recent call first): /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:315 (_FPHSA_FAILURE_MESSAGE) CMake/FindGoogleTest.cmake:52 (find_package_handle_standard_args) CMakeLists.txt:23 (FIND_PACKAGE)

And below is the operation list:

git clone https://github.com/ContinuumIO/libhdfs3-downstream.git
cd libhdfs3-downstream/libhdfs3
mkdir build
../bootstrap

please help to solve, thanks.

martindurant commented 6 years ago

To build the library in the standard way, you need gmock and google-test to be installed in the source directory (this is based on the HAWQ repo requirements). Or, you can do what is done for the feedstock and explicitly remove the requirements if you do not plan to run tests.

jarandaf commented 6 years ago

I did follow @martindurant advice and could make it work!

martindurant commented 6 years ago

Thanks for trying it out, @jarandaf . I'll close this as resolved.

jeffwji commented 6 years ago

This problem appears again, but now only GoogleTest_CHECK_FINE is missing. All libg*.a files has been copied over to /usr/local/lib folder already.

../bootstrap
-- checking compiler: GCC (4.8.)
-- adding c++0x support for gcc compiler
-- Checking whether strerror_r returns an int
-- Checking whether strerror_r returns an int -- no
-- Find GoogleTest include path: /usr/include
-- Find GoogleMock include path: /usr/include
-- Find Gtest library path: /usr/local/lib64/libgtest.a
-- Find Gmock library path: /usr/local/lib64/libgmock.a
-- GoogleTest check:
CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:108 (message):
  Could NOT find GoogleTest (missing: GoogleTest_CHECK_FINE)
Call Stack (most recent call first):
  /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:315 (_FPHSA_FAILURE_MESSAGE)
  CMake/FindGoogleTest.cmake:52 (find_package_handle_standard_args)
  CMakeLists.txt:23 (FIND_PACKAGE)
martindurant commented 6 years ago

I think make may insist that gmock and gtest are in the source tree, as is done for upstream HAWQ. Neither is needed to just build the library, so you could forgo them, is is done in the conda build.