-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Update to librdkafka/1.5.0 #2380
Conversation
All green in build 2 (
|
recipes/librdkafka/all/patches/0002-Change-library-targets-and-result-variables-1-5-0.patch
Outdated
Show resolved
Hide resolved
recipes/librdkafka/all/patches/0002-Change-library-targets-and-result-variables-1-5-0.patch
Outdated
Show resolved
Hide resolved
recipes/librdkafka/all/patches/0002-Change-library-targets-and-result-variables-1-5-0.patch
Outdated
Show resolved
Hide resolved
recipes/librdkafka/all/patches/0002-Change-library-targets-and-result-variables-1-5-0.patch
Outdated
Show resolved
Hide resolved
recipes/librdkafka/all/patches/0002-Change-library-targets-and-result-variables-1-5-0.patch
Outdated
Show resolved
Hide resolved
All green in build 3 (
|
|
||
# ZSTD { | ||
-find_package(Zstd QUIET) | ||
+find_package(zstd QUIET) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it to be fixed in zstd cpp_info.name?
set(WITH_LZ4_EXT OFF) | ||
if(ENABLE_LZ4_EXT) | ||
- find_package(LZ4) | ||
+ find_package(lz4) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it to be fixed in lz4 cpp_info.name?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds reasonable ... There is no official Cmake target, but we have some insights:
The upstream doesn't export the target, but the project name is LZ4 (uppercased) in cmake file: https://github.com/lz4/lz4/blob/dev/contrib/cmake_unofficial/CMakeLists.txt
There was PR for CMake, including LZ4: https://gitlab.kitware.com/cmake/cmake/-/merge_requests/2087
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just force set(LZ4_FOUND TRUE)
and use CONAN_PKG::lz4
target, it's more robust for upstream recipes without neat cpp_info (or uncertainty about official CMake names).
It's how c-blosc
recipe handles lz4 (robust to breaking changes in lz4 recipes):
+ set(LZ4_FOUND TRUE) |
+ set(LIBS ${LIBS} "CONAN_PKG::lz4") |
Could you also add components in CMake config file is: |
add_dependencies(rdkafka bundled-ssl) | ||
else() | ||
find_package(OpenSSL REQUIRED) | ||
- target_include_directories(rdkafka PUBLIC ${OPENSSL_INCLUDE_DIR}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to remove this line. If ${OPENSSL_INCLUDE_DIR}
is not defined, this instruction is silently ignored.
if(WITH_LZ4_EXT) | ||
- target_include_directories(rdkafka PUBLIC ${LZ4_INCLUDE_DIRS}) | ||
- target_link_libraries(rdkafka PUBLIC LZ4::LZ4) | ||
+ target_link_libraries(rdkafka PUBLIC lz4::lz4) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+ target_link_libraries(rdkafka PUBLIC lz4::lz4) | |
+ target_link_libraries(rdkafka PUBLIC CONAN_PKG::lz4) |
if(WITH_SASL_CYRUS) | ||
- target_include_directories(rdkafka PUBLIC ${SASL_INCLUDE_DIRS}) | ||
- target_link_libraries(rdkafka PUBLIC ${SASL_LIBRARIES}) | ||
+ target_link_libraries(rdkafka PUBLIC cyrus-sasl::cyrus-sasl) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+ target_link_libraries(rdkafka PUBLIC cyrus-sasl::cyrus-sasl) | |
+ target_link_libraries(rdkafka PUBLIC CONAN_PKG::cyrus-sasl) |
cyrus-sasl
doesn't have official CMake module or config file, more robust to use CONAN_PKG::cyrus-sasl
, because you can't predict that upstream will not create official config file with different CMake imported target, leading to change in upstream recipe and breaking this one.
This recipe has conflicts with current master. |
Failure in build 4 (
|
recipes/librdkafka/all/conanfile.py
Outdated
@@ -83,7 +83,7 @@ def _configure_cmake(self): | |||
self._cmake.definitions["RDKAFKA_BUILD_STATIC"] = not self.options.shared | |||
self._cmake.definitions["RDKAFKA_BUILD_EXAMPLES"] = False | |||
self._cmake.definitions["RDKAFKA_BUILD_TESTS"] = False | |||
self._cmake.definitions["WITHOUT_WIN32_CONFIG"] = True | |||
self._cmake.definitions["WITHOUT_WIN32_CONFIG"] = self.settings.os == "Windows" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If windows don't use windows config ¿¿¿
Specify library name and version: librdkafka/1.5.0
Fixes #2378
conan-center hook activated.