Skip to content

confluent_kafka/cimpl.cpython-36m-x86_64-linux-gnu.so: undefined symbol: rd_kafka_event_AlterConsumerGroupOffsets_result #1639

@shaileshjagnani

Description

@shaileshjagnani

Description

On centos 7, getting error when importing confluent kafka 2.2.0 in python script.
The confluent-kafka module was built using the source along with librdkafka.

Getting below error when importing the module
Traceback (most recent call last):
File "", line 1, in
File "/usr/lib64/python3.6/site-packages/confluent_kafka/init.py", line 19, in
from .deserializing_consumer import DeserializingConsumer
File "/usr/lib64/python3.6/site-packages/confluent_kafka/deserializing_consumer.py", line 19, in
from confluent_kafka.cimpl import Consumer as _ConsumerImpl
ImportError: /usr/lib64/python3.6/site-packages/confluent_kafka/cimpl.cpython-36m-x86_64-linux-gnu.so: undefined symbol: rd_kafka_event_AlterConsumerGroupOffsets_result

How to reproduce

  1. Build the confluent-kafka rpm using the source with below steps

  2. dnf install -y python3-devel

  3. sed -i -E 's/(name = ")/\1python3-/g' setup.py

  4. python3 setup.py sdist bdist_rpm --release="%{timestamp}%{?dist}" --spec-only --build-requires=python3-devel

  5. SPEC=$(basename $(find -name *.spec) )

  6. rpmbuild -bb dist/"${SPEC}" --define "_sourcedir pwd/dist" --define "_specdir pwd/dist" --define "_rpmdir pwd/dist" --define 'timestamp %(date +"%Y%m%d%H%M")' --define "debug_package %{nil}"

  7. Prerequisite to create the confluent-kafka rpm, create the librdkafka as below

  8. curl -L https://github.com/confluentinc/librdkafka/archive/refs/tags/v2.2.0.tar.gz | tar xzf -

  9. cd librdkafka-2.2.0/

  10. ./configure --prefix=/usr

  11. make -j

  12. make install

Install the rpm created on the centos box and then try to import the module.

Checklist

Please provide the following information:

  • confluent-kafka-python and librdkafka version (confluent_kafka.version() and confluent_kafka.libversion()):
  • Apache Kafka broker version:
  • Client configuration: {...}
  • Operating system:
  • Provide client logs (with 'debug': '..' as necessary)
  • Provide broker log excerpts
  • Critical issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    code:pythonIssues that are specific to Python or versions of Python independent of library logicmaintenanceAny tech debt or routine action tasks that should be tracked with an issuepriority:highMaintainer triage tag for indicating high impact or criticality issues

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions