Compilation on Windows

This topic is about how to compile Doris from source with Windows.

Environment Requirements

  1. Windows 11 or Windows 10, Version 1903, Build 18362 or newer
  2. Normal-functioning WSL2

Steps

  1. Install the Oracle Linux 7.9 distribution from the Microsoft Store

    You can also install other distros you want via Docker images or Github installs

  2. Open CMD and specify the identity to run WSL2

    1. wsl -d OracleLinux_7_9 -u root
  3. Install dependencies

    1. # Install required system packages
    2. sudo yum install -y byacc patch automake libtool make which file ncurses-devel gettext-devel unzip bzip2 zip util-linux wget git python2
    3. # Install autoconf-2.69
    4. wget http://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz && \
    5. tar zxf autoconf-2.69.tar.gz && \
    6. cd autoconf-2.69 && \
    7. ./configure && \
    8. make && \
    9. make install
    10. # install bison-3.0.4
    11. wget http://ftp.gnu.org/gnu/bison/bison-3.0.4.tar.gz && \
    12. tar xzf bison-3.0.4.tar.gz && \
    13. cd bison-3.0.4 && \
    14. ./configure && \
    15. make && \
    16. make install
  4. Install LDB_TOOLCHAIN and other major compilation environments

  5. Configure environment variables

  6. Pull Doris source code

    1. git clone http://github.com/apache/doris.git
  7. Compile

    1. cd doris
    2. sh build.sh

Note

The default data storage drive letter of WSL2 distribution is the C drive. If necessary, you can change that to prevent the system drive letter from getting full.