-
Notifications
You must be signed in to change notification settings - Fork 0
Building from source Linux
| Component | Minimum | Recommended |
|---|---|---|
| CPU | x86_64 4-core | x86_64 8-core |
| RAM | 8 GB | 16 GB |
| Disk | 20 GB free | 40 GB free |
| OS | Ubuntu 22.04 / Debian 12 | Ubuntu 24.04 |
| Git LFS | Required | — |
| Distribution | Package Format | CI |
|---|---|---|
| Debian trixie | .deb |
GitHub-hosted (container) |
| Fedora 42 | .rpm |
GitHub-hosted (container) |
| Ubuntu 22.04 LTS | AppImage + .deb
|
Self-hosted runner |
| Ubuntu 24.04 LTS | AppImage + .deb
|
Self-hosted runner |
| openSUSE Tumbleweed | AppImage + .rpm
|
Self-hosted (currently offline) |
| Arch Linux | AppImage + .pkg.tar.zst
|
Self-hosted (currently offline) |
git clone https://github.com/BenJule/BambuStudio.git
cd BambuStudio
# Install all required system packages (requires sudo)
sudo ./BuildLinux.sh -urThis installs: cmake, ninja-build, gcc, g++, git-lfs, libgtk-3-dev, libgl1-mesa-dev, libglu1-mesa-dev, libssl-dev, libcurl4-openssl-dev, libdbus-1-dev, gettext, nasm, fuse, and more.
git clone https://github.com/BenJule/BambuStudio.git
cd BambuStudio
git lfs pull # download binary assetsThis step takes ~60–90 minutes on first run. The result is cached in deps/build/destdir/ and only needs to be repeated when deps/CMakeLists.txt changes.
./BuildLinux.sh -dfr./BuildLinux.sh -sfrBuild time: ~30–60 min cold, ~5–10 min with ccache (if configured).
cd build && ./src/BuildLinuxImage.shThe binary is now at build/src/bambu-studio. Launch it:
./build/src/bambu-studio| Flag | Description |
|---|---|
-u |
Install system dependencies via apt/dnf |
-r |
Release build (optimized) |
-d |
Build third-party deps |
-s |
Build BambuStudio |
-i |
Build AppImage |
-p |
Build distribution package (.deb or .rpm) |
-f |
Force rebuild even if already done |
Flags can be combined: -dfr = deps + force + release.
./BuildLinux.sh -isfrOutput: ./build/BambuStudio_ubu64.AppImage
./BuildLinux.sh -sfr && cd build && ./src/BuildLinuxImage.sh && cd ..
./BuildLinux.sh -prOutput: ./build/bambustudio_*.deb
./BuildLinux.sh -sfr && cd build && ./src/BuildLinuxImage.sh && cd ..
bash scripts/build_rpm.shOutput: ./build/bambustudio-*.rpm
./BuildLinux.sh -sfr && cd build && ./src/BuildLinuxImage.sh && cd ..
bash scripts/build_pkg_arch.shccache can reduce rebuild times from ~60 min to ~5 min when source files are unchanged.
# Install ccache
sudo apt install ccache # Debian/Ubuntu
sudo dnf install ccache # Fedora
# Add ccache to PATH (prepend)
export PATH="/usr/lib/ccache:$PATH"
export CCACHE_DIR="$HOME/.ccache"
export CCACHE_MAXSIZE="5G"
# Verify it's active
which gcc # should show /usr/lib/ccache/gcc
# Build (ccache intercepts GCC transparently)
./BuildLinux.sh -sfr
# Check stats
ccache --show-statsAdd the export lines to ~/.bashrc or ~/.profile to persist across sessions.
# After building deps:
cmake -S . -B build -G Ninja \
-DCMAKE_BUILD_TYPE=Release \
-DBBL_RELEASE_TO_PUBLIC=1 \
-DCMAKE_PREFIX_PATH="$(pwd)/deps/build/destdir/usr/local"Additional useful CMake options:
| Option | Default | Description |
|---|---|---|
CMAKE_BUILD_TYPE |
Release |
Debug for debug symbols |
SLIC3R_BUILD_TESTS |
OFF |
Build unit tests |
BBL_INTERNAL_TESTING |
0 |
Enable internal test features |
cmake --build build --target BambuStudio --parallel $(nproc)cmake -S . -B build-debug -G Ninja \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_PREFIX_PATH="$(pwd)/deps/build/destdir/usr/local"
cmake --build build-debug --parallel $(nproc)To reproduce the CI build environment exactly:
docker run --rm -it \
--security-opt apparmor=unconfined \
-v "$(pwd):/work" \
-w /work \
debian:trixie bash
# Inside container:
apt-get update && apt-get install -y sudo git curl git-lfs
./BuildLinux.sh -ur
./BuildLinux.sh -dfr
./BuildLinux.sh -sfr
cd build && ./src/BuildLinuxImage.shSee Troubleshooting for common build issues including OOM errors, missing libraries, and git-lfs problems.