-
Notifications
You must be signed in to change notification settings - Fork 915
confluent_kafka/src/confluent_kafka.h:21:10: fatal error: 'librdkafka/rdkafka.h' file not found #184
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
Comments
i tried the link - #45 |
Make sure to install librdkafka first, through homebrew: |
@edenhill I am facing the same issue as @datteswararao - Simply running
Any additional advice is greatly appreciated! |
@dgrotto When you install librdkafka via brew, it should add some symlinks, e.g. from my current installation:
I think this step is done by the Note that the suggested setup for homebrew is to have its prefix (/usr/local) owned by your normal user such that you will never need to |
@ewencp Thanks for the response and suggestion. I took a look at the symlinks created by the brew install and they look the same as what you have:
I checked permissions on |
I have mostly solved my problem. Apparently
This added the appropriate I still have some permissions problems to clean up after this install - SIP in Sierra doesn't let @datteswararao Thanks for opening this issue. This may help you, too. Answer mostly found here: http://stackoverflow.com/questions/23905661/on-mac-g-clang-fails-to-search-usr-local-include-and-usr-local-lib-by-def |
|
|
We're looking to ship binary wheels containing all dependencies for the upcoming release, if you'd like to try it out, install the latest confluent_kafka pre-release from test.pypi.org with:
Verify that it is working:
It should print Please report both success and failure. Do note that these wheels contain librdkafka. Thank you! |
|
Since El Capitan 10.11, Apple has created a System Integrity Protection(SIP) that does not even allow a super user to change anything in these folders: /System, /bin, /sbin, or /usr (except /usr /local). Pre requiremets form MacOS El Capitan or newer: brew install pkg-config echo 'export PATH="/usr/local/opt/openssl/bin:$PATH"' >> ~/.bash_profile Because of this, I need clone and compile librdkafka by my own, and changed the prefix fom /usr to /usr/local git clone https://github.com/edenhill/librdkafka.git |
Just so you know the binaries for linux on https://test.pypi.org/simple/ seem to be only for python2.7. Any plans to publish python3.6 linux binaries? I'm trying this on amazon lambda. |
@area It should provide binaries for py 2.7, 3.3, 3.4, 3.5, 3.6: |
@edenhill when will the change to bundle librdkafka be released? |
@manango, looks like it was released on April 9th. https://test.pypi.org/project/confluent-kafka/0.11.4/#history I'll go ahead and mark this as closed for now, please feel free to reopen should you run into additional issues. |
solved by using newest docker image (python 3.9.2)
|
C_INCLUDE_PATH=/opt/homebrew/Cellar/librdkafka/1.8.2/include/ Added them to the ~/.zprofile ( you can add to ~/.bashrc ) now worked |
On MacOS Montery 12.2.1 and Homebrew 3.4.4 I found paths were different, but had same problem fixed with environment variables as suggested above.
Ideally the setup.py would just work without At least it works on MacOS. Try building this project on Windows... |
it is works for me! |
https://medium.com/@sri.vkrnt/using-confluent-kafka-on-apple-silicon-5d9150d198a3 You can follow this article to resolve the issues with confluent-kafka. |
The solution proposed by @srivkrnt worked to me, I just had to change the version from |
bro why isn't this in the official kafka documentation? |
Solution provided by @srivkrnt worked for me. I had to change the version to 1.9.2. Before setting up the env variable, just check the version, |
@joshcull3n not sure. Though someone should add it. |
For those running versions not listed above, homebrew seems to link headers and libs to an unversioned path: export C_INCLUDE_PATH=/opt/homebrew/include
export LIBRARY_PATH=/opt/homebrew/lib EDIT: PS - thanks to everybody above for help figuring this out! |
thanks, it's work |
In my case, I tried to install confluent-kafka=1.8.2, but the version is not compatible, even with librdkafka installed. |
Can any one help me with this error?
$sudo -H /usr/local/bin/pip install confluent-kafka
Collecting confluent-kafka
Downloading confluent-kafka-0.9.4.tar.gz (40kB)
100% |████████████████████████████████| 40kB 1.3MB/s
Building wheels for collected packages: confluent-kafka
Running setup.py bdist_wheel for confluent-kafka ... error
Complete output from command /usr/local/opt/python/bin/python2.7 -u -c "import setuptools, tokenize;file='/private/tmp/pip-build-qMzR09/confluent-kafka/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" bdist_wheel -d /tmp/tmp_c59HNpip-wheel- --python-tag cp27:
running bdist_wheel
running build
running build_py
creating build
creating build/lib.macosx-10.11-x86_64-2.7
creating build/lib.macosx-10.11-x86_64-2.7/confluent_kafka
copying confluent_kafka/init.py -> build/lib.macosx-10.11-x86_64-2.7/confluent_kafka
creating build/lib.macosx-10.11-x86_64-2.7/confluent_kafka/avro
copying confluent_kafka/avro/init.py -> build/lib.macosx-10.11-x86_64-2.7/confluent_kafka/avro
copying confluent_kafka/avro/cached_schema_registry_client.py -> build/lib.macosx-10.11-x86_64-2.7/confluent_kafka/avro
creating build/lib.macosx-10.11-x86_64-2.7/confluent_kafka/kafkatest
copying confluent_kafka/kafkatest/init.py -> build/lib.macosx-10.11-x86_64-2.7/confluent_kafka/kafkatest
copying confluent_kafka/kafkatest/verifiable_client.py -> build/lib.macosx-10.11-x86_64-2.7/confluent_kafka/kafkatest
copying confluent_kafka/kafkatest/verifiable_consumer.py -> build/lib.macosx-10.11-x86_64-2.7/confluent_kafka/kafkatest
copying confluent_kafka/kafkatest/verifiable_producer.py -> build/lib.macosx-10.11-x86_64-2.7/confluent_kafka/kafkatest
creating build/lib.macosx-10.11-x86_64-2.7/confluent_kafka/avro/serializer
copying confluent_kafka/avro/serializer/init.py -> build/lib.macosx-10.11-x86_64-2.7/confluent_kafka/avro/serializer
copying confluent_kafka/avro/serializer/message_serializer.py -> build/lib.macosx-10.11-x86_64-2.7/confluent_kafka/avro/serializer
running build_ext
building 'confluent_kafka.cimpl' extension
creating build/temp.macosx-10.11-x86_64-2.7
creating build/temp.macosx-10.11-x86_64-2.7/confluent_kafka
creating build/temp.macosx-10.11-x86_64-2.7/confluent_kafka/src
clang -fno-strict-aliasing -fno-common -dynamic -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/usr/local/include -I/usr/local/opt/openssl/include -I/usr/local/opt/sqlite/include -I/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c confluent_kafka/src/confluent_kafka.c -o build/temp.macosx-10.11-x86_64-2.7/confluent_kafka/src/confluent_kafka.o
In file included from confluent_kafka/src/confluent_kafka.c:17:
confluent_kafka/src/confluent_kafka.h:21:10: fatal error: 'librdkafka/rdkafka.h' file not found
#include <librdkafka/rdkafka.h>
^
1 error generated.
error: command 'clang' failed with exit status 1
Failed building wheel for confluent-kafka
Running setup.py clean for confluent-kafka
Failed to build confluent-kafka
Installing collected packages: confluent-kafka
Running setup.py install for confluent-kafka ... error
Complete output from command /usr/local/opt/python/bin/python2.7 -u -c "import setuptools, tokenize;file='/private/tmp/pip-build-qMzR09/confluent-kafka/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-VSGjNS-record/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build/lib.macosx-10.11-x86_64-2.7
creating build/lib.macosx-10.11-x86_64-2.7/confluent_kafka
copying confluent_kafka/init.py -> build/lib.macosx-10.11-x86_64-2.7/confluent_kafka
creating build/lib.macosx-10.11-x86_64-2.7/confluent_kafka/avro
copying confluent_kafka/avro/init.py -> build/lib.macosx-10.11-x86_64-2.7/confluent_kafka/avro
copying confluent_kafka/avro/cached_schema_registry_client.py -> build/lib.macosx-10.11-x86_64-2.7/confluent_kafka/avro
creating build/lib.macosx-10.11-x86_64-2.7/confluent_kafka/kafkatest
copying confluent_kafka/kafkatest/init.py -> build/lib.macosx-10.11-x86_64-2.7/confluent_kafka/kafkatest
copying confluent_kafka/kafkatest/verifiable_client.py -> build/lib.macosx-10.11-x86_64-2.7/confluent_kafka/kafkatest
copying confluent_kafka/kafkatest/verifiable_consumer.py -> build/lib.macosx-10.11-x86_64-2.7/confluent_kafka/kafkatest
copying confluent_kafka/kafkatest/verifiable_producer.py -> build/lib.macosx-10.11-x86_64-2.7/confluent_kafka/kafkatest
creating build/lib.macosx-10.11-x86_64-2.7/confluent_kafka/avro/serializer
copying confluent_kafka/avro/serializer/init.py -> build/lib.macosx-10.11-x86_64-2.7/confluent_kafka/avro/serializer
copying confluent_kafka/avro/serializer/message_serializer.py -> build/lib.macosx-10.11-x86_64-2.7/confluent_kafka/avro/serializer
running build_ext
building 'confluent_kafka.cimpl' extension
creating build/temp.macosx-10.11-x86_64-2.7
creating build/temp.macosx-10.11-x86_64-2.7/confluent_kafka
creating build/temp.macosx-10.11-x86_64-2.7/confluent_kafka/src
clang -fno-strict-aliasing -fno-common -dynamic -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/usr/local/include -I/usr/local/opt/openssl/include -I/usr/local/opt/sqlite/include -I/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c confluent_kafka/src/confluent_kafka.c -o build/temp.macosx-10.11-x86_64-2.7/confluent_kafka/src/confluent_kafka.o
In file included from confluent_kafka/src/confluent_kafka.c:17:
confluent_kafka/src/confluent_kafka.h:21:10: fatal error: 'librdkafka/rdkafka.h' file not found
#include <librdkafka/rdkafka.h>
^
1 error generated.
error: command 'clang' failed with exit status 1
Command "/usr/local/opt/python/bin/python2.7 -u -c "import setuptools, tokenize;file='/private/tmp/pip-build-qMzR09/confluent-kafka/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-VSGjNS-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/tmp/pip-build-qMzR09/confluent-kafka/
The text was updated successfully, but these errors were encountered: