This document describes how to install dependencies, compile from source, run, and prepare for local debugging of Apache Doris on macOS (Intel and Apple Silicon).
:::tip Compute-storage decoupled mode compilation and deployment is not yet supported on macOS. :::
Install the base dependencies with Homebrew:
brew install automake autoconf libtool pkg-config texinfo coreutils gnu-getopt \ python@3 cmake ninja ccache bison byacc gettext wget pcre maven llvm@20 openjdk@17 npm
The arm64 version of brew on macOS does not include JDK 8 by default, so
openjdk@17is recommended. If you need JDK 8, install Zulu JDK 8 manually. Maven can also be downloaded separately from the Maven website and configured via environment variables.
Some dependencies on Apple Silicon also require manual environment variable configuration:
export PATH="/opt/homebrew/opt/llvm/bin:$PATH" export PATH="/opt/homebrew/opt/bison/bin:$PATH" export PATH="/opt/homebrew/opt/texinfo/bin:$PATH" ln -s -f /opt/homebrew/bin/python3 /opt/homebrew/bin/python
cd ~ mkdir DorisDev && cd DorisDev git clone https://github.com/apache/doris.git export DORIS_HOME=~/DorisDev/doris export PATH=$DORIS_HOME/bin:$PATH
Thrift only needs to be installed separately when debugging FE alone. When debugging both BE and FE, the BE third-party libraries already include Thrift.
brew install thrift@0.16.0 mkdir -p ./thirdparty/installed/bin # Apple Silicon ln -s /opt/homebrew/Cellar/thrift@0.16.0/0.16.0/bin/thrift ./thirdparty/installed/bin/thrift # Intel ln -s /usr/local/Cellar/thrift@0.16.0/0.16.0/bin/thrift ./thirdparty/installed/bin/thrift
If brew install thrift@0.16.0 reports that the version cannot be found, handle it as follows:
brew tap homebrew/core --force brew tap-new $USER/local-tap brew extract --version='0.16.0' thrift $USER/local-tap brew install thrift@0.16.0
Reference: https://gist.github.com/tonydeng/02e571f273d6cce4230dc8d5f394493c
You can directly download the prebuilt third-party libraries provided by the community, which skips the process of compiling the third-party libraries:
cd thirdparty rm -rf installed # Intel chip curl -L https://github.com/apache/doris-thirdparty/releases/download/automation/doris-thirdparty-prebuilt-darwin-x86_64.tar.xz \ -o - | tar -Jxf - # Apple Silicon chip curl -L https://github.com/apache/doris-thirdparty/releases/download/automation/doris-thirdparty-prebuilt-darwin-arm64.tar.xz \ -o - | tar -Jxf - # Verify that protoc and thrift run correctly cd installed/bin ./protoc --version ./thrift --version
When running
protocandthrift, if you see a prompt cannot be opened because the developer cannot be verified, go toSecurity & Privacy → Generaland clickOpen Anyway. Reference: https://support.apple.com/zh-cn/HT202491
You can also download the third-party library source doris-thirdparty-source.tgz from the Apache Doris Third Party Prebuilt page and compile it yourself.
ulimit -n 65536 # Write to the startup script so it takes effect automatically next time the terminal opens # bash echo 'ulimit -n 65536' >>~/.bashrc # zsh echo 'ulimit -n 65536' >>~/.zshrc
cd $DORIS_HOME bash build.sh
cd output/be/bin && ./start_be.sh --daemon cd output/fe/bin && ./start_fe.sh --daemon
# Copy the build output to use as the runtime directory cp -r output ../doris-run
Then modify the following in the FE / BE conf:
min_file_descriptor_number = 10000 in BENext, configure debugging in your IDE:
Error message:
opensslErrorStack: ['error:03000086:digital envelope routines::initialization error'] library: 'digital envelope routines' reason: 'unsupported' code: 'ERR_OSSL_EVP_UNSUPPORTED'
Solution:
export NODE_OPTIONS=--openssl-legacy-provider