I'm trying to write a PHP extension for Apache Kafka in C and it should use librdkafka. So, I compiled and installed kafka client library, and wrote simple extension which includes librdkafka/rdkafka.h and extension is compilig fine with phpize, ./configure, make and make install. But when I try to use extension, I'm getting error:
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/2010052 5+lfs/kafka.so' - /usr/lib/php5/20100525+lfs/kafka.so: undefined symbol: rd_kafk a_topic_new in Unknown on line 0
So, basically, I think I didn't include librdkafka properly into extension or something related to linking those two programs.
Here is my code: https://github.com/salebab/phpkafka
librdkafka files are here:
/usr/local/lib/librdkafka.so /usr/local/lib/librdkafka.a
Any help?