Skip to main content

Build Tools

Many development tools and language runtimes compile native dependencies during installation. This guide covers the essential system libraries and compilers for each platform.

Installation​

Xcode Command Line Tools​

Install the base toolchain (includes git, clang, make):

xcode-select --install

Additional Libraries​

Install supplementary development libraries via Homebrew:

brew install openssl@3 pkg-config cmake gcc

Apple Silicon OpenSSL Configuration​

Apple Silicon Macs need explicit OpenSSL paths. Add these to your shell profile (~/.zshrc):

echo 'export OPENSSL_DIR=/opt/homebrew/opt/openssl@3' >> ~/.zshrc
echo 'export PKG_CONFIG_PATH=/opt/homebrew/opt/openssl@3/lib/pkgconfig:$PKG_CONFIG_PATH' >> ~/.zshrc
echo 'export LDFLAGS="-L/opt/homebrew/opt/openssl@3/lib $LDFLAGS"' >> ~/.zshrc
echo 'export CPPFLAGS="-I/opt/homebrew/opt/openssl@3/include $CPPFLAGS"' >> ~/.zshrc
source ~/.zshrc

Without these, you will get compilation errors from tools that link against OpenSSL.

Verification​

pkg-config --modversion openssl
gcc --version
cmake --version

Troubleshooting​

macOS: "Could not find directory of OpenSSL installation"​

Verify the environment variables are set:

echo $OPENSSL_DIR
echo $PKG_CONFIG_PATH

If empty, re-add the exports above and run source ~/.zshrc.

Windows: "Compiler not found"​

Restart your terminal after installing Build Tools. If the issue persists, launch the Developer Command Prompt or Developer PowerShell from the Start menu.

Linux: Package installation fails​

Run sudo apt update (Debian/Ubuntu) or sudo dnf update (Fedora/RHEL) first, then retry.