在cargo build tikv源码时出现了如下报错, 请问该怎么解决。
Compiling libtitan_sys v0.0.1 (https://github.com/tikv/rust-rocksdb.git#b2cd4258)
error: failed to run custom build command for libtitan_sys v0.0.1 (https://github.com/tikv/rust-rocksdb.git#b2cd4258)
Caused by:
process didn’t exit successfully: /home/yue/tikv/target/debug/build/libtitan_sys-805bf40a3d57cb5a/build-script-build
(exit status: 101)
— stdout
CMAKE_TOOLCHAIN_FILE_x86_64-unknown-linux-gnu = None
CMAKE_TOOLCHAIN_FILE_x86_64_unknown_linux_gnu = None
HOST_CMAKE_TOOLCHAIN_FILE = None
CMAKE_TOOLCHAIN_FILE = None
CMAKE_GENERATOR_x86_64-unknown-linux-gnu = None
CMAKE_GENERATOR_x86_64_unknown_linux_gnu = None
HOST_CMAKE_GENERATOR = None
CMAKE_GENERATOR = None
CMAKE_PREFIX_PATH_x86_64-unknown-linux-gnu = None
CMAKE_PREFIX_PATH_x86_64_unknown_linux_gnu = None
HOST_CMAKE_PREFIX_PATH = None
CMAKE_PREFIX_PATH = Some(“/home/yue/tikv/target/debug/build/libz-sys-46bc1b44529cf39a/out/build”)
CMAKE_x86_64-unknown-linux-gnu = None
CMAKE_x86_64_unknown_linux_gnu = None
HOST_CMAKE = None
CMAKE = None
running: “cmake” “-Wdev” “–debug-output” “/root/.cargo/git/checkouts/rust-rocksdb-a9a28e74c6ead8ef/b2cd425/librocksdb_sys/libtitan_sys/titan” “-DROCKSDB_DIR=/root/.cargo/git/checkouts/rust-rocksdb-a9a28e74c6ead8ef/b2cd425/librocksdb_sys/libtitan_sys/…/rocksdb” “-DWITH_TITAN_TESTS=OFF” “-DWITH_TITAN_TOOLS=OFF” “-DWITH_ZLIB=ON” “-DWITH_BZ2=ON” “-DWITH_LZ4=ON” “-DWITH_ZSTD=ON” “-DWITH_SNAPPY=ON” “-DWITH_TITAN_TESTS=OFF” “-DWITH_TITAN_TOOLS=OFF” “-DCMAKE_INSTALL_PREFIX=/home/yue/tikv/target/debug/build/libtitan_sys-5dd3233306f3aad1/out” “-DCMAKE_C_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64” “-DCMAKE_C_COMPILER=/opt/rh/devtoolset-8/root/usr/bin/cc” “-DCMAKE_CXX_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64” “-DCMAKE_CXX_COMPILER=/opt/rh/devtoolset-8/root/usr/bin/c++” “-DCMAKE_ASM_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64” “-DCMAKE_ASM_COMPILER=/opt/rh/devtoolset-8/root/usr/bin/cc” “-DCMAKE_BUILD_TYPE=Release” “-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON”
Running with debug output on.
– Enabling RTTI in Debug builds only (default)
Called from: [2] /root/.cargo/git/checkouts/rust-rocksdb-a9a28e74c6ead8ef/b2cd425/librocksdb_sys/libtitan_sys/titan/cmake/rocksdb_flags.cmake
[1] /root/.cargo/git/checkouts/rust-rocksdb-a9a28e74c6ead8ef/b2cd425/librocksdb_sys/libtitan_sys/titan/CMakeLists.txt
– Configuring done
CMake Error at CMakeLists.txt:168 (find_package):
By not providing “Findgflags.cmake” in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by “gflags”, but
CMake did not find one.
Could not find a package configuration file provided by "gflags" with any
of the following names:
gflagsConfig.cmake
gflags-config.cmake
Add the installation prefix of "gflags" to CMAKE_PREFIX_PATH or set
"gflags_DIR" to a directory containing one of the above files. If "gflags"
provides a separate development package or SDK, be sure it has been
installed.
Called from: [1] /root/.cargo/git/checkouts/rust-rocksdb-a9a28e74c6ead8ef/b2cd425/librocksdb_sys/libtitan_sys/titan/CMakeLists.txt
thread ‘main’ panicked at ’
command did not execute successfully, got: exit status: 1
build script failed, must exit now’, /root/.cargo/git/checkouts/cmake-rs-1b5303aca42ae56b/00e6b22/src/lib.rs:1054:5
note: run with RUST_BACKTRACE=1
environment variable to display a backtrace