-
Notifications
You must be signed in to change notification settings - Fork 1
Setup
Canonical Step 2 after QUICKSTART.md. This page defines the authoritative local development setup.
Use the root onboarding path in this order:
- README.md
- QUICKSTART.md
- SETUP.md (this page)
- SUPPORT.md
- RELEASE_STRATEGY.md
- INDEX.md
- Git 2.x
- Python 3.8+
- CMake 3.20+
- C++20 compiler (GCC/Clang/MSVC)
- PowerShell 7+ (for cross-platform dependency bootstrap script)
Optional for fastest onboarding:
- Docker / Docker Desktop
- VS Code + Dev Containers extension
git clone https://github.com/makr-code/ThemisDB.git
cd ThemisDB
git submodule update --init --recursiveBuild reality check: the repository currently expects a repo-local
vcpkgcheckout or an automatic bootstrap during CMake configure. If the toolchain is missing, the supported recovery path iscmake --preset <preset> -DTHEMIS_AUTO_BOOTSTRAP_DEPS=ON; do not rely on machine-specific absolute paths in docs or scripts. Keep local environment overrides inCMakeUserPresets.jsonor in the active shell environment, not in committed configuration files.
Local developer note: generated
vcpkglock/temp files may make the submodule look dirty during a manual toolchain run. This is a local tool artifact and should be handled with the submodule-local git exclude, not by changing root repository policy or checked-in build docs.
./scripts/setup-pre-commit.sh
cmake --preset linux-release -DTHEMIS_AUTO_BOOTSTRAP_DEPS=ON.\scripts\setup-pre-commit.ps1
cmake --preset windows-release -DTHEMIS_AUTO_BOOTSTRAP_DEPS=ONAvailable canonical build/test presets are defined in CMakePresets.json.
ThemisDB provides multiple presets optimized for different scenarios:
| Preset | Platform | Requirements | Use Case |
|---|---|---|---|
| linux-release | Linux | Ninja + vcpkg | Production builds with full optimizations (recommended for most users) |
| windows-release | Windows | MSVC 2022+ + Ninja + vcpkg | Production builds on Windows (MSVC only) |
| community-release | Linux/macOS | System packages only (no vcpkg) | Fallback preset when vcpkg is unavailable; uses system-installed libraries |
| Preset | Platform | Requirements | Use Case |
|---|---|---|---|
| linux-debug | Linux | Ninja + vcpkg | Debug builds with symbols and assertions |
| windows-debug | Windows | MSVC 2022+ + Ninja + vcpkg | Debug builds on Windows |
| nightly-bench-sweep | Linux | Ninja + vcpkg | Nightly benchmarking with GPU/LLM disabled |
-
If vcpkg is available (recommended):
- Linux: Use
linux-release - Windows: Use
windows-release - Benefits: Consistent dependencies, optimized builds, reproducible CI
- Linux: Use
-
If vcpkg is unavailable (fallback):
- Use
community-releaseon Linux/macOS - Requires system development packages to be installed
- See System Package Setup below
- Use
# Prerequisites: submodules initialized or CMake auto-bootstrap enabled
cmake --preset linux-release
cmake --build --preset linux-release --parallel 16
ctest --preset linux-release --output-on-failure# Install system development packages (see System Package Setup)
cmake --preset community-release
cmake --build --preset community-release --parallel 16
ctest --preset community-release --output-on-failureFrom a Visual Studio Developer Command Prompt:
# Prerequisites: submodules initialized or CMake auto-bootstrap enabled
cmake --preset windows-release
cmake --build --preset windows-release --parallel 16
ctest --preset windows-release --output-on-failureIf using community-release preset, install required system development packages:
sudo apt-get update
sudo apt-get install -y \
build-essential \
cmake \
ninja-build \
libssl-dev \
zlib1g-dev \
librocksdb-dev \
libzstd-dev \
libfmt-dev \
libspdlog-dev \
libcpp-httplib-devsudo dnf install -y \
gcc-c++ \
cmake \
ninja-build \
openssl-devel \
zlib-devel \
rocksdb-devel \
libzstd-devel \
fmt-devel \
spdlog-develbrew install cmake ninja rocksdb zstd openssl fmt spdlog
export OPENSSL_DIR=$(brew --prefix openssl@3)Full build and test workflow with parallel jobs:
cmake --preset <PRESET_NAME> -S . -B build/<PRESET_NAME>cmake --build --preset <PRESET_NAME> --parallel 16Or use the build command directly:
cmake --build build/<PRESET_NAME> --parallel 16ctest --preset <PRESET_NAME> --output-on-failureThemisDB build metadata is reproducible by policy:
-
cmake/BuildInfo.cmakeusesSOURCE_DATE_EPOCHwhen it is set. - If
SOURCE_DATE_EPOCHis not set, BuildInfo falls back to the GitHEADcommit timestamp so repeated builds from the same source tree do not drift by configure time alone. - If neither source is available, the build falls back to configure time only for non-strict local builds and emits a warning because that output is not reproducible.
Use -DTHEMIS_REQUIRE_REPRODUCIBLE_BUILD=ON whenever a build must fail instead
of silently falling back to non-reproducible metadata.
export SOURCE_DATE_EPOCH="$(git log -1 --format=%ct)"
cmake --preset community-release -DTHEMIS_REQUIRE_REPRODUCIBLE_BUILD=ON
cmake --build --preset community-release --parallel 16This follows the SOURCE_DATE_EPOCH convention used by Debian, F-Droid, and
the wider reproducible-builds ecosystem.
CI enforcement lives in
.github/workflows/09-pr-gates_reproducible-builds.yml, which uploads the
generated build_info.h files plus their SHA-256 digests as audit evidence.
Run the focused reproducibility probe to verify that identical source plus
identical SOURCE_DATE_EPOCH produces identical generated build metadata:
export SOURCE_DATE_EPOCH="$(git log -1 --format=%ct)"
cmake -DOUTPUT_DIR=/tmp/themis-repro -P cmake/VerifyReproducibleBuildInfo.cmakeThe probe configures isolated temporary build directories, compares the SHA-256
hashes of the generated build_info.h artifacts, and fails if the metadata is
not deterministic.
Cause: Using a vcpkg-based preset (linux-release, windows-release) without initialized submodules/bootstrap.
Solution:
-
Use CMake-native auto-bootstrap:
cmake --preset linux-release -DTHEMIS_AUTO_BOOTSTRAP_DEPS=ON
Optional manual fallback:
git submodule update --init --recursive
-
Or use fallback preset:
cmake --preset community-release # Linux/macOS only
Cause: Using a Ninja-based preset without Ninja installed.
Solution:
- Install Ninja:
sudo apt-get install ninja-build # Debian/Ubuntu brew install ninja # macOS choco install ninja # Windows (with Chocolatey)
Cause: Using community-release without required system packages.
Solution: Install system development packages (see System Package Setup section).
Cause: Using community-release on a system where fmt and spdlog are not installed as system packages.
Solution: Install development packages for fmt and spdlog:
- Debian/Ubuntu:
sudo apt-get install libfmt-dev libspdlog-dev - Fedora/RHEL:
sudo dnf install fmt-devel spdlog-devel - macOS:
brew install fmt spdlog
Alternatively, use the linux-release preset with vcpkg, which includes all dependencies.
Cause: Using community-release on a system where cpp-httplib is installed only via system packages and the required development package is missing.
Solution: Install the cpp-httplib development package:
- Debian/Ubuntu:
sudo apt-get install libcpp-httplib-dev - Fedora/RHEL: install the distro package that provides
httplib.h/cpp-httplib - macOS: use the
linux-releasepreset with vcpkg or provide a compatiblecpp-httplibinstall
Batch A Gate Status: [~] In Progress (active Phase-0 gate blockers)
Known Issues:
-
linux-releaserequires vcpkg toolchain: If you receive "Could not find toolchain file", ensure:- submodules are initialized (
git submodule update --init --recursive) - configure is retried with
-DTHEMIS_AUTO_BOOTSTRAP_DEPS=ON - CMAKE_TOOLCHAIN_FILE in CMakePresets.json points to correct path
- submodules are initialized (
-
community-releasemay fail on missing packages: This preset depends on system development packages being installed.- Use the System Package Setup commands above for your OS
- Or use
linux-releasepreset with vcpkg if available
-
Reproducible builds require SOURCE_DATE_EPOCH: For CI and release builds:
export SOURCE_DATE_EPOCH="$(git log -1 --format=%ct)" cmake --preset linux-release -DTHEMIS_REQUIRE_REPRODUCIBLE_BUILD=ON
See Reproducible Builds Policy above.
Mitigation: Both presets are functional and gate-integrated for release-critical tests. Known limitations are tracked in ROADMAP.md Β§Known Issues & Limitations.
Cause: CMakePresets.json has invalid syntax or preset references.
Solution:
-
Verify CMakePresets.json syntax:
python3 -m json.tool CMakePresets.json
-
Verify preset is available:
cmake --list-presets
-
Check the Git history for recent changes:
git log -p CMakePresets.json | head -100
./build/linux-release/themis_server --data-dir ./dataHealth check:
curl http://localhost:8765/health- Open repository in VS Code
- Run
Dev Containers: Reopen in Container - Build and test via the same canonical presets (
linux-release/linux-debug)
For quick reference, here's the complete preset matrix:
| Preset | Platform | Generator | vcpkg | System Packages | Use Case |
|---|---|---|---|---|---|
| linux-release | Linux | Ninja | β Required | Optional | Primary - Production with vcpkg |
| linux-debug | Linux | Ninja | β Required | Optional | Development debug build |
| windows-release | Windows | Ninja | β Required | N/A | Primary - Windows production |
| windows-debug | Windows | Ninja | β Required | N/A | Windows debug build |
| community-release | Linux/macOS | Ninja | β Not used | β Required | Fallback - System packages only |
| nightly-bench-sweep | Linux | Ninja | β Required | Optional | Benchmarking (no GPU/LLM) |
| hyperscaler-debug-windows | Windows | Ninja | β Required | N/A | Enterprise debug builds |
| hyperscaler-debug-linux | Linux | Ninja | β Required | Optional | Enterprise debug builds |
Zuletzt geprueft (Root-Sync): 2026-05-26
ThemisDB 1.9.0-beta Β· Home Β· Module-Index Β· GitHub Β· Issues
ThemisDB 1.9.0-beta Β· Home Β· Wiki-Index Β· Module-Index Β· FAQ Β· Quick-Reference Β· GitHub Β· Issues Β· Discussions Β· License
- Batch Operations
- Best Practices
- CRUD Tutorial
- Custom Document Ingestion
- Getting Started Tutorial
- Interactive Examples
- Schema Design
- Video Tutorials
- AQL Reference
- AQL Examples
- AQL Overview
- AQL Feature Roadmap
- AQL Geospatial Guide
- AQL LLM Migration Guide
- AQL API
- AQL Grammar (EBNF)
- AQL Root Overview
- AQL Examples (root)
- API Reference
- API Module README
- OpenAPI Overview
- Client SDK Overview
- SDK Overview
- Operations
- Operations Overview
- Operations Runbook
- Operations Handbook
- ThemisCtl Admin Guide
- Pipeline E2E SOPs
- Deploy Overview
- Docker Overview
- Docker Hub README
- Helm Overview
- Packaging Overview
- Operator Overview
- Security Policy
- Production Hardening Checklist
- Security Hardening Guide
- Encryption Key Management
- Access Control Framework
- Zero Trust Policy
- API Authentication & Authorization
- HSM Production Setup
- PKCS11 Integration
- DSGVO / SOC2 Checklist
- Access Model Runbooks
- Access Model Dashboard
- Maturity Automation Runbook
- Access Review Automation
- Access Model Dashboard
- Access Model Runbooks
- Rights Revocation
- Dr Checklists
- Dr Testing
- Incident Response Playbook
- Incident Response Testing
- GPU Oom Recovery
- Grammar Debugging
- Metrics Scrape Troubleshooting
- Model Swap Procedure
- Quota Tuning
- Subagent Deployment
- Logging Configuration
- Content Model
- Crypto & Keys
- Feature Flags Reference
- Modular Architecture Roadmap
- Modularization Guide
- Module Architecture Index
- PostgreSQL Wire Protocol
- Query Scheduling
- Raft Consensus Design
- Resource Pooling
- Source Directory Guide
- Unified Access Model
- E1 001 Layered Retrieval Design
- E1 002 Ann Abstraction Strategy
- E1 003 Tensor Summary Types
- E1 004 Lora Package Distinction
- E1 005 Model Switch Compatibility
- E1 006 Federated Tensor Summaries
- E2 001 Evaluation Framework Design
- E2 002 Hardware Profile Strategy
- E2 003 Query Planner Routing Model
- E2 004 Approximation Governance Rules
- E2 005 Cross Layer Fallback Confidence Policy
- E3 001 Distributed Tensor Design
- E3 002 Manifest Coordination Strategy
- E3 003 Recovery And Erasure Choice
- E3 004 Tensor Fabric Infrastructure
- Contributing
- Contributing (root)
- Code of Conduct
- Support
- Maintainers
- CTest Guide
- Build Quick Reference
- Developer Wiki Index
- Build / Test / CI
- Module Index
- Branching Strategy
- Disabled Stub Policy
- Docs PR Policy
- GA Promotion Sign Off
- Github Milestones Setup
- Maturity Claim Verification Checklist
- Maturity Evidence Registry
- Merge Gate Bot Config
- Merge Gate Status Live
- Phase 1 Closure Report
- Phase Closure Policy
- Phase Dependency Graph
- Phase3 Enforcement Runbook
- Plugin Submodule Rollback
- PR Version Targeting
- PR Version Targeting Backfill
- Production Ready 2026 Delivery Plan
- Query Module Status
- Readme
- Release Promotion Gate Policy
- Release Validation Checklist
- Security Module 5671 Evidence Summary
- Sharding P6 Residual Risk Acceptance
- Sourcecode Compliance Governance
- Updates Development Status Sign Off
- Wave C Implementation Complete
- Blob Storage
- Cuda
- Ethics Ai
- Exporters
- Huggingface
- Image Analysis
- Importers
- RPC
- Scraper
- Themisdb Ai Watermark Detector
- User Storage Encrypted
- Chimera Architecture
- Chimera Future
- Chimera Readme
- Chimera Roadmap
- Covina Fastapi Ingestion Architecture
- Covina Fastapi Ingestion Future
- Covina Fastapi Ingestion Roadmap
- Vcc Base Architecture
- Vcc Base Future
- Vcc Base Roadmap
- Vcc Clara Ingestion Architecture
- Vcc Clara Ingestion Future
- Vcc Clara Ingestion Roadmap
- Vcc Veritas Architecture
- Vcc Veritas Future
- Vcc Veritas Roadmap
- 01 Hello World
- 02 Todo App
- 03 Contact Manager
- 04 Inventory System
- 05 Time Series Monitor
- 06 Graph Social Network
- 07 Vector Search Documents
- 08 Dms Erp System
- 09 Iot Sensor Network
- 10 Drone Image Analysis
- 11 Blog Wiki
- 12 Expense Tracker
- 13 Recipe Manager
- 14 Ecommerce Catalog
- 15 Event Management
- 16 Kanban Board
- 17 Crm
- 18 Realtime Chat
- 19 Recommendation Engine
- 20 Smart Home
- 21 Coding Platform
- 22 AQL Diagram Tool
- 23 Traveling Salesman
- 24 Moral Philosophy Debates
- API Versioning
- Distributed Sharding
- Feedback Plugins
- Geo
- Gnn
- Image Analysis
- Legal Lora Training
- LLM
- Lora Sync
- Migration
- Nlp
- Performance
- Railway
- Replication
- Rope Visualization
- Sample Product Config
- Security
- Client SDK Overview
- Quickstart
- Sdk Enhancements
- Sdk Implementation Summary
- Test Suite Readme
- Go
- Java
- Javascript
- Php
- Python
- Ruby
- Rust
- Typescript
- 01 Grundlegende Operationen
- 02 AQL Queries
- 03 Graph Daten
- 04 Multimodell Anwendung
- 01 Quickstart Guide
- 02 AQL Referenz Kurzuebersicht
- 03 Datenmodellierung Guide
- 04 Uebungsaufgaben
- 05 Best Practices Guide
- Training Documents
- Training Overview
- 01 Einfuehrung Und Uebersicht
- 02 Datenmodelle Und Architektur
- 03 AQL Abfragesprache
- 04 Installation Und Setup
- 05 Anwendungsbeispiele
- Training Presentations
- Dependencies Readme
- Processmonitor Readme
- Themis.admintools.shared Readme
- Themis.aqlquerybuilder Readme
- Themis.aqlquerybuilder Roadmap
- Themis.auditlogviewer Readme
- Themis.auditlogviewer Roadmap
- Themis.classificationdashboard Readme
- Themis.classificationdashboard Roadmap
- Themis.compliancereports Readme
- Themis.compliancereports Roadmap
- Themis.gisviewer.controlpanel Readme
- Themis.gisviewer.controlpanel Roadmap
- Themis.impactanalysisviewer Readme
- Themis.impactanalysisviewer Roadmap
- Themis.ingestiontool Readme
- Themis.ingestiontool Roadmap
- Themis.keyrotationdashboard Readme
- Themis.keyrotationdashboard Roadmap
- Themis.piimanager Readme
- Themis.piimanager Roadmap
- Themis.retentionmanager Readme
- Themis.retentionmanager Roadmap
- Themis.sagaverifier Readme
- Themis.sagaverifier Roadmap
- Themis.usbadmintool Readme
- Themis.usbadmintool Roadmap
- CI Readme
- CI Roadmap
- Compiler Diagnostics Readme
- Compiler Diagnostics Roadmap
- Completion Readme
- Copilot Ollama Router Readme
- Copilot Ollama Router Roadmap
- Gnn Readme
- Gnn Roadmap
- Rope Visualizer Readme
- Rope Visualizer Roadmap
- Tco Calculator Readme
- Tco Calculator Roadmap
- Tests Readme
- Tests Roadmap
- Themis Config Wx Readme
- Themis Docs Builder Readme
- Wikipedia Ingestion Readme