From 1e5000c9b2b6d705aedcb3cd3d0b012c933c0968 Mon Sep 17 00:00:00 2001 From: "yongkang.zhong" Date: Mon, 8 May 2023 14:05:33 +0800 Subject: [PATCH] [typo](docs) fix err to mac local dev doc (#19367) --- .../developer-guide/mac-dev/dev-prepare.md | 155 +++++++++-------- .../developer-guide/mac-dev/dev-prepare.md | 160 +++++++++--------- 2 files changed, 157 insertions(+), 158 deletions(-) diff --git a/docs/en/community/developer-guide/mac-dev/dev-prepare.md b/docs/en/community/developer-guide/mac-dev/dev-prepare.md index 54f59427c5..7ffefcce22 100644 --- a/docs/en/community/developer-guide/mac-dev/dev-prepare.md +++ b/docs/en/community/developer-guide/mac-dev/dev-prepare.md @@ -26,118 +26,117 @@ under the License. ## Install environment dependency - ``` - brew install automake autoconf libtool pkg-config texinfo coreutils gnu-getopt \ - python@3 cmake ninja ccache bison byacc gettext wget pcre maven llvm@16 openjdk@8 npm - ``` +```shell +brew install automake autoconf libtool pkg-config texinfo coreutils gnu-getopt \ +python@3 cmake ninja ccache bison byacc gettext wget pcre maven llvm@16 openjdk@8 npm +``` - **Dependency description:** - 1. Java, Maven, etc. can be downloaded separately for easy management - - Mac recommend [Zulu JDK8](https://www.azul.com/downloads/?version=java-8-lts&os=macos&package=jdk#zulu) - - Maven Download from [Maven website](https://maven.apache.org/download.cgi) is ok +**Dependency description:** +1. Java, Maven, etc. can be downloaded separately for easy management + - Mac recommend [Zulu JDK8](https://www.azul.com/downloads/?version=java-8-lts&os=macos&package=jdk#zulu) + - Maven Download from [Maven website](https://maven.apache.org/download.cgi) is ok - Self-downloaded Java and Maven need to configure environment variables - 2. Other dependent environment variables (example for Apple Silicon Macs) - - llvm: `export PATH="/opt/homebrew/opt/llvm/bin:$PATH"` - - bison: `export PATH = "/opt/homebrew/opt/bison/bin:$PATH` - - texinfo: `export PATH = "/opt/homebrew/opt/texinfo/bin:$PATH` - - python: `ln -s -f /opt/homebrew/bin/python3 /opt/homebrew/bin/python` +2. Other dependent environment variables (example for Apple Silicon Macs) + - llvm: `export PATH="/opt/homebrew/opt/llvm/bin:$PATH"` + - bison: `export PATH = "/opt/homebrew/opt/bison/bin:$PATH` + - texinfo: `export PATH = "/opt/homebrew/opt/texinfo/bin:$PATH` + - python: `ln -s -f /opt/homebrew/bin/python3 /opt/homebrew/bin/python` ## Install thrift - **Note:** Thrift needs to be installed only when debugging FE only. When debugging BE and FE at the same time, the three-party library of BE contains thrift +**Note:** Thrift needs to be installed only when debugging FE only. When debugging BE and FE at the same time, the three-party library of BE contains thrift - ``` - MacOS: - 1. Download:`brew install thrift@0.16.0` - 2. Create a soft link: - `mkdir -p ./thirdparty/installed/bin` - # Apple Silicon 芯片 macOS - `ln -s /opt/homebrew/Cellar/thrift@0.16.0/0.16.0/bin/thrift ./thirdparty/installed/bin/thrift` - # Intel 芯片 macOS - `ln -s /usr/local/Cellar/thrift@0.16.0/0.16.0/bin/thrift ./thirdparty/installed/bin/thrift` +```shell +MacOS: + 1. Download:`brew install thrift@0.16.0` + 2. Create a soft link: + `mkdir -p ./thirdparty/installed/bin` + # Apple Silicon CPU macOS + `ln -s /opt/homebrew/Cellar/thrift@0.16.0/0.16.0/bin/thrift ./thirdparty/installed/bin/thrift` + # Intel CPU macOS + `ln -s /usr/local/Cellar/thrift@0.16.0/0.16.0/bin/thrift ./thirdparty/installed/bin/thrift` - Note:macOS implement `brew install thrift@0.16.0` it may report an error that the version cannot be found. The solution is as follows, execute in the terminal: - 1. `brew tap-new $USER/local-tap` - 2. `brew extract --version='0.16.0' thrift $USER/local-tap` - 3. `brew install thrift@0.16.0` - reference link: `https://gist.github.com/tonydeng/02e571f273d6cce4230dc8d5f394493c` - ``` +Note:macOS implement `brew install thrift@0.16.0` it may report an error that the version cannot be found. The solution is as follows, execute in the terminal: + 1. `brew tap-new $USER/local-tap` + 2. `brew extract --version='0.16.0' thrift $USER/local-tap` + 3. `brew install thrift@0.16.0` +reference link: `https://gist.github.com/tonydeng/02e571f273d6cce4230dc8d5f394493c` +``` ## pull your own code - 1. pull code +1. pull code - ``` - cd ~ - mkdir DorisDev - cd DorisDev - git clone https://github.com/GitHubID/doris.git - ``` + ```shell + cd ~ + mkdir DorisDev + cd DorisDev + git clone https://github.com/GitHubID/doris.git + ``` - 2. set environment variables +2. set environment variables - ``` - export DORIS_HOME=~/DorisDev/doris - export PATH=$DORIS_HOME/bin:$PATH - ``` + ```shell + export DORIS_HOME=~/DorisDev/doris + export PATH=$DORIS_HOME/bin:$PATH + ``` ## Download Doris compilation dependencies - 1. The [Apache Doris Third Party Prebuilt](https://github.com/apache/doris-thirdparty/releases/tag/automation) page contains the source code of all third-party libraries. You can download [doris-thirdparty-source.tgz](https://github.com/apache/doris-thirdparty/releases/download/automation/doris-thirdparty-source.tgz) to obtain them. +1. The [Apache Doris Third Party Prebuilt](https://github.com/apache/doris-thirdparty/releases/tag/automation) page contains the source code of all third-party libraries. You can download [doris-thirdparty-source.tgz](https://github.com/apache/doris-thirdparty/releases/download/automation/doris-thirdparty-source.tgz) to obtain them. - 2. You can download the _**precompiled**_ third party library from the [Apache Doris Third Party Prebuilt](https://github.com/apache/doris-thirdparty/releases/tag/automation) page. You may refer to the following commands: - ```shell - cd thirdparty - rm -rf installed +2. You can download the _**precompiled**_ third party library from the [Apache Doris Third Party Prebuilt](https://github.com/apache/doris-thirdparty/releases/tag/automation) page. You may refer to the following commands: + ```shell + cd thirdparty + 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 - + # 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 - + # 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. - cd installed/bin + # Make sure that protoc and thrift can run successfully. + cd installed/bin - ./protoc --version - ./thrift --version - ``` - 3. When running `protoc` or `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 Anyway` button in the `General` pane to confirm your intent to open the app. See [https://support.apple.com/en-us/HT202491](https://support.apple.com/en-us/HT202491). + ./protoc --version + ./thrift --version + ``` +3. When running `protoc` or `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 Anyway` button in the `General` pane to confirm your intent to open the app. See [https://support.apple.com/en-us/HT202491](https://support.apple.com/en-us/HT202491). ## Set `file descriptors` - ``` - # bash - echo 'ulimit -n 65536' >>~/.bashrc +```shell +# bash +echo 'ulimit -n 65536' >>~/.bashrc - # zsh - echo 'ulimit -n 65536' >>~/.zshrc - ``` +# zsh +echo 'ulimit -n 65536' >>~/.zshrc +``` ## compile Doris - ``` - cd $DORIS_HOME - sh build.sh - ``` +```shell +cd $DORIS_HOME +sh build.sh +``` ## Configure Debug environment - ``` - # cp out the compiled package +```shell +# cp out the compiled package - cp -r output ../doris-run +cp -r output ../doris-run - # Configure FE/BE's conf - 1、IP、directory - 2、BE additional configuration min_file_descriptor_number = 10000 - ``` +# Configure FE/BE's conf +1、IP、directory +2、BE additional configuration min_file_descriptor_number = 10000 +``` ## Start Debugging with IDE - [CLion Debug BE On Mac](./be-clion-dev.md) +[CLion Debug BE On Mac](./be-clion-dev.md) - [IntelliJ IDEA Debug FE On Mac](./fe-idea-dev.md) - \ No newline at end of file +[IntelliJ IDEA Debug FE On Mac](./fe-idea-dev.md) diff --git a/docs/zh-CN/community/developer-guide/mac-dev/dev-prepare.md b/docs/zh-CN/community/developer-guide/mac-dev/dev-prepare.md index e0a5f5cff6..1e2c707bba 100644 --- a/docs/zh-CN/community/developer-guide/mac-dev/dev-prepare.md +++ b/docs/zh-CN/community/developer-guide/mac-dev/dev-prepare.md @@ -26,118 +26,118 @@ under the License. ## 安装环境依赖 - ``` - brew install automake autoconf libtool pkg-config texinfo coreutils gnu-getopt \ - python@3 cmake ninja ccache bison byacc gettext wget pcre maven llvm@16 openjdk@8 npm - ``` +```shell +brew install automake autoconf libtool pkg-config texinfo coreutils gnu-getopt \ +python@3 cmake ninja ccache bison byacc gettext wget pcre maven llvm@16 openjdk@8 npm +``` - **依赖说明:** - 1. Java、Maven 等可以单独下载,方便管理 - - Mac 推荐 [Zulu JDK8](https://www.azul.com/downloads/?version=java-8-lts&os=macos&package=jdk#zulu) - - Maven 从 [Maven 官网下载](https://maven.apache.org/download.cgi)即可 - - 自行下载的 Java 与 Maven 需要配置环境变量 - 2. 其他依赖的环境变量 (示例为 Apple Silicon 芯片 Mac) - - llvm: `export PATH="/opt/homebrew/opt/llvm/bin:$PATH"` - - bison: `export PATH = "/opt/homebrew/opt/bison/bin:$PATH` - - texinfo: `export PATH = "/opt/homebrew/opt/texinfo/bin:$PATH` - - python: `ln -s -f /opt/homebrew/bin/python3 /opt/homebrew/bin/python` +**依赖说明:** +1. Java、Maven 等可以单独下载,方便管理 + - Mac 推荐 [Zulu JDK8](https://www.azul.com/downloads/?version=java-8-lts&os=macos&package=jdk#zulu) + - Maven 从 [Maven 官网下载](https://maven.apache.org/download.cgi)即可 + - 自行下载的 Java 与 Maven 需要配置环境变量 +2. 其他依赖的环境变量 (示例为 Apple Silicon 芯片 Mac) + - llvm: `export PATH="/opt/homebrew/opt/llvm/bin:$PATH"` + - bison: `export PATH = "/opt/homebrew/opt/bison/bin:$PATH` + - texinfo: `export PATH = "/opt/homebrew/opt/texinfo/bin:$PATH` + - python: `ln -s -f /opt/homebrew/bin/python3 /opt/homebrew/bin/python` ## 安装 thrift - **注意:** 仅在只调试FE的情况下需要安装 thrift,同时调试 BE 和 FE 时,BE 的三方库包含 thrift +**注意:** 仅在只调试FE的情况下需要安装 thrift,同时调试 BE 和 FE 时,BE 的三方库包含 thrift - ``` - MacOS: - 1. 下载:`brew install thrift@0.16.0` - 2. 建立软链接: - `mkdir -p ./thirdparty/installed/bin` - # Apple Silicon 芯片 macOS - `ln -s /opt/homebrew/Cellar/thrift@0.16.0/0.16.0/bin/thrift ./thirdparty/installed/bin/thrift` - # Intel 芯片 macOS - `ln -s /usr/local/Cellar/thrift@0.16.0/0.16.0/bin/thrift ./thirdparty/installed/bin/thrift` - - 注:macOS 执行 `brew install thrift@0.16.0` 可能会报找不到版本的错误,解决方法如下,在终端执行: - 1. `brew tap-new $USER/local-tap` - 2. `brew extract --version='0.16.0' thrift $USER/local-tap` - 3. `brew install thrift@0.16.0` - 参考链接: `https://gist.github.com/tonydeng/02e571f273d6cce4230dc8d5f394493c` - ``` +```shell +MacOS: + 1. 下载:`brew install thrift@0.16.0` + 2. 建立软链接: + `mkdir -p ./thirdparty/installed/bin` + # Apple Silicon 芯片 macOS + `ln -s /opt/homebrew/Cellar/thrift@0.16.0/0.16.0/bin/thrift ./thirdparty/installed/bin/thrift` + # Intel 芯片 macOS + `ln -s /usr/local/Cellar/thrift@0.16.0/0.16.0/bin/thrift ./thirdparty/installed/bin/thrift` + +注:macOS 执行 `brew install thrift@0.16.0` 可能会报找不到版本的错误,解决方法如下,在终端执行: + 1. `brew tap-new $USER/local-tap` + 2. `brew extract --version='0.16.0' thrift $USER/local-tap` + 3. `brew install thrift@0.16.0` +参考链接: `https://gist.github.com/tonydeng/02e571f273d6cce4230dc8d5f394493c` +``` ## 拉取自己的代码 - 1. 拉取代码 +1. 拉取代码 - ``` - cd ~ - mkdir DorisDev - cd DorisDev - git clone https://github.com/GitHubID/doris.git - ``` + ```shell + cd ~ + mkdir DorisDev + cd DorisDev + git clone https://github.com/GitHubID/doris.git + ``` - 2. 设置环境变量 +2. 设置环境变量 - ``` - export DORIS_HOME=~/DorisDev/doris - export PATH=$DORIS_HOME/bin:$PATH - ``` + ```shell + export DORIS_HOME=~/DorisDev/doris + export PATH=$DORIS_HOME/bin:$PATH + ``` ## 下载 Doris 编译依赖 - 1. [Apache Doris Third Party Prebuilt](https://github.com/apache/doris-thirdparty/releases/tag/automation)页面有所有第三方库的源码,可以直接下载[doris-thirdparty-source.tgz](https://github.com/apache/doris-thirdparty/releases/download/automation/doris-thirdparty-source.tgz)获得。 +1. [Apache Doris Third Party Prebuilt](https://github.com/apache/doris-thirdparty/releases/tag/automation)页面有所有第三方库的源码,可以直接下载[doris-thirdparty-source.tgz](https://github.com/apache/doris-thirdparty/releases/download/automation/doris-thirdparty-source.tgz)获得。 - 2. 可以在[Apache Doris Third Party Prebuilt](https://github.com/apache/doris-thirdparty/releases/tag/automation)页面直接下载预编译好的第三方库,省去编译第三方库的过程,参考下面的命令。 - ```shell - cd thirdparty - rm -rf installed +2. 可以在[Apache Doris Third Party Prebuilt](https://github.com/apache/doris-thirdparty/releases/tag/automation)页面直接下载预编译好的第三方库,省去编译第三方库的过程,参考下面的命令。 + + ```shell + cd thirdparty + rm -rf installed - # Intel 芯片 - curl -L https://github.com/apache/doris-thirdparty/releases/download/automation/doris-thirdparty-prebuilt-darwin-x86_64.tar.xz \ - -o - | tar -Jxf - + # Intel 芯片 + curl -L https://github.com/apache/doris-thirdparty/releases/download/automation/doris-thirdparty-prebuilt-darwin-x86_64.tar.xz \ + -o - | tar -Jxf - - # Apple Silicon 芯片 - curl -L https://github.com/apache/doris-thirdparty/releases/download/automation/doris-thirdparty-prebuilt-darwin-arm64.tar.xz \ - -o - | tar -Jxf - + # Apple Silicon 芯片 + curl -L https://github.com/apache/doris-thirdparty/releases/download/automation/doris-thirdparty-prebuilt-darwin-arm64.tar.xz \ + -o - | tar -Jxf - - # 保证protoc和thrift能够正常运行 - cd installed/bin + # 保证protoc和thrift能够正常运行 + cd installed/bin - ./protoc --version - ./thrift --version - ``` - 3. 运行`protoc`和`thrift`的时候可能会遇到**无法打开,因为无法验证开发者**的问题,可以到前往`安全性与隐私`。点按`通用`面板中的`仍要打开`按钮,以确认打算打开该二进制。参考[https://support.apple.com/zh-cn/HT202491](https://support.apple.com/zh-cn/HT202491)。 + ./protoc --version + ./thrift --version + ``` +3. 运行`protoc`和`thrift`的时候可能会遇到**无法打开,因为无法验证开发者**的问题,可以到前往`安全性与隐私`。点按`通用`面板中的`仍要打开`按钮,以确认打算打开该二进制。参考[https://support.apple.com/zh-cn/HT202491](https://support.apple.com/zh-cn/HT202491)。 ## 修改系统最大文件句柄数 - ``` - # bash - echo 'ulimit -n 65536' >>~/.bashrc +```shell +# bash +echo 'ulimit -n 65536' >>~/.bashrc - # zsh - echo 'ulimit -n 65536' >>~/.zshrc - ``` +# zsh +echo 'ulimit -n 65536' >>~/.zshrc +``` ## 编译 Doris - ``` - cd $DORIS_HOME - sh build.sh - ``` +```shell +cd $DORIS_HOME +sh build.sh +``` ## 配置 Debug 环境 - ``` - # 将编译好的包cp出来 +```shell +# 将编译好的包cp出来 - cp -r output ../doris-run +cp -r output ../doris-run - # 配置FE/BE的conf - 1、IP、目录 - 2、BE 额外配置 min_file_descriptor_number = 10000 - ``` +# 配置FE/BE的conf +1、IP、目录 +2、BE 额外配置 min_file_descriptor_number = 10000 +``` ## 开始用 IDE 进行 Debug - [CLion Mac 调试 BE](./be-clion-dev.md) +[CLion Mac 调试 BE](./be-clion-dev.md) - [IntelliJ IDEA Mac 调试 FE](./fe-idea-dev.md) - \ No newline at end of file +[IntelliJ IDEA Mac 调试 FE](./fe-idea-dev.md)