-
Notifications
You must be signed in to change notification settings - Fork 216
docs: add macOS build guide and prerequisites #136
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
dengfuping
wants to merge
1
commit into
oceanbase:develop
Choose a base branch
from
dengfuping:macos-build-docs
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,7 +4,7 @@ To build OceanBase seekdb from source code, you need to install the C++ toolchai | |
|
|
||
| ## Supported OS | ||
|
|
||
| OceanBase makes strong assumption on the underlying operating systems. Not all the operating systems are supported; especially, Windows and Mac OS X are not supported yet. | ||
| OceanBase makes strong assumption on the underlying operating systems. Not all the operating systems are supported; especially, Windows is not supported yet. | ||
|
|
||
| Below is the OS compatibility list: | ||
|
|
||
|
|
@@ -23,10 +23,12 @@ Below is the OS compatibility list: | |
| | SUSE | 15.2 | x86_84 / aarch64 | Yes | Yes | Yes | Yes | | ||
| | Ubuntu | 20.04 / 22.04 / 24.04 | x86_84 / aarch64 | Yes | Yes | Yes | Yes | | ||
| | UOS | 20 | x86_84 / aarch64 | Yes | Yes | Yes | Yes | | ||
| | macOS | 12.0+ (Monterey+) | x86_64 / arm64 | Yes* | Yes | Yes | Limited | | ||
|
|
||
| > **Note**: | ||
| > | ||
| > Other Linux distributions _may_ work. If you verify that OceanBase seekdb can compile and deploy on a distribution except ones listed above, feel free to submit a pull request to add it. | ||
| > - Other Linux distributions _may_ work. If you verify that OceanBase seekdb can compile and deploy on a distribution except ones listed above, feel free to submit a pull request to add it. | ||
| > - macOS support is experimental and tested on both Intel (x86_64) and Apple Silicon (arm64) architectures. Some features may have limitations compared to Linux builds. | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. only Apple Silicon now |
||
|
|
||
| ## Installation | ||
|
|
||
|
|
@@ -61,3 +63,54 @@ This includes SUSE, openSUSE, etc. | |
| ```shell | ||
| zypper install git wget rpm cpio make glibc-devel binutils m4 python3 | ||
| ``` | ||
|
|
||
| ### macOS | ||
|
|
||
| For macOS development, you need to install Homebrew first if it's not already installed: | ||
|
|
||
| ```shell | ||
| /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" | ||
| ``` | ||
|
|
||
| Then install the required dependencies: | ||
|
|
||
| ```shell | ||
| # Install essential build tools and libraries | ||
| brew install zstd googletest utf8proc thrift re2 brotli bzip2 | ||
|
|
||
| # Note: bzip2 is keg-only (not symlinked), but macOS usually provides a system version | ||
| # that should work for linking purposes. | ||
| ``` | ||
|
|
||
| **Required dependencies for macOS:** | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. also need cmake |
||
| - `zstd` - Compression library required by the build toolchain | ||
| - `googletest` - Google Test framework for unit tests (includes GTest and GMock) | ||
| - `utf8proc` - UTF-8 processing library (dependency of Apache Arrow on macOS) | ||
| - `thrift` - Apache Thrift (dependency of Apache Arrow on macOS) | ||
| - `re2` - Regular expression library (dependency of Apache Arrow on macOS) | ||
| - `brotli` - Compression library (dependency of Apache Arrow on macOS) | ||
| - `bzip2` - Compression library (dependency of Apache Arrow on macOS) | ||
|
|
||
| **Additional notes:** | ||
| - The build system will automatically download and use the OceanBase development toolchain (LLVM, Bison, Flex) from the dependency packages. | ||
| - Make sure you have Xcode Command Line Tools installed: | ||
| ```shell | ||
| xcode-select --install | ||
| ``` | ||
|
|
||
| **Common macOS build issues and solutions:** | ||
|
|
||
| If you encounter build errors on macOS, here are common issues and their solutions: | ||
|
|
||
| - **Error: `library 'utf8proc' not found`**: Make sure you've installed all required dependencies via Homebrew. Run `brew install utf8proc thrift re2 brotli` if you haven't already. | ||
|
|
||
| - **Error: `Could NOT find GTest`**: Install googletest via `brew install googletest`. | ||
|
|
||
| - **Error: `Library not loaded: libzstd.1.dylib`**: Install zstd via `brew install zstd`. | ||
|
|
||
| - **Error: `Cannot find source file: ftsblex_lex.c`**: This usually happens if parser files were deleted but the cache file (`_MD5`) still exists. Delete the cache files and rebuild: | ||
| ```shell | ||
| rm src/sql/parser/_MD5 | ||
| rm src/pl/parser/_MD5 | ||
| ``` | ||
| Then run the build again. The build system will automatically regenerate the parser files. | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
13+