Installation

The EMP software is packaged as RPMs, stored in YUM repositories, for CentOS 7 and 8 (64-bit, x86 architecture). If you are using one of these platforms, you should follow the instructions in the YUM repositories section below, to install the RPMs for the latest tagged release. If you need to use the EMP software on a different OS or achitecture then instead follow the instructions in the Compiling from source section.

YUM repositories

The RPMs from our YUM repositories can be installed as follows:

  1. If you already have a previous version of the EMP software installed on your computer, first uninstall this old version:

    sudo yum groupremove emp
    sudo yum remove "cactus*emp*"
    
  2. Download the YUM repo file, and copy to /etc/yum.repos.d/, renaming to emp.repo:

    sudo curl https://serenity.web.cern.ch/serenity/emp-fwk/_downloads/emp.repo -o /etc/yum.repos.d/emp.repo
    
  3. Install the software:

    sudo yum clean all
    sudo yum install "cactusboards-emp-*"
    
  4. Install Python dependencies

    sudo python3.6 -m pip install --upgrade click==8.0.4 click_didyoumean==0.3.0 pytest==7.0.1 python-dateutil==2.8.2 pyyaml==5.1.2 colorama==0.4.5
    

Note

The RPMs install the EMP software under /opt/cactus by default. So before using the EMP software, you need to update your environment variables accordingly:

export PATH=/opt/cactus/bin/emp:$PATH
export LD_LIBRARY_PATH=/opt/cactus/lib:$LD_LIBRARY_PATH
export PYTEST_ADDOPTS="--rootdir=."

The latter variable is only needed if you’re running the test suite, to set the location for .pytest_cache.

Compiling from source

The EMP software is implemented in C++, and built on top of the uHAL library, which in turn uses the BOOST and pugiXML libraries.

Part 1: Prerequisites

The prerequisites can be installed as follows:

  1. BOOST and pugiXML

    sudo yum -y install boost-devel pugixml-devel python-devel
    
  2. uHAL: See instructions (install the RPMs built with GCC4).

  3. CACTUS build utilities

    sudo curl http://serenity.web.cern.ch/serenity/emp-fwk/_downloads/cactus-build-utils.repo -o /etc/yum.repos.d/cactus-build-utils.repo
    sudo yum clean all
    sudo yum install cactuscore-build-utils-0.2.9
    
  4. Python dependencies:

    sudo python3.6 -m pip install --upgrade click==8.0.4 click_didyoumean==0.3.0 pytest==7.0.1 python-dateutil==2.8.2 pyyaml==5.1.2 colorama==0.4.5
    

Part 2: EMP toolbox

After installing the prerequisites, the latest tag can be downloaded and built as follows:

git clone --recurse-submodules https://:@gitlab.cern.ch:8443/p2-xware/software/emp-toolbox.git -b v0.8.2
cd emp-toolbox
make

Then, in order to set up environment variables (PATH, LD_LIBRARY_PATH etc) to use the software, run:

source env.sh