bazaah / aur-ceph

Public workspace for ceph packages in the Archlinux AUR
https://aur.archlinux.org/pkgbase/ceph
6 stars 1 forks source link

Investigate cmake failure for `rdkafka` #11

Closed bazaah closed 1 year ago

bazaah commented 1 year ago

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 https://github.com/confluentinc/librdkafka/pull/4045


Now I need to figure out who is responsible:

  1. Maintainer of community/librdkafka
  2. The upstream (https://github.com/confluentinc/librdkafka)
bazaah commented 1 year ago

Opened https://github.com/confluentinc/librdkafka/issues/4155 against the upstream to clarify whether this is distro specific or an issue for them.

bazaah commented 1 year ago

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

kerwenwwer commented 1 year ago

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 commented 1 year ago

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.