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

Building failed for centos 7 due to "Could not find a package configuration file provided by Snappy" after rocksdb was upgraded to version 8.5.3 #1632

Closed
empiredan opened this issue Sep 28, 2023 · 1 comment
Labels
type/bug This issue reports a bug.

Comments

@empiredan
Copy link
Contributor

In my environment of centos 7, building failed due to "Could not find a package configuration file provided by Snappy" as below:

-- USE_JEMALLOC = OFF
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- 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
-- FIND_LIBRARY_USE_LIB64_PATHS = ON
-- Found components for RT
-- RT_INCLUDES = /usr/include
-- RT_LIBRARIES = /usr/lib64/librt.so
-- Found components for DL
-- DL_INCLUDES = /usr/include
-- DL_LIBRARIES = /usr/lib64/libdl.so
-- Found OpenSSL: /usr/lib64/libcrypto.so (found version "1.0.2k")
-- CMAKE_PREFIX_PATH = /data/sa_cluster/src/empiredan-pegasus-new/thirdparty/output
-- Found Boost: /data/sa_cluster/src/empiredan-pegasus-new/thirdparty/output/include (found version "1.69.0") found components: system filesystem regex
CMake Warning at cmake_modules/BaseFunctions.cmake:338 (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.
Call Stack (most recent call first):
  cmake_modules/BaseFunctions.cmake:396 (dsn_setup_thirdparty_libs)
  src/CMakeLists.txt:24 (dsn_common_setup)


-- Found zstd: /lib/libzstd.so
-- Found lz4: /lib64/liblz4.so
CMake Error at /usr/local/share/cmake-3.16/Modules/CMakeFindDependencyMacro.cmake:47 (find_package):
  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.
Call Stack (most recent call first):
  thirdparty/output/lib64/cmake/rocksdb/RocksDBConfig.cmake:45 (find_dependency)
  cmake_modules/BaseFunctions.cmake:344 (find_package)
  cmake_modules/BaseFunctions.cmake:396 (dsn_setup_thirdparty_libs)
  src/CMakeLists.txt:24 (dsn_common_setup)


-- Configuring incomplete, errors occurred!

Also, building also failed for Lint and build regularly after upgrading rocksdb to 8.5.3:

Selected compiler gcc 7.3.1
Selected compiler built with --prefix=/opt/rh/devtoolset-7/root/usr
-- ENABLE_GPERF = ON
-- USE_JEMALLOC = OFF
-- CCACHE: /usr/bin/ccache
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- 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  
-- FIND_LIBRARY_USE_LIB[64](https://github.com/apache/incubator-pegasus/actions/runs/6189196092/job/16802799615#step:6:65)_PATHS = ON
-- Found components for RT
-- RT_INCLUDES = /usr/include
-- RT_LIBRARIES = /usr/lib64/librt.so
-- Found components for DL
-- DL_INCLUDES = /usr/include
-- DL_LIBRARIES = /usr/lib64/libdl.so
-- Found OpenSSL: /usr/lib64/libcrypto.so (found version "1.0.2k")  
-- use ccache to speed up compilation
-- CMAKE_PREFIX_PATH = /root/incubator-pegasus/thirdparty/output
-- Found Boost: /root/incubator-pegasus/thirdparty/output/include (found version "1.[69](https://github.com/apache/incubator-pegasus/actions/runs/6189196092/job/16802799615#step:6:70).0") found components: system filesystem regex 
CMake Warning at cmake_modules/BaseFunctions.cmake:338 (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.
Call Stack (most recent call first):
  cmake_modules/BaseFunctions.cmake:396 (dsn_setup_thirdparty_libs)
  src/CMakeLists.txt:24 (dsn_common_setup)


-- Found zstd: /lib64/libzstd.so  
-- Found lz4: /lib64/liblz4.so  
CMake Error at /usr/local/lib64/python3.6/site-packages/cmake/data/share/cmake-3.27/Modules/CMakeFindDependencyMacro.cmake:[76](https://github.com/apache/incubator-pegasus/actions/runs/6189196092/job/16802799615#step:6:77) (find_package):
  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.
Call Stack (most recent call first):
  thirdparty/output/lib64/cmake/rocksdb/RocksDBConfig.cmake:45 (find_dependency)
  cmake_modules/BaseFunctions.cmake:344 (find_package)
  cmake_modules/BaseFunctions.cmake:396 (dsn_setup_thirdparty_libs)
  src/CMakeLists.txt:24 (dsn_common_setup)


-- Configuring incomplete, errors occurred!
@empiredan empiredan added the type/bug This issue reports a bug. label Sep 28, 2023
acelyc111 added a commit that referenced this issue Dec 12, 2023
#1709)

Build snappy/lz4/zstd as thirdparty libraries, and do not dependent on the
library in system. It would be more flexible to upgrade the libraries
version no matter what the library versions in system are.

Another issue this patch resolve is #1632.
@empiredan
Copy link
Contributor Author

This issue has been resolved by #1709.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug This issue reports a bug.
Projects
None yet
Development

No branches or pull requests

1 participant