Skip to content

Instantly share code, notes, and snippets.

@zhangw
Created April 16, 2022 10:23
Show Gist options
  • Select an option

  • Save zhangw/8fb08e65eb04d6dd5229f8e886775561 to your computer and use it in GitHub Desktop.

Select an option

Save zhangw/8fb08e65eb04d6dd5229f8e886775561 to your computer and use it in GitHub Desktop.
build_librdkafka_mac_m1.sh
brew install openssl
brew install zstd
git clone [email protected]:edenhill/librdkafka.git
cd librdkafka
git checkout v1.5.0
CPPFLAGS="-I/opt/homebrew/opt/openssl@3/include -I/opt/homebrew/Cellar/zstd/1.5.2/include" LDFLAGS="-L/opt/homebrew/opt/openssl@3/lib -L/opt/homebrew/Cellar/zstd/1.5.2/lib" ./configure --prefix=$HOME/Temp/librdkafka-v1.5.0
cp examples/Makefile examples/Makefile.bak
sed -i '' -e 's/librdkafka.a/librdkafka.1.dylib/g' examples/Makefile
sed -i '' -e 's/librdkafka++.a/librdkafka++.1.dylib/g' examples/Makefile
make
make install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment