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.zip

Installs 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 errors
127 chars✓ has a “when” trigger
Intermediate

Key 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

You give it
Source code and build configuration flags
You get back
Compiled binaries and test results

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 TypeCommand
CPU Releasemake
CPU Debugmake WITH_DEBUG=True
CPU + UTmake WITH_UT=True
CPU + UT + ASANmake WITH_UT=True WITH_ASAN=True
GPU (CUVS)make WITH_GPU=True
GPU + UTmake WITH_GPU=True WITH_UT=True
macOSmake (auto-detects libc++)

Run tests after building with WITH_UT=True:

make test

Build Flags

FlagDescription
WITH_GPU=TrueEnable GPU (cuVS) build
WITH_UT=TrueEnable unit tests
WITH_ASAN=TrueEnable AddressSanitizer
WITH_CARDINAL=TrueEnable Cardinal build
WITH_DEBUG=TrueDebug 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.5 for 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 documenting skill.

When not to use it

  • When pre-compiled binaries are available and sufficient for the environment

Prerequisites

build-essentiallibopenblas-openmp-devlibaio-devconan

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.

SkillInstallsUpdatedSafetyDifficulty
building (this skill)12moReviewIntermediate
cpp-pro184moNo flagsAdvanced
ispc-builtins16moReviewAdvanced
cpp-pro05moNo flagsAdvanced

Try saying

Example prompts that trigger this skill in your AI assistant.

Search skills

Search the agent skills registry