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

Investigate cmake failure for rdkafka #11

Closed
bazaah opened this issue Jan 23, 2023 · 4 comments
Closed

Investigate cmake failure for rdkafka #11

bazaah opened this issue Jan 23, 2023 · 4 comments
Assignees
Labels
bug Something isn't working next-pkgrel upstream/v17

Comments

@bazaah
Copy link
Owner

bazaah commented Jan 23, 2023

Need to rebuild for new boost release, but it appears there is a cmake build error:

CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
  Could NOT find RDKafka: (Required is at least version "0.9.2") (found
  /usr/include)

This error message is wrong.

It is caused by the call to pkg-config in pkg_search_module.

Running the equivalent command from the shell results in the following error message:

❯ arch-nspawn $CHROOT/17.2.5_6 pkg-config --print-requires --print-variables --modversion rdkafka
Package curl was not found in the pkg-config search path.
Perhaps you should add the directory containing `curl.pc'
to the PKG_CONFIG_PATH environment variable
Package 'curl', required by 'rdkafka', not found

Which leads us to our real error, revealed in the following diff between v1.9 and v2.0:

@@ -5,8 +5,8 @@

 Name: librdkafka
 Description: The Apache Kafka C/C++ library
-Version: 1.9.2
-Requires: zlib libssl libsasl2 libzstd liblz4
+Version: 2.0.0
+Requires: curl zlib libssl libsasl2 libzstd liblz4
 Cflags: -I${includedir}
 Libs: -L${libdir} -lrdkafka
 Libs.private: -lpthread -lrt -ldl -lm

curl is not a valid pkg-config module, at least on Archlinux, libcurl is.

This change was introduced in confluentinc/librdkafka#4045


Now I need to figure out who is responsible:

  1. Maintainer of community/librdkafka
  2. The upstream (https://github.com/confluentinc/librdkafka)
@bazaah bazaah added bug Something isn't working upstream/v17 next-pkgrel labels Jan 23, 2023
@bazaah bazaah self-assigned this Jan 23, 2023
@bazaah
Copy link
Owner Author

bazaah commented Jan 23, 2023

Opened confluentinc/librdkafka#4155 against the upstream to clarify whether this is distro specific or an issue for them.

@bazaah
Copy link
Owner Author

bazaah commented Jan 29, 2023

Also raised with Archlinux: https://bugs.archlinux.org/task/77257?project=5&string=librdkafka

@kerwenwwer
Copy link

In Arch linux the pkg-config name of curl is libcurl, so just need to patch pkg-config file in /usr/lib/pkgconfig/rdkafka.pc

Description: The Apache Kafka C/C++ library
Version: 2.0.2
Requires: libcurl zlib libssl libsasl2 libzstd liblz4
Cflags: -I${includedir}
Libs: -L${libdir} -lrdkafka
Libs.private: -lpthread -lrt -ldl -lm

@bazaah
Copy link
Owner Author

bazaah commented Feb 3, 2023

I am well aware of the issue, however I will not be editing system files of unrelated packages. Either the upstream, or the Archlinux package's maintainer need to fix this on their end.

bazaah added a commit that referenced this issue Mar 7, 2023
This is a fix to confluentinc/librdkafka#4155, which blocks our ability
to build this package.

The plan is to apply the patch to the system file, output into a local
directory and instruct pkgconfig to search that directory.

References: #11
References: confluentinc/librdkafka#4155
@bazaah bazaah closed this as completed in 5431f96 Mar 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working next-pkgrel upstream/v17
Projects
None yet
Development

No branches or pull requests

2 participants