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找到一个由“Snappy”提供的包配置文件,但是 CMake没有找到。 #348

Open
apachexc opened this issue Dec 5, 2023 · 6 comments

Comments

@apachexc
Copy link

apachexc commented Dec 5, 2023

CMake Warning at CMakeLists.txt:43 (find_package):
By not providing "FindSnappy.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "Snappy", but
CMake did not find one.

Could not find a package configuration file provided by "Snappy" with any
of the following names:

SnappyConfig.cmake
snappy-config.cmake

image

@apachexc
Copy link
Author

apachexc commented Dec 5, 2023

make srpc 报错

@holmes1412
Copy link
Contributor

你好,可以看看是否有/root/srpc/third_party/snappy/cmake/SnappyConfig.cmake.in这个文件?
另外可以提供下cmake的版本号么?

@apachexc
Copy link
Author

apachexc commented Dec 5, 2023

image

cmake3 version 3.17.5

@holmes1412
Copy link
Contributor

你好,这里只是warning的信息,因为你系统默认没有安装的话,这里find_package(snappy)找不到的话,就会从third_party/snappy/cmake里找,后面会继续编译的,如下:

CMake Warning at CMakeLists.txt:43 (find_package):
  By not providing "FindSnappy.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "Snappy", but
  CMake did not find one.

  Could not find a package configuration file provided by "Snappy" with any
  of the following names:

    SnappyConfig.cmake
    snappy-config.cmake

  Add the installation prefix of "Snappy" to CMAKE_PREFIX_PATH or set
  "Snappy_DIR" to a directory containing one of the above files.  If "Snappy"
  provides a separate development package or SDK, be sure it has been
  installed.


-- Looking for C++ include snappy.h
-- Looking for C++ include snappy.h - found
Snappy third_party FOUND. Use for source code dependencies.

-- Looking for C++ include workflow/Workflow.h
-- Looking for C++ include workflow/Workflow.h - found
Workflow third_party FOUND. Use for source code dependencies.
-- Found OpenSSL: /usr/lib64/libcrypto.so (found version "1.1.1k")  
-- Found Protobuf: /usr/local/lib/libprotobuf.so;-lpthread (found suitable version "3.12.0", minimum required is "3.5.0") 
-- Configuring done
-- Generating done
-- Build files have been written to: /root/srpc/srpc_december/build.cmake
make -C build.cmake -f Makefile
make[1]: Entering directory '/root/srpc/srpc_december/build.cmake'
make[2]: Entering directory '/root/srpc/srpc_december/build.cmake'
make[3]: Entering directory '/root/srpc/srpc_december/build.cmake'
make[3]: Leaving directory '/root/srpc/srpc_december/build.cmake'
make[3]: Entering directory '/root/srpc/srpc_december/build.cmake'
make[3]: Leaving directory '/root/srpc/srpc_december/build.cmake'
[  0%] Built target LINK_HEADERS
make[3]: Entering directory '/root/srpc/srpc_december/build.cmake'
make[3]: Leaving directory '/root/srpc/srpc_december/build.cmake'
make[3]: Entering directory '/root/srpc/srpc_december/build.cmake'
[  1%] Building CXX object src/http/CMakeFiles/http.dir/http_module.cc.o
[  3%] Building CXX object src/http/CMakeFiles/http.dir/http_task.cc.o
[  5%] Building CXX object src/http/CMakeFiles/http.dir/http_client.cc.o
[  7%] Building CXX object src/http/CMakeFiles/http.dir/http_server.cc.o
make[3]: Leaving directory '/root/srpc/srpc_december/build.cmake'
[  7%] Built target http
make[3]: Entering directory '/root/srpc/srpc_december/build.cmake'
[  9%] Running cpp protocol buffer compiler on proto/opentelemetry_trace.proto

如果你最终失败了,可以把最终的错误信息发一下~

@apachexc
Copy link
Author

apachexc commented Dec 5, 2023

[100%] Built target workflow-static
make[3]: Leaving directory /root/srpc/workflow/build.cmake' make[2]: Leaving directory /root/srpc/workflow/build.cmake'
make[1]: Leaving directory `/root/srpc/workflow'
mkdir -p build.cmake
cd build.cmake && cmake3 /root/srpc
-- The C compiler identification is GNU 4.8.5
-- The CXX compiler identification is GNU 4.8.5
-- 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
-- Looking for lz4.h
-- Looking for lz4.h - found
Lz4 third_party FOUND. Use for source code dependencies.
CMake Warning at CMakeLists.txt:43 (find_package):
By not providing "FindSnappy.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "Snappy", but
CMake did not find one.

Could not find a package configuration file provided by "Snappy" with any
of the following names:

SnappyConfig.cmake
snappy-config.cmake

Add the installation prefix of "Snappy" to CMAKE_PREFIX_PATH or set
"Snappy_DIR" to a directory containing one of the above files. If "Snappy"
provides a separate development package or SDK, be sure it has been
installed.

-- Looking for C++ include snappy.h
-- Looking for C++ include snappy.h - found
Snappy third_party FOUND. Use for source code dependencies.
-- Looking for C++ include workflow/Workflow.h
-- Looking for C++ include workflow/Workflow.h - not found
CMake Error at CMakeLists.txt:74 (message):
Protobuf compiler is missing!

-- Configuring incomplete, errors occurred!
See also "/root/srpc/build.cmake/CMakeFiles/CMakeOutput.log".
See also "/root/srpc/build.cmake/CMakeFiles/CMakeError.log".
make: *** [base] Error 1

@holmes1412
Copy link
Contributor

holmes1412 commented Dec 5, 2023

这个看起来是没有安装protoc~ protobuf和protoc都需要自行安装,一般安装protobuf的时候都会一起安装,可以直接执行一下protoc看看是否有?

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

No branches or pull requests

2 participants