Skip to content

Latest commit

 

History

History
150 lines (119 loc) · 4.21 KB

File metadata and controls

150 lines (119 loc) · 4.21 KB

Installation

The C++ branch is built with CMake. The default build is optimized, installs under this checkout, and does not build tests.

Required Dependencies

Baysor needs CMake, Ninja, a C++17 toolchain, plus the C++ libraries below. Only CMake, the C++ standard, and Eigen have explicit minimums in the build. Other libraries are intentionally not pinned so that system package managers, Homebrew, and vcpkg can provide compatible versions.

Dependency Required / known-working version
CMake >= 3.20
C++ compiler C++17 compiler; GCC 9.4.0 and Visual Studio 2022 are known to work
Ninja Recent Ninja; 1.10.0 is known to work
Eigen3 >= 3.3
OpenMP C++ OpenMP target; GCC OpenMP 4.5 is known to work
spdlog Not pinned; 1.5.0 is known to work
CGAL Not pinned; 5.0.2 is known to work
Arrow / Parquet Not pinned; 19.0.1 is known to work; Arrow must include compute, CSV, and Parquet support
HDF5 Not pinned; 1.10.x is known to work
nlohmann_json Not pinned; 3.7.3 is known to work
libtiff Not pinned; 4.1.0 is known to work

Several header-only UMAP dependencies are fetched automatically by CMake with pinned source tags:

Header-only dependency Pinned tag
aarand v1.0.2
CppKmeans v3.1.1
subpar v0.3.1
knncolle v2.3.0
CppIrlba v2.0.2
umappp v2.0.1

Build And Install

After the platform prerequisites below are installed, use the same command on Linux, macOS, and Windows:

cmake -P cmake/build_and_install.cmake

This installs baysor to ./install/bin by default. The build is optimized, leaves tests off, and does not write to system directories. Linux and macOS use system packages by default. Windows uses the vcpkg manifest when VCPKG_ROOT is set.

After installation, run:

./install/bin/baysor --help

Ubuntu 24.04

The Docker build uses Ubuntu 24.04. Ubuntu's default repositories do not always provide the Arrow / Parquet development packages in the form expected by this build, so the commands below use the Apache Arrow apt source.

sudo apt-get update
sudo apt-get install -y --no-install-recommends \
  ca-certificates \
  lsb-release \
  wget

wget https://packages.apache.org/artifactory/arrow/$(lsb_release --id --short | tr 'A-Z' 'a-z')/apache-arrow-apt-source-latest-$(lsb_release --codename --short).deb
sudo apt-get install -y --no-install-recommends ./apache-arrow-apt-source-latest-$(lsb_release --codename --short).deb
rm ./apache-arrow-apt-source-latest-$(lsb_release --codename --short).deb

sudo apt-get update
sudo apt-get install -y --no-install-recommends \
  build-essential \
  cmake \
  ninja-build \
  pkg-config \
  git \
  libeigen3-dev \
  libomp-dev \
  libspdlog-dev \
  libcgal-dev \
  libarrow-dev \
  libparquet-dev \
  libhdf5-dev \
  nlohmann-json3-dev \
  libtiff-dev

macOS

brew install \
  cmake \
  ninja \
  pkg-config \
  eigen \
  libomp \
  spdlog \
  cgal \
  apache-arrow \
  hdf5 \
  nlohmann-json \
  libtiff

Windows

Install Visual Studio 2022 or newer with the C++ workload, CMake, Git, and vcpkg. Set VCPKG_ROOT to the vcpkg checkout before running the common build command:

git clone https://github.com/microsoft/vcpkg "$env:USERPROFILE\vcpkg"
& "$env:USERPROFILE\vcpkg\bootstrap-vcpkg.bat" -disableMetrics
$env:VCPKG_ROOT = "$env:USERPROFILE\vcpkg"

After running the common build command, the binary will be under:

install/bin/baysor.exe

Troubleshooting Dependencies

The CMake configure step checks each required dependency and prints the package manager command to install it when it is missing. If a dependency is installed in a non-standard location, set either:

cmake -S . -B build -DCMAKE_PREFIX_PATH=/path/to/prefix

or the package-specific config directory:

cmake -S . -B build -DArrow_DIR=/path/to/lib/cmake/arrow

Continuous Integration

The platforms_build workflow builds the baysor target on Ubuntu, macOS, and Windows. Ubuntu and macOS use native binary packages so CI does not spend time building Apache Arrow and Thrift from source; Windows uses the vcpkg manifest. A separate Ubuntu job builds and runs the developer tests.