Skip to content

Latest commit

 

History

History
261 lines (173 loc) · 5.34 KB

BUILDING_Linux.md

File metadata and controls

261 lines (173 loc) · 5.34 KB

Building Nelson on Linux

This guide provides instructions on how to build Nelson on Linux. For the most up-to-date information on dependencies and build instructions, refer to the ccpp.yml file or nix.yml .

Nix

Nelson provides a Nix development environment for working on the project. This is the recommended setup for Linux and macOS users.

curl -L https://nixos.org/nix/install | sh -s -- --daemon
mkdir -p ~/.config/nix
echo "experimental-features = nix-command flakes" > ~/.config/nix/nix.conf

restart your terminal

Development Workflow

Once Nix is installed, enter the development environment with:

nix develop

Then, use the following commands:

just config — Configure the build environment

just build — Build the project

just start — Run Nelson

NixOS

To build Nelson on NixOS, you can use the provided default.nix file.

Using the Latest Master Version

To fetch the latest master version and build Nelson: replace sha256 by desired/latest sha256 commit.

Building Nelson

To build Nelson using the default.nix file:

nix-build

Evaluate Nelson

nix-shell
./result/bin/nelson

Install in your environment:

nix-env -i ./result

ArchLinux

Nelson is available as an ArchLinux package. You can install it using paru:

paru nelson-git

You can also build nelson with a micromamba environment

After installing micromamba

micromamba env create -f environment-linux-dev.yml
micromamba activate nelson

see ccpp.yml with micromamba job.

  • CMake options:
cmake -LAH

// Build Nelson under LGPL v3.x only
LGPL_ONLY:BOOL=OFF

// Build mininal Nelson
MINIMAL_BUILD:BOOL=ON

// Enable AVX2 Instruction set (if available)
ENABLE_AVX2=OFF

// Disable ASSERT_FUNCTIONS module.
WITHOUT_ASSERT_FUNCTIONS_MODULE:BOOL=OFF

// Disable AUDIO module.
WITHOUT_AUDIO_MODULE:BOOL=OFF

// Disable CHARACTERS_ENCODING module.
WITHOUT_CHARACTERS_ENCODING_MODULE:BOOL=OFF

// Disable DATA_ANALYSIS module.
WITHOUT_DATA_ANALYSIS_MODULE:BOOL=OFF

// Disable DYNAMIC_LINK module.
WITHOUT_DYNAMIC_LINK_MODULE:BOOL=OFF

// Disable F2C module.
WITHOUT_F2C_MODULE:BOOL=OFF

// Disable FFTW module.
WITHOUT_FFTW_MODULE:BOOL=OFF

// Disable FILE_ARCHIVER module.
WITHOUT_FILE_ARCHIVER_MODULE:BOOL=OFF

// Disable GRAPHICS module.
WITHOUT_GRAPHICS_MODULE:BOOL=OFF

// Disable GUI module.
WITHOUT_GUI_MODULE:BOOL=OFF

// Disable HDF5 module.
WITHOUT_HDF5_MODULE:BOOL=OFF

// Disable HELP_BROWSER module.
WITHOUT_HELP_BROWSER_MODULE:BOOL=OFF

// Disable HELP_TOOLS module.
WITHOUT_HELP_TOOLS_MODULE:BOOL=OFF

// Disable IPC module.
WITHOUT_IPC_MODULE:BOOL=OFF

// Disable JSON module.
WITHOUT_JSON_MODULE:BOOL=OFF

// Disable LOCALIZATION module.
WITHOUT_LOCALIZATION_MODULE:BOOL=OFF

// Disable MATIO module.
WITHOUT_MATIO_MODULE:BOOL=OFF

// Disable MEX module.
WITHOUT_MEX_MODULE:BOOL=OFF

// Disable MPI module.
WITHOUT_MPI_MODULE:BOOL=OFF

// Disable NIG module.
WITHOUT_NIG_MODULE:BOOL=OFF

// Disable OpenMP
WITHOUT_OPENMP:BOOL=OFF

// Disable PARALLEL module.
WITHOUT_PARALLEL_MODULE:BOOL=OFF

// Disable POLYNOMIAL_FUNCTIONS module.
WITHOUT_POLYNOMIAL_FUNCTIONS_MODULE:BOOL=OFF

// Disable QML_ENGINE module.
WITHOUT_QML_ENGINE_MODULE:BOOL=OFF

// Disable RANDOM module.
WITHOUT_RANDOM_MODULE:BOOL=OFF

// Disable SIGNAL_PROCESSING module.
WITHOUT_SIGNAL_PROCESSING_MODULE:BOOL=OFF

// Disable SIO_CLIENT module.
WITHOUT_SIO_CLIENT_MODULE:BOOL=OFF

// Disable SLICOT module.
WITHOUT_SLICOT_MODULE:BOOL=OFF

// Disable SPECIAL_FUNCTIONS module.
WITHOUT_SPECIAL_FUNCTIONS_MODULE:BOOL=OFF

// Disable STATISTICS module.
WITHOUT_STATISTICS_MODULE:BOOL=OFF

// Disable TESTS_MANAGER module.
WITHOUT_TESTS_MANAGER_MODULE:BOOL=OFF

// Disable TEXT_COMPLETION module.
WITHOUT_TEXT_COMPLETION_MODULE:BOOL=OFF

// Disable TEXT_EDITOR module.
WITHOUT_TEXT_EDITOR_MODULE:BOOL=OFF

// Disable TRIGONOMETRIC_FUNCTIONS module.
WITHOUT_TRIGONOMETRIC_FUNCTIONS_MODULE:BOOL=OFF

// Disable VALIDATORS module.
WITHOUT_VALIDATORS_MODULE:BOOL=OFF

// Disable WEBTOOLS module.
WITHOUT_WEBTOOLS_MODULE:BOOL=OFF

Standard build using Just (>= 1.33):

cd nelson
just config
just build
just build_help
just minimal_tests

Minimal build:

cd nelson
just config -DCMAKE_BUILD_TYPE=Release -DMINIMAL_BUILD=ON -G "Unix Makefiles" .
just build

Some tips:

  • On local build, you can build optimized version using AVX2 instruction set
cd nelson
just config -DCMAKE_BUILD_TYPE=Release -DENABLE_AVX2=ON -G "Unix Makefiles" .
just build
just build_help
  • On Fedora distribution: replaces jack-audio-connection-kit-devel package by pipewire-jack-audio-connection-kit-devel

  • Build Nelson with clang-tidy fix

  cd nelson
  just config -DENABLE_CLANG_TIDY_FIX=ON -G "Unix Makefiles" .
  just build
  • Update localization files if you modify it (optional, only for dev):
just update-localization
  • launch Nelson:
cd nelson
just start

Previous (Building)