Compile With macOS
This topic is about how to compile Doris from source with macOS (both x86_64 and arm64).
- macOS 12 (Monterey) or newer（both Intel chip and Apple Silicon chips are supported）
Use Homebrew to install dependencies.
brew install automake autoconf libtool pkg-config texinfo coreutils gnu-getopt \
python@3 cmake ninja ccache bison byacc gettext wget pcre maven llvm@15 openjdk@8 npm
Compile from source.
You can download the precompiled third party library from the Apache Doris Third Party Prebuilt page. You may refer to the following commands:
rm -rf installed
# Intel chips
curl -L https://github.com/apache/doris-thirdparty/releases/download/automation/doris-thirdparty-prebuilt-darwin-x86_64.tar.xz \
-o - | tar -Jxf -
# Apple Silicon chips
curl -L https://github.com/apache/doris-thirdparty/releases/download/automation/doris-thirdparty-prebuilt-darwin-arm64.tar.xz \
-o - | tar -Jxf -
# Make sure that protoc and thrift can run successfully.
thrift, you may meet an error which says the app can not be opened because the developer cannot be verified. Go to
Security & Privacy. Click the
Open Anywaybutton in the
Generalpane to confirm your intent to open the app. See https://support.apple.com/en-us/HT202491.
file descriptors（NOTICE: If you have closed the current session, you need to set this variable again）。
ulimit -n 65536
You can also write this configuration into the initialization files so you don't need to set the variables again when opening a new terminal session.
echo 'ulimit -n 65536' >>~/.bashrc
echo 'ulimit -n 65536' >>~/.zshrc
Check if the configuration works by executing the following command.
$ ulimit -n
Start BE up
Start FE up
Fail to start BE up. The log shows:
fail to open StorageEngine, res=file descriptors limit is too small
To fix this, please refer to the "Start-up" section above and reset
Java 8 is recommended.