-
Notifications
You must be signed in to change notification settings - Fork 94
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
fix(test): Find librdkafka on Apple M1 #1204
Conversation
if [ "$$(uname -sm)" = "Darwin arm64" ]; then \ | ||
echo "Using 'librdkafka' from homebrew to build confluent-kafka"; \ | ||
export C_INCLUDE_PATH="$$(brew --prefix librdkafka)/include"; \ | ||
export LIBRARY_PATH="$$(brew --prefix librdkafka)/lib"; \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In my original PR I only needed CPATH.
It seems you used this solution:
confluentinc/confluent-kafka-python#1190 (comment)
Did you happen to find out why CPATH was not good enough? (Just out of curiosity; no need to research it if it's unknown)
if [ "$$(uname -sm)" = "Darwin arm64" ]; then \ | ||
echo "Using 'librdkafka' from homebrew to build confluent-kafka"; \ | ||
export C_INCLUDE_PATH="$$(brew --prefix librdkafka)/include"; \ | ||
export LIBRARY_PATH="$$(brew --prefix librdkafka)/lib"; \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In my original PR I only needed CPATH.
It seems you used this solution:
confluentinc/confluent-kafka-python#1190 (comment)
Did you happen to find out why CPATH was not good enough? (Just out of curiosity; no need to research it if it's unknown)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I never tried without, and you're right, it works with just the include path. Simplified in #1206.
* master: ref(make): Simplify M1 exports in Makefile (#1206) fix(metrics): Wait for project states during aggregator shutdown (#1205) fix(test): Find librdkafka on Apple M1 (#1204) build: Bump sentry-relay in dev dependencies to 0.8.9 (#1202) ref(metrics): Tag backdated bucket creations in statsd (#1200) feat(metrics): Extract user satisfaction as tag (#1197) fix(statsd): Add new metric_type tag to existing metrics (#1199) fix: Apply clippy 1.59 suggestions (#1198)
Uses
brew --prefix
to locatelibrdkafka
on macOS ARM builds. The homebrewlocation differs on ARM and puts libraries in a non-standard location. There is
a similar workaround in the sentry development environment, except that it
writes exports to the zshrc / bashrc files.
See confluentinc/confluent-kafka-python#1190
As part of this change, I've also updated the README to list
librdkafka
asdevelopment dependency and upgrade
pip
andwheel
during the venv setupprocess.
#skip-changelog