Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmake compilation issue #7233

Closed
seoz opened this issue Jul 5, 2016 · 4 comments
Closed

cmake compilation issue #7233

seoz opened this issue Jul 5, 2016 · 4 comments

Comments

@seoz
Copy link

seoz commented Jul 5, 2016

Hi,

I tried to build grpc using cmake and got the following error.
Why don't we build gmock from third_party/googletest?
I attached log files, so PTAL.

$ cmake ..
-- The C compiler identification is GNU 4.8.4
-- The CXX compiler identification is GNU 4.8.4
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Perl: /usr/bin/perl (found version "5.18.2")
-- The ASM compiler identification is GNU
-- Found assembler: /usr/bin/cc
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version "1.2.8")
CMake Error at third_party/protobuf/cmake/tests.cmake:2 (message):
Cannot find gmock directory.
Call Stack (most recent call first):
third_party/protobuf/cmake/CMakeLists.txt:150 (include)

-- Configuring incomplete, errors occurred!
See also "/home/seoz/grpc/build/CMakeFiles/CMakeOutput.log".
See also "/home/seoz/grpc/build/CMakeFiles/CMakeError.log".

CMakeError.log.txt
CMakeOutput.log.txt

Thanks,
Daniel

@seoz
Copy link
Author

seoz commented Jul 5, 2016

Ping @tberghammer

@ericjang
Copy link

ericjang commented Jul 6, 2016

I had a similar problem (cannot find gmock directory) while attempting to compile third_party/protobuf https://github.com/grpc/grpc/blob/master/vsprojects/README.md via CMake, on Windows.

tberghammer pushed a commit to tberghammer/grpc that referenced this issue Jul 6, 2016
A full build of protobuf depends on gmock even though it is not part of
a standrad checkout. This CL explicitly disable the build of the
protobuf tests to get rid of this dependency.

If somebody want to build the protobuf tests then they have to download
gmock to the protobuf directory and specify -Dprotobuf_BUILD_TESTS=ON
to the cmake command line.

Fixes grpc#7233
@tberghammer
Copy link

I created a pull request for fixing this issue (#7235).

Until it is merged there are a few possible workaround (any of them should work):

@seoz
Copy link
Author

seoz commented Jul 8, 2016

Thanks, I will try it with your workaround OR by manually merging your patch.

tengyifei pushed a commit to tengyifei/grpc that referenced this issue Jul 12, 2016
A full build of protobuf depends on gmock even though it is not part of
a standrad checkout. This CL explicitly disable the build of the
protobuf tests to get rid of this dependency.

If somebody want to build the protobuf tests then they have to download
gmock to the protobuf directory and specify -Dprotobuf_BUILD_TESTS=ON
to the cmake command line.

Fixes grpc#7233
@lock lock bot locked as resolved and limited conversation to collaborators Oct 3, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants