This section outlines how to build MAVS using terminal commands on Linux. Aptitude is the package manager used in the example commands for installing system dependencies. Users of different package managers will need to determine how to ensure the same dependencies are installed on their own. MAVS has been installed and tested on both Ubuntu and CentOS systems.
System Dependencies
Ensure X11, libJPEG, and zlib development packages are installed. For example, on Ubuntu or Debian systems, execute the following:
sudo apt-get install libx11-dev libjpeg-dev zlib1g-dev
Older versions of distros may not have a sufficiently up-to-date cmake package. If cmake is not 3.13+, it will need to be updated as well. Doing so varies depending on distro but for Ubuntu, Kitware's APT repository is the recommended method. Navigate to that site and follow the steps for your version of Ubuntu.
Installing MAVS on Linux
Presuming Embree and other system dependencies are now installed and available, MAVS can now be installed. To build MAVS in the default configuration, run the following from the repo's root directory:
cd ~/mavs
mkdir build
cd build
sudo ccmake ../
Use the ccmake tool to configure the MAVS build. Make sure to set the build type to "Release". Also ensure that the DEFAULT_DATA_DIR is set to point to your MAVS data folder. If you followed the steps above, then it should be set to ~/mavs/data.
It is reccommended that you set the CMAKE_INSTALL_PREFIX to /usr/local if possible. If you install MAVS in a custom folder, you will need to set the CMAKE_PREFIX_PATH variable when linking other programs to MAVS using the find_package feature of CMake.
For a basic OpenMP-enabled MAVS build, set the following options:
DEFAULT_DATA_DIR: ~/mavs/data
CMAKE_INSTALL_PREFIX: /usr/local
It is recommended that you install MAVS in your usr/local folder on Linux systems.
CMAKE_CONFIGURATION_TYPE: Release
Unless you wish to build Chrono, uncheck "MAVS_USE_CHRONO"
Unless you wish to use MAVS on a supercomputer, uncheck USE_MPI and make sure USE_OMP is checked.
You can then build MAVS with
sudo make install
For running MAVS and linking MAVS to external applications, you may need to add the MAVS libraries to your system path. If MAVS was installed in /usr/local as recommended above, this can be done by adding the following lines to your .bashrc file.
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/lib/"
export PATH="$PATH:/usr/local/lib"