doc/BUILD-MACOS.md
This guide provides step-by-step instructions for compiling ProxySQL from source on macOS (Intel or Apple Silicon) using Homebrew.
Ensure you have Homebrew installed.
Run the following command to install the required build tools and libraries:
brew install automake bzip2 cmake make git gpatch gnutls openssl@3 icu4c pkg-config libiconv zlib
To compile ProxySQL, you must set the following environment variables so the build system can locate OpenSSL and other Homebrew-provided libraries.
export PATH="/opt/homebrew/bin:$PATH"
export PKG_CONFIG_PATH="/opt/homebrew/opt/openssl@3/lib/pkgconfig:$PKG_CONFIG_PATH"
export OPENSSL_ROOT_DIR="/opt/homebrew/opt/openssl@3"
You can now run the standard build command:
make
Or for a debug build:
make debug
If the linker fails to find libssl or libcrypto, ensure that OPENSSL_ROOT_DIR and PKG_CONFIG_PATH are correctly set to point to your Homebrew OpenSSL installation.
The build system is configured to find icu4c via Homebrew. If you encounter errors related to ICU, ensure icu4c is installed and the Homebrew prefix is correct.
If you wish to run the TAP tests, you need to build the test dependencies first:
export OPENSSL_ROOT_DIR=$(brew --prefix openssl@3)
make build_tap_test_debug
This will automatically: