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

Difficulty with FindWrapProtobuf.cmake #232

Open
gmabey opened this issue Jun 23, 2021 · 1 comment
Open

Difficulty with FindWrapProtobuf.cmake #232

gmabey opened this issue Jun 23, 2021 · 1 comment
Assignees
Labels
question Further information is requested

Comments

@gmabey
Copy link
Contributor

gmabey commented Jun 23, 2021

I'm attempting to build my application (and QtProtobuf) for CentOS 8.3 -- there's other platforms I've tried that have ended up with this same error, but I'm just focusing on CentOS 8.3 right now.

I had to install cmake 3.20.3 (just the binary tarball) and I compiled Qt 5.12.11 from source.

I got QtProtobuf to compile, but when I run cmake for my application, I get the following error:

-- The CXX compiler identification is GNU 8.3.1
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at /usr/local/cmake/share/cmake-3.20/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
  Could NOT find WrapProtobuf (missing: Protobuf_INCLUDE_DIRS Protobuf)
Call Stack (most recent call first):
  /usr/local/cmake/share/cmake-3.20/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
  /usr/lib64/cmake/QtProtobuf/FindWrapProtobuf.cmake:103 (find_package_handle_standard_args)
  /usr/local/cmake/share/cmake-3.20/Modules/CMakeFindDependencyMacro.cmake:47 (find_package)
  /usr/lib64/cmake/QtProtobuf/QtProtobufProtobufWellKnownTypesConfig.cmake:5 (find_dependency)
  /usr/lib64/cmake/QtProtobuf/QtProtobufConfig.cmake:20 (include)
  CMakeLists.txt:172 (find_package)


-- Configuring incomplete, errors occurred!

I've looked at /usr/lib64/cmake/QtProtobuf/FindWrapProtobuf.cmake but can't make any sense out of it.

To build QtProtobuf I've tried using OS-provided versions of protobuf as well as the submodule 3rdparty with identical results. I just don't understand what's going on in FindWrapProtobuf ...

My questions are:

  1. Do you think that QtProtobuf's .cmake files getting installed into /usr/lib/64/cmake/ is a problem?
  2. Is this possibly an issue arising from the version of cmake I'm using?
  3. What is the most recent version of cmake that has been used to build QtProtobuf?
@gmabey gmabey added the question Further information is requested label Jun 23, 2021
@semlanik
Copy link
Owner

Ok the error you observe causes that Protobuf_INCLUDE_DIRS variable is not set when QtProtobufWellKnownTypes is trying to resolve its dependencies. There might be multiple possible reasons for this behavior.
Could you please check if /usr/include/google/protobuf/message.h is present in your system?

I have feeling that you need to set the correct CMAKE_INCLUDE_PATH cache variable. Perhaps something like:
-DCMAKE_INCLUDE_PATH=/usr/include/64

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants