PC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minuteTo compile Apache Doris successfully, first match the JDK and build toolchain to your Doris branch, then choose a build environment that fits your operating system, CPU architecture, and development workflow. For Backend (BE) debugging, build with suitable debug information and configure the runtime environment—including the Java path—before launching from your IDE.
Choose a build approach
Doris can be built directly on Linux, with the LDB toolchain, or using a Docker build image. The right choice depends on how current your host system is, whether you need storage-compute separation, and whether you are building for x86_64 or ARM64.
| Approach | Best fit | Tradeoffs and constraints |
|---|---|---|
| Direct Linux | A newer Linux distribution with a compatible system compiler and dependencies. | The official example uses Ubuntu 24.04 or an equivalent distribution. Older systems may have outdated GCC or glibc. See the direct Linux compilation guide. |
| LDB toolchain | A controlled build toolchain, particularly when the host compiler environment is inconvenient. | Use the LDB release that matches the Doris branch; a mismatch can cause ABI inconsistencies and link failures. See the LDB toolchain guide. |
| Docker build image | A quick setup when you want to avoid installing the toolchain and third-party libraries manually. | Docker is required, and the documented image is about 3.3 GB. This route does not yet support compilation and deployment for storage-compute separation. The latest LDB-toolchain image documented by Doris is x86_64-only; ARM64 users should use the ARM-specific instructions. See the Docker build guide. |
Before settling on an approach, check branch and JDK compatibility, host operating-system support, CPU architecture and AVX2 capability, dependency setup, storage-compute separation needs, and how you intend to debug the Backend.
Prepare the branch-matched toolchain
Do not assume one JDK or LDB version works for every Doris branch. The official direct-Linux guide, last updated May 17, 2026, specifies JDK 8 for Doris 2.1 and earlier, and JDK 17 for 3.0 and later or master. These are branch-specific instructions, not universal requirements for historical releases; consult the documentation for the exact branch you are building.
#1 Best Overall
For direct Linux builds, that guide uses Ubuntu 24.04 or an equivalent distribution as its example and lists GCC 10+, Python 2.7+, Maven 3.5+, CMake 3.19.2+, and Bison 3.0+. Check the current Linux build instructions for installation details and any changes.
Choose an LDB toolchain release
The LDB guide documents version 0.25 for master and 0.19 for branches 3.1, 3.0, and 2.1. That mapping can change, so verify it against the current guide and the branch you are building. Using a mismatched release may lead to ABI inconsistency or link failures.
The LDB approach uses precompiled third-party packages rather than building those dependencies from source, which can avoid a lengthy part of the build. The LDB instructions describe supported versions and build commands.
Check CPU compatibility and AVX2
AVX2 support is a compatibility setting, not merely a performance preference: a build configured for AVX2 may not run on a CPU that lacks those instructions. The direct-Linux guide shows checking CPU flags in /proc/cpuinfo. If AVX2 is unavailable, build without it:
USE_AVX2=0 sh build.sh
With the LDB route, the documentation also calls for no-AVX2 precompiled third-party libraries or compilation images when building without AVX2. Ensure the main build and its third-party artifacts agree; changing only the top-level build option may not be enough for that setup.
The standard documented build command is:
sh build.sh
For a Debug build, use:
BUILD_TYPE=Debug sh build.sh
These forms are documented for direct Linux and LDB builds. The Docker route uses versioned image tags, with the master tag tracking trunk and updated continuously; check the Docker guide for the appropriate image and current limitations.
Build Apache Doris from source
- Check out the intended Doris branch. Confirm its JDK requirement and, if applicable, its LDB toolchain mapping before installing or selecting build dependencies.
- Choose the environment. Use direct Linux for a compatible host, LDB for a controlled toolchain and precompiled dependencies, or Docker when its feature and architecture limits suit your needs.
- Confirm CPU compatibility. Check AVX2 support and select the no-AVX2 option and matching third-party artifacts where needed.
- Run the build. Use
sh build.sh, adding the documented environment variable for a no-AVX2 or Debug build as appropriate. - Inspect the output. Successful builds place artifacts under the
output/directory in the source root.
Fix common compilation failures
“Too many open files”
This error points to the process file-descriptor limit. The direct-Linux guide recommends raising the limit for the build shell:
ulimit -n 65536
Run the command in the same shell from which you start build.sh, then retry the build.
Ninja is killed, often with a signal
The Linux guide says a Ninja process killed with a signal usually indicates an out-of-memory failure. It advises at least 16 GB of memory or reducing build parallelism with -j. A lower parallel job count can reduce peak resource use, though it may lengthen the build.
Rank #4
“AVX2 not supported”
Check whether the target CPU supports AVX2. If it does not, use USE_AVX2=0 sh build.sh; with LDB, also use the no-AVX2 third-party libraries or compilation image specified by the guide. If the error persists, verify the artifacts and image match the build configuration.
The final failure message is vague
Look for the first compiler, configuration, or dependency error in the build log rather than treating the final failure line as the cause. Then check in order: branch and JDK match, toolchain version, CPU and AVX2 settings, and resource limits. This sequence is a practical way to narrow down the documented failure classes; it does not imply all failures share one cause.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Set up a Backend debugging loop
The Apache Doris CLion guide documents remote Linux development and local macOS development. For remote work, compile on Linux, configure CLion’s remote toolchain, load the CMake project, and set up a runtime using the environment variables in be/bin/start_be.sh as a reference.
The Tool Desk
Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Best Value
Configure the remote runtime
- Compile on the Linux environment. Keep the compiler and runtime environment aligned with the Doris branch and build configuration.
- Configure CLion’s remote toolchain for the Linux host, then load the Backend CMake project.
- Set the runtime environment variables using
be/bin/start_be.shas the reference. SetDORIS_JAVA_HOMEto the Java installation on the remote host; otherwise the build may not findjni.h. - Configure the run or debug target with the Backend executable and the required runtime environment, then launch it from CLion.
For the guide’s local macOS workflow and complete IDE setup details, use the CLion Backend development guide.
Build CMake unit tests when needed
CMake unit-test building is off by default in the documented CLion setup. Add -DMAKE_TEST=ON to enable it, then build the desired test target in the IDE.
Choose how much debug information to retain
The Doris build script documents two relevant choices. STRIP_DEBUG_INFO=ON stores Backend debug information separately in be/lib/debug_info. The DORIS_DEV_DEBUG_INFO setting controls debug-information detail: line-tables uses Clang’s -gline-tables-only, retaining line tables for stack traces while omitting variable-level DWARF; full requests full debug information. See the Doris build script for the documented settings.
Choose the level based on the debugging task: line tables support symbolized stack traces with less detail, while full information is the appropriate documented choice when variable-level debugging information is needed. Ensure the selected build configuration and the runtime you launch are the same ones you intend to inspect.
Quick wins for a faster PC:
Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Clear out junk files and repair common Windows errorsFree Scan →Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

