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

Missing find_dependency(uring) in RocksDBConfig.cmake #11626

Open
yurybura opened this issue Jul 19, 2023 · 0 comments
Open

Missing find_dependency(uring) in RocksDBConfig.cmake #11626

yurybura opened this issue Jul 19, 2023 · 0 comments
Labels
Build build, makefile, cmake, scripts up-for-grabs Up for grabs

Comments

@yurybura
Copy link

Expected behavior

RocksDBConfig.cmake.in should be modified to find io_uring library if WITH_LIBURING=ON.
Also, WITH_LIBURING should be OFF on unsupported platforms, e.g. Windows.

Actual behavior

The io_uring dependency is added to the main CMakeLists.txt file, but the find_dependency(uring) is missing from the installed RocksDBConfig.cmake file:

rocksdb/CMakeLists.txt

Lines 314 to 320 in 05c3b8e

if (WITH_LIBURING)
find_package(uring)
if (uring_FOUND)
add_definitions(-DROCKSDB_IOURING_PRESENT)
list(APPEND THIRDPARTY_LIBS uring::uring)
endif()
endif()

Steps to reproduce the behavior

  1. Build RocksDB on Linux with liburing installed.
  2. Build a simple program:
project(foo)
find_package(RocksDB CONFIG)
add_executable(foo main.cpp)
target_link_libraries(myprog PRIVATE RocksDB::rocksdb)
[cmake] CMake Error at <path>/RocksDBTargets.cmake:60 (set_target_properties):
[cmake] The link interface of target "RocksDB::rocksdb" contains:
[cmake]
[cmake] uring::uring
[cmake]
[cmake] but the target was not found. Possible reasons include:
[cmake]
[cmake] * There is a typo in the target name.
[cmake] * A find_package call is missing for an IMPORTED target.
[cmake] * An ALIAS target is missing.
[cmake]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Build build, makefile, cmake, scripts up-for-grabs Up for grabs
Projects
None yet
Development

No branches or pull requests

2 participants