From c81a3bfe1b2ab65f1d47f099ca99ecfb607a476a Mon Sep 17 00:00:00 2001 From: FreeOnePlus <54164178+FreeOnePlus@users.noreply.github.com> Date: Thu, 22 Dec 2022 10:16:58 +0800 Subject: [PATCH] [docs](compile)Add Windows compilation documentation (#15253) Add Windows compilation documentation --- .../install/source-install/compilation-win.md | 94 +++++++++++++++++++ docs/sidebars.json | 1 + .../install/source-install/compilation-win.md | 94 +++++++++++++++++++ 3 files changed, 189 insertions(+) create mode 100644 docs/en/docs/install/source-install/compilation-win.md create mode 100644 docs/zh-CN/docs/install/source-install/compilation-win.md diff --git a/docs/en/docs/install/source-install/compilation-win.md b/docs/en/docs/install/source-install/compilation-win.md new file mode 100644 index 0000000000..6eaf0b8c31 --- /dev/null +++ b/docs/en/docs/install/source-install/compilation-win.md @@ -0,0 +1,94 @@ +--- +{ + "title": "Compilation on Windows", + "language": "en" +} +--- + + + +# Compile on Windows platform + +This article describes how to compile the source code on the Windows platform + +## Environmental requirements + +1. Available in Windows 11 or Windows 10, Version 1903, Build 18362 or later +2. WSL2 can be used normally, and the steps to start WSL2 will not be repeated here + +## Compilation steps + +1. Install the Oracle Linux 7.9 distribution from the Microsoft Store + + > You can also install other desired distros via Docker images or Github installs + +2. Open CMD and specify the identity to run WSL2 + + ```shell + wsl -d OracleLinux_7_9 -u root + ``` + +3. Install dependencies + + ```shell + # install required system packages + sudo yum install -y byacc patch automake libtool make which file ncurses-devel gettext-devel unzip bzip2 zip util-linux wget git python2 + + # install autoconf-2.69 + wget http://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz && \ + tar zxf autoconf-2.69.tar.gz && \ + cd autoconf-2.69 && \ + ./configure && \ + make && \ + make install + + # install bison-3.0.4 + wget http://ftp.gnu.org/gnu/bison/bison-3.0.4.tar.gz && \ + tar xzf bison-3.0.4.tar.gz && \ + cd bison-3.0.4 && \ + ./configure && \ + make && \ + make install + ``` + +4. Install LDB_TOOLCHAIN and other major compilation environments + + - [Java8](https://doris-thirdparty-repo.bj.bcebos.com/thirdparty/jdk-8u131-linux-x64.tar.gz) + - [Apache Maven 3.6.3](https://doris-thirdparty-repo.bj.bcebos.com/thirdparty/apache-maven-3.6.3-bin.tar.gz) + - [Node v12.13.0](https://doris-thirdparty-repo.bj.bcebos.com/thirdparty/node-v12.13.0-linux-x64.tar.gz) + - [LDB_TOOLCHAIN](https://github.com/amosbird/ldb_toolchain_gen/releases/download/v0.14.2/ldb_toolchain_gen.sh) + +5. Configure environment variables + +6. Pull Doris source code + + ``` + git clone http://github.com/apache/doris.git + ``` + +7. Compile + + ``` + cd doris + sh build.sh + ``` +## Precautions + +The default WSL2 release version data storage drive letter is C drive, if necessary, switch the storage drive letter in advance to prevent the system drive letter from being full diff --git a/docs/sidebars.json b/docs/sidebars.json index f339f5ee55..527babe994 100644 --- a/docs/sidebars.json +++ b/docs/sidebars.json @@ -26,6 +26,7 @@ "install/source-install/compilation", "install/source-install/compilation-with-ldb-toolchain", "install/source-install/compilation-arm", + "install/source-install/compilation-win", "install/source-install/compilation-mac" ] }, diff --git a/docs/zh-CN/docs/install/source-install/compilation-win.md b/docs/zh-CN/docs/install/source-install/compilation-win.md new file mode 100644 index 0000000000..a2bfbddbcc --- /dev/null +++ b/docs/zh-CN/docs/install/source-install/compilation-win.md @@ -0,0 +1,94 @@ +--- +{ +"title": "在Windows平台上编译", +"language": "zh-CN" +} +--- + + + +# 在 Windows 平台上编译 + +本文介绍如何在 Windows 平台上编译源码 + +## 环境要求 + +1. Windows 11 或 Windows 10 版本 1903、内部版本 18362 或更高版本中可用 +2. 可正常使用 WSL2,WSL2 开启步骤不再在此赘述 + +## 编译步骤 + +1. 通过 Microsoft Store 安装 Oracle Linux 7.9 发行版 + + > 也可通过 Docker 镜像或 Github 安装方式安装其他想要的发行版 + +2. 打开 CMD,指定身份运行 WSL2 + + ```shell + wsl -d OracleLinux_7_9 -u root + ``` + +3. 安装依赖 + + ```shell + # install required system packages + sudo yum install -y byacc patch automake libtool make which file ncurses-devel gettext-devel unzip bzip2 zip util-linux wget git python2 + + # install autoconf-2.69 + wget http://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz && \ + tar zxf autoconf-2.69.tar.gz && \ + cd autoconf-2.69 && \ + ./configure && \ + make && \ + make install + + # install bison-3.0.4 + wget http://ftp.gnu.org/gnu/bison/bison-3.0.4.tar.gz && \ + tar xzf bison-3.0.4.tar.gz && \ + cd bison-3.0.4 && \ + ./configure && \ + make && \ + make install + ``` + +4. 安装 LDB_TOOLCHAIN 及其他主要编译环境 + + - [Java8](https://doris-thirdparty-repo.bj.bcebos.com/thirdparty/jdk-8u131-linux-x64.tar.gz) + - [Apache Maven 3.6.3](https://doris-thirdparty-repo.bj.bcebos.com/thirdparty/apache-maven-3.6.3-bin.tar.gz) + - [Node v12.13.0](https://doris-thirdparty-repo.bj.bcebos.com/thirdparty/node-v12.13.0-linux-x64.tar.gz) + - [LDB_TOOLCHAIN](https://github.com/amosbird/ldb_toolchain_gen/releases/download/v0.14.2/ldb_toolchain_gen.sh) + +5. 配置环境变量 + +6. 拉取 Doris 源码 + + ``` + git clone http://github.com/apache/doris.git + ``` + +7. 编译 + + ``` + cd doris + sh build.sh + ``` +## 注意事项 + +默认 WSL2 的发行版数据存储盘符为 C 盘,如有需要提前切换存储盘符,以防止系统盘符占满