building
Automates the building and configuration process for the Knowhere library, including dependency management and compiler flag adjustments.
Install
mkdir -p .claude/skills/building && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/2902" && unzip -o skill.zip -d .claude/skills/building && rm skill.zipInstalls to .claude/skills/building
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Use when building knowhere from source, configuring build options (CPU/GPU/DISKANN/ASAN), or troubleshooting compilation errorsKey capabilities
- →Compile Knowhere from source
- →Configure build options for CPU and GPU
- →Enable AddressSanitizer for memory debugging
- →Run unit tests post-build
- →Override compiler and library versions
How it works
The build process uses Makefiles and Conan to manage dependencies and compilation flags based on the target architecture and feature requirements.
Inputs & outputs
When to use building
- →Compiling Knowhere for GPU-accelerated environments
- →Enabling AddressSanitizer to debug memory leaks during build
- →Resolving compiler issues related to libstdc++ versions
- →Running unit tests post-build
About this skill
Building Knowhere
Prerequisites
# Ubuntu/Debian
sudo apt install build-essential libopenblas-openmp-dev libaio-dev python3-dev python3-pip
pip3 install conan==2.28.1 --user
conan profile detect --force
conan remote add default-conan-local2 https://milvus01.jfrog.io/artifactory/api/conan/default-conan-local2
export PATH=$PATH:$HOME/.local/bin
Build Commands
| Build Type | Command |
|---|---|
| CPU Release | make |
| CPU Debug | make WITH_DEBUG=True |
| CPU + UT | make WITH_UT=True |
| CPU + UT + ASAN | make WITH_UT=True WITH_ASAN=True |
| GPU (CUVS) | make WITH_GPU=True |
| GPU + UT | make WITH_GPU=True WITH_UT=True |
| macOS | make (auto-detects libc++) |
Run tests after building with WITH_UT=True:
make test
Build Flags
| Flag | Description |
|---|---|
WITH_GPU=True | Enable GPU (cuVS) build |
WITH_UT=True | Enable unit tests |
WITH_ASAN=True | Enable AddressSanitizer |
WITH_CARDINAL=True | Enable Cardinal build |
WITH_DEBUG=True | Debug build (default: Release) |
CONAN_PROFILE=<p> | Use a custom Conan profile |
LIBCXX=<lib> | Override compiler.libcxx (auto-detected from OS) |
Common Issues
- libstdc++ errors: Override with
make LIBCXX=libstdc++11 - macOS:
libc++is auto-detected; OpenMP uses Homebrew's libomp - CMake 4.x: Set
export CMAKE_POLICY_VERSION_MINIMUM=3.5for old dependency recipes - ASAN failures: Check for memory leaks, use-after-free, buffer overflows
If this build relates to new features or interface changes, consider updating documentation. See
documentingskill.
When not to use it
- →When pre-compiled binaries are available and sufficient for the environment
Prerequisites
Limitations
- →Requires specific Conan profile configuration
- →Build failures may occur due to libstdc++ version mismatches
How it compares
This provides granular control over build-time features like GPU acceleration and memory sanitization compared to generic package installation.
Compared to similar skills
building side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| building (this skill) | 1 | 2mo | Review | Intermediate |
| cpp-pro | 18 | 4mo | No flags | Advanced |
| ispc-builtins | 1 | 6mo | Review | Advanced |
| cpp-pro | 0 | 5mo | No flags | Advanced |
Try saying
Example prompts that trigger this skill in your AI assistant.
You might also like
cpp-pro
sickn33
Write idiomatic C++ code with modern features, RAII, smart pointers, and STL algorithms. Handles templates, move semantics, and performance optimization. Use PROACTIVELY for C++ refactoring, memory safety, or complex C++ patterns.
ispc-builtins
ispc
Best practices for creating and modifying ISPC builtin files. Use when adding target-specific optimizations, implementing new builtin functions, or working with the hierarchical target system.
cpp-pro
sleepyvani
Writes, optimizes, and debugs C++ applications using modern C++20/23 features, template metaprogramming, and high-performance systems techniques. Use when building or refactoring C++ code requiring concepts, ranges, coroutines, SIMD optimization, or careful memory management — or when addressing per
dev_unity_unreal
AllurinsX
dev_unity_unreal — an agent skill by AllurinsX.
unreal-engine-cpp-pro
sickn33
Expert guide for Unreal Engine 5.x C++ development, covering UObject hygiene, performance patterns, and best practices.
code-coverage-with-gcov
gadievron
Add gcov code coverage instrumentation to C/C++ projects