Get it · Build from source
Building LibreSprite from source
You only need this to try unreleased features (like the MCP server), to contribute, or to package LibreSprite. We followed the official INSTALL.md on clean Linux, Windows and macOS machines on 1 November 2026. It works on all three, with two documentation gaps you need to know about.
On this page 8 sections
Short answer
How do I compile LibreSprite?
Install the dependencies listed below, then git clone --recursive https://github.com/LibreSprite/LibreSprite, mkdir build && cd build, cmake -G Ninja .. and ninja libresprite. The program appears in build/bin/. You need CMake 4.1 or newer, even though INSTALL.md says 3.4. The build took us 6 minutes on a Mac, 10 minutes on Linux and 14 minutes on Windows.
Our three builds
| System | Result | Build steps | Total time |
|---|---|---|---|
| Ubuntu 24.04 (clean container, 4 cores) | works after a fix stock CMake 3.28 is too old | 785 | 570 s |
| Windows Server 2025, MSYS2 UCRT64 | works add the missing ninja libresprite step | 1,384 | 824 s |
| macOS 15.8 (Apple Silicon), Xcode 16.4, Homebrew | works as written | 789 | 352 s |
Source: master at commit 98f7443 (29 October 2026). Each build reported LibreSprite 1.3-dev (local build); self-built copies never show a plain release number. Times include installing dependencies and cloning.
Linux (Ubuntu / Debian)
sudo apt-get install cmake g++ libfreetype6-dev libgif-dev libgtest-dev libjpeg-dev libpixman-1-dev libpng-dev libsdl2-dev libsdl2-image-dev libtinyxml2-dev libnode-dev ninja-build zlib1g-dev libarchive-dev libssl-dev
python3 -m venv ~/cmake-venv && ~/cmake-venv/bin/pip install cmake # CMake 4.x: Ubuntu 24.04 ships 3.28
export PATH=~/cmake-venv/bin:$PATH
git clone --recursive https://github.com/LibreSprite/LibreSprite
cd LibreSprite && mkdir build && cd build
cmake -G Ninja ..
ninja libresprite
./bin/librespriteWith the distribution’s CMake, configuration stops with: CMake 4.1 or higher is required. You are running version 3.28.3. A newer CMake from PyPI in a virtual environment (as above; Ubuntu blocks plain pip install system-wide), Kitware’s APT repository or cmake.org fixes it. In our container we used pip install --break-system-packages cmake, which also works but is best avoided on your own machine. libssl-dev is needed on master for HTTPS in scripts (CMake warns without it). Fedora users: the dnf line in INSTALL.md, plus a new enough CMake.
Windows (MSYS2 UCRT64)
Install MSYS2
From msys2.org, then open the MSYS2 UCRT64 shell (not MINGW64, not MSYS).
Dependencies
MSYS2 UCRT64 shellpacman -S base-devel git mingw-w64-ucrt-x86_64-gcc mingw-w64-ucrt-x86_64-cmake mingw-w64-ucrt-x86_64-make mingw-w64-ucrt-x86_64-ninja mingw-w64-ucrt-x86_64-openssl mingw-w64-ucrt-x86_64-freetype mingw-w64-ucrt-x86_64-giflib mingw-w64-ucrt-x86_64-libjpeg-turbo mingw-w64-ucrt-x86_64-libpng mingw-w64-ucrt-x86_64-libwebp mingw-w64-ucrt-x86_64-pixman mingw-w64-ucrt-x86_64-SDL2 mingw-w64-ucrt-x86_64-SDL2_image mingw-w64-ucrt-x86_64-tinyxml2 mingw-w64-ucrt-x86_64-zlib mingw-w64-ucrt-x86_64-libarchiveMSYS2’s CMake is current (4.4.5 in our run), so the CMake trap doesn’t apply here.
Build
MSYS2 UCRT64 shellgit clone --recursive https://github.com/LibreSprite/LibreSprite cd LibreSprite && mkdir build && cd build cmake -G Ninja .. ninja libresprite ./bin/libresprite.exeINSTALL.md’s Windows section ends after
cmake; theninja librespriteline is needed, exactly as on Linux.
The result is large (304 MB, with debug information) and depends on 47 DLLs from the UCRT64 environment, so run it from the UCRT64 shell, or copy those DLLs next to it before moving it elsewhere. The v1.3 tag’s INSTALL.md still describes 32-bit MINGW packages; use the UCRT64 instructions above, which master switched to on 21 October 2026.
macOS (Homebrew)
brew install gnutls freetype jpeg webp pixman sdl2 sdl2_image tinyxml2 libarchive ninja zlib xmlto dylibbundler cmake
git clone --recursive https://github.com/LibreSprite/LibreSprite
cd LibreSprite && mkdir build && cd build
cmake -DCMAKE_OSX_SYSROOT=$(xcrun --show-sdk-path) -G Ninja ..
ninja libresprite
./bin/librespriteINSTALL.md gives the SDK path written out in full; $(xcrun --show-sdk-path) is equivalent and works if Xcode lives elsewhere. Homebrew’s CMake (4.4.4 in our run) is new enough. Your own build is not quarantined, so Gatekeeper doesn’t block it.
Updating your build
cd LibreSprite
git pull
git submodule update --init --recursive
cd build && ninja librespriteAndroid and web
Both start from a native build. For Android, the development branch moved the Android dependencies into the main repository (12 October 2026); open the android folder in Android Studio and point it at CMake 4.1+. For the browser, master’s INSTALL.md documents an emscripten build; the result must be served with cross-origin isolation headers. We did not build these two.
Common build errors
| Error | Fix |
|---|---|
CMake 4.1 or higher is required | Install a newer CMake (PyPI, Kitware APT, cmake.org). |
Missing src/flic or third_party/simpleini files | You cloned without --recursive: run git submodule update --init --recursive. |
| Missing library “webpdecoder” (#574) | The libwebp development files are incomplete; install your distribution’s full libwebp development package. |
| OpenSSL warning at configure time | Install libssl-dev / openssl development files; needed for HTTPS in scripts on master. |
FAQ
Why does my build say 1.3-dev?
Version numbers like “1.3” are only set by the official release workflow. Every self-built copy reports “-dev (local build)”.
Do I need to build LibreSprite myself?
No. The official releases are free. Build only to test new features or contribute. Download page.
Can I build the 1.3 release instead of master?
Yes: add --branch v1.3 to the clone command. It needs CMake 4.1 too.
How long does it take?
About 6–14 minutes on the machines we used, most of it compiling.
Keep going
Found something wrong or out of date? Tell us: hello@libresprite.dev. We fix mistakes within a day.