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

Update to librdkafka/1.5.0 #2380

Closed
wants to merge 0 commits into from
Closed

Conversation

sourcedelica
Copy link
Contributor

Specify library name and version: librdkafka/1.5.0

Fixes #2378

  • I've read the guidelines for contributing.
  • I've followed the PEP8 style guides for Python code in the recipes.
  • I've used the latest Conan client version.
  • I've tried at least one configuration locally with the
    conan-center hook activated.

@CLAassistant
Copy link

CLAassistant commented Aug 3, 2020

CLA assistant check
All committers have signed the CLA.

@uilianries uilianries closed this Aug 3, 2020
@uilianries uilianries reopened this Aug 3, 2020
@conan-center-bot
Copy link
Collaborator

All green in build 2 (73461a4f8c5a327ce13abd034d2644d2be4b7f03)! 😊

uilianries
uilianries previously approved these changes Aug 4, 2020
@uilianries uilianries requested review from jgsogo and SSE4 August 4, 2020 21:23
SSE4
SSE4 previously approved these changes Aug 5, 2020
@sourcedelica sourcedelica dismissed stale reviews from SSE4 and uilianries via 21d5687 August 9, 2020 19:05
@conan-center-bot
Copy link
Collaborator

All green in build 3 (21d5687f15b759961eb607961ef75a01da8140f6)! 😊

@uilianries uilianries requested review from danimtb and SSE4 August 10, 2020 17:27

# ZSTD {
-find_package(Zstd QUIET)
+find_package(zstd QUIET)
Copy link
Contributor

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)
Copy link
Contributor

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?

Copy link
Member

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

Copy link
Contributor

@SpaceIm SpaceIm Aug 26, 2020

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):


@SpaceIm
Copy link
Contributor

SpaceIm commented Aug 26, 2020

Could you also add components in package_info (or I can open another PR)?

CMake config file is: RdKafkaConfig.cmake
CMake imported targets: RdKafka::rdkafka and RdKafka::rdkafka++
pkg config files: rdkafka.pc and rdkafka++.pc

add_dependencies(rdkafka bundled-ssl)
else()
find_package(OpenSSL REQUIRED)
- target_include_directories(rdkafka PUBLIC ${OPENSSL_INCLUDE_DIR})
Copy link
Contributor

@SpaceIm SpaceIm Aug 26, 2020

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)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
+ 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)
Copy link
Contributor

@SpaceIm SpaceIm Aug 26, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
+ 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.

@madebr
Copy link
Contributor

madebr commented Sep 11, 2020

This recipe has conflicts with current master.

@conan-center-bot
Copy link
Collaborator

Failure in build 4 (21d5687f15b759961eb607961ef75a01da8140f6):

  • librdkafka/1.3.0
    • Hooks errors detected:
      • [HOOK - conan-center.py] pre_export(): ERROR: [CONFIG.YML HAS NEW VERSION (KB-H052)] The version "1.5.0" exists in "conandata.yml" but not in "../config.yml", so it will not be built. Please update "../config.yml" to include newly added version "1.5.0". (https://github.com/conan-io/conan-center-index/blob/master/docs/error_knowledge_base.md#KB-H052)
  • librdkafka/1.4.0
    • Hooks errors detected:
      • [HOOK - conan-center.py] pre_export(): ERROR: [CONFIG.YML HAS NEW VERSION (KB-H052)] The version "1.5.0" exists in "conandata.yml" but not in "../config.yml", so it will not be built. Please update "../config.yml" to include newly added version "1.5.0". (https://github.com/conan-io/conan-center-index/blob/master/docs/error_knowledge_base.md#KB-H052)

@@ -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"
Copy link
Contributor

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 ¿¿¿

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[request] librdkafka/1.5.0
9 participants