librdkafka
librdkafka copied to clipboard
rdkafka-static.pc is ignoring install path
Description
generated rdkafka-static.pc is having wrong prefix:
prefix=/usr/local
exec_prefix=${prefix}
includedir=${prefix}/include
libdir=${prefix}/lib
Name: librdkafka++-static
Description: The Apache Kafka C/C++ library (static)
Version: 1.9.2
Requires:
Cflags: -I${includedir} -DLIBRDKAFKA_STATICLIB
Libs: -L${libdir} ${libdir}/librdkafka++.a
Libs.private:
even when libdir is suffixed with 64 and prefix is set with cmake to /usr ...
list of installed files with cmake --install build_dir --prefix=/usr
/usr/lib64/cmake/RdKafka/RdKafkaConfig.cmake
/usr/lib64/cmake/RdKafka/RdKafkaConfigVersion.cmake
/usr/lib64/cmake/RdKafka/FindLZ4.cmake
/usr/lib64/cmake/RdKafka/RdKafkaTargets.cmake
/usr/lib64/cmake/RdKafka/RdKafkaTargets-release.cmake
/usr/share/licenses/librdkafka/LICENSES.txt
/usr/lib64/pkgconfig/rdkafka-static.pc
/usr/lib64/librdkafka.a
/usr/include/librdkafka/rdkafka.h
/usr/include/librdkafka/rdkafka_mock.h
/usr/lib64/pkgconfig/rdkafka++-static.pc
/usr/lib64/librdkafka++.a
/usr/include/librdkafka/rdkafkacpp.h
so when I'm using pkgconfig to find rdkafka++-static it won't find the static library as it's looking for it in /usr/local/lib/ which is wrong
Checklist
IMPORTANT: We will close issues where the checklist has not been completed.
Please provide the following information:
- [x] librdkafka version (release number or git tag):
1.9.2 - [x] Apache Kafka version:
irrelevant - [x] librdkafka client configuration:
irrelevant> - [x] Operating system:
centos 7 - [x] Provide logs (with
debug=..as necessary) from librdkafka (irelevant) - [x] Provide broker log excerpts (irelevant)
- [ ] Critical issue
The .pc prefix= is taken from the ./configure --prefix=... argument, which defaults to /usr/local.
Did you build librdkafka with configure or cmake? Cmake is not officially supported but provided by community members in a best-effort fashion, if you find a problem with the Cmake build process please submit a PR for a fix.
yes, it is cmake ... ok I will try to look at it :) thanks!
If issue persists please open a new issue. thanks