When installing python requirements from requirements.txt file, there were several packages that required different values in LDFLAGS/CPPFLAGS.
first, I got this when installing mysql-client:
ld: library not found for -lzstd
I solved it by running the pip install like this:
CPPFLAGS="-I/opt/homebrew/include" LDFLAGS="-L/opt/homebrew/lib" pip install mysqlclient
than, I had this issue when installing cryptography:
build/temp.macosx-10.14-arm64-3.8/_openssl.c:575:10: fatal error: 'openssl/opensslv.h' file not found
#include <openssl/opensslv.h>
Solved it by installing it like this:
CPPFLAGS="-I/opt/homebrew/opt/openssl@1.1/include" LDFLAGS="-L/opt/homebrew/opt/openssl@1.1/lib" pip install cryptography
My question is - what is going on here? I want to keep LDFLAGS/CPPFLAGS values in my .zshrc but seems that for every package I need diferent values there?? When working on my old mac I remember that the values were
export LDFLAGS="-L/opt/homebrew/opt/mysql-client/lib"
export CPPFLAGS="-I/opt/homebrew/opt/mysql-client/include"
which are the values that are suggested to you by brew after you brew install mysql-client.