You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Prepare an environment with required dependencies installed. (I was using Archlinux with dependencies installed using sudo pacman -Syu bzip2 gcc-libs gflags jemalloc lz4 snappy zlib zstd)
Build RocksDB from current master HEAD with the following commands:
The test project should be configured successfully without errors
Actual behavior
CMake reports dependency missing error when configuring the test project:
CMake Error at CMakeLists.txt:9 (add_executable):
Target "test1" links to target "JeMalloc::JeMalloc" but the target was not
found. Perhaps a find_package() call is missing for an IMPORTED target, or
an ALIAS target is missing?
CMake Error at CMakeLists.txt:9 (add_executable):
Target "test1" links to target "gflags::gflags" but the target was not
found. Perhaps a find_package() call is missing for an IMPORTED target, or
an ALIAS target is missing?
CMake Error at CMakeLists.txt:9 (add_executable):
Target "test1" links to target "snappy::snappy" but the target was not
found. Perhaps a find_package() call is missing for an IMPORTED target, or
an ALIAS target is missing?
CMake Error at CMakeLists.txt:9 (add_executable):
Target "test1" links to target "ZLIB::ZLIB" but the target was not found.
Perhaps a find_package() call is missing for an IMPORTED target, or an
ALIAS target is missing?
CMake Error at CMakeLists.txt:9 (add_executable):
Target "test1" links to target "lz4::lz4" but the target was not found.
Perhaps a find_package() call is missing for an IMPORTED target, or an
ALIAS target is missing?
CMake Error at CMakeLists.txt:9 (add_executable):
Target "test1" links to target "zstd::zstd" but the target was not found.
Perhaps a find_package() call is missing for an IMPORTED target, or an
ALIAS target is missing?
-- Generating done
CMake Generate step failed. Build files cannot be regenerated correctly.
Additional Info
The root cause seems to be those dependency targets being exported as interface link libraries of rocksdb, as shown in lib/cmake/rocksdb/RocksDBTargets.cmake, yet there's no steps in the configuration files to acutallly find those dependencies. I'm not sure about the original intention why the configuration files are designed like so, but I do want to mention that it is intended in CMake that package configuration file should handle dependencies on its own, if package providers want to encapsule package together with its dependencies.
The text was updated successfully, but these errors were encountered:
Steps to reproduce the behavior
Prepare an environment with required dependencies installed. (I was using Archlinux with dependencies installed using
sudo pacman -Syu bzip2 gcc-libs gflags jemalloc lz4 snappy zlib zstd
)Build RocksDB from current master HEAD with the following commands:
Write a test project with a
CMakeLists.txt
of the following content:Configure the test project with the following command:
Expected behavior
The test project should be configured successfully without errors
Actual behavior
CMake reports dependency missing error when configuring the test project:
Additional Info
The root cause seems to be those dependency targets being exported as interface link libraries of rocksdb, as shown in
lib/cmake/rocksdb/RocksDBTargets.cmake
, yet there's no steps in the configuration files to acutallly find those dependencies. I'm not sure about the original intention why the configuration files are designed like so, but I do want to mention that it is intended in CMake that package configuration file should handle dependencies on its own, if package providers want to encapsule package together with its dependencies.The text was updated successfully, but these errors were encountered: