PARTONS  
PARtonic Tomography Of Nucleon Software
PARTONS on MacOS

Introduction

This tutorial is for building PARTONS on Mac OS. It was tested on Sierra and Catalina.


Dependencies

brew

All of the needed libraries are available via Homebrew. First install brew (if not already available) by running the following command on a terminal window:

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

External libraries

Once brew has been installed, run the following commands to install the following libraries:

  • CLN
    brew install cln
  • Eigen
    brew install eigen
  • Qt (v4 required)
    brew tap cartr/qt4
    brew tap-pin cartr/qt4
    brew install qt@4
  • SFML
    brew install sfml

Git

PARTONS resides on GitLab; so to pull the sources from the repository you will need Git (not necessary if you download the source archives):

brew install git

CMake and Ant

Building PARTONS requires CMake. You can brew it as usual:

brew install cmake

Optionally, you can install Ant in order to take advantage of the build.xml files included with PARTONS. To do that, guess what?

brew install ant

Build and install PARTONS

From this point on, the tutorial becomes almost indistinguishable from the Linux tutorial, so you can switch to it for the rest (or if you want to use an IDE such as Eclipse, switch to the corresponding tutorial) and read the following section for troubleshooting specific to Mac.


Troubleshooting

  • If you are using Eclipse on Mac, you may encounter this error when using cmake via Ant scripts:
    Execute failed: java.io.IOException: Cannot run program "cmake" (in directory "..."): error=13, Permission denied
    which appears as Eclipse is unable to localize CMake executable. To solve this problem right-click on one of entries in Ant view and navigate through the menu: Run us > External Tools Configurations. In the new window select Environment tab. Click on Select button that will call a new window. Select PATH variable and click on OK button. Modify value by adding a path to cmake executable, most likely /usr/local/bin. Unless CMake is installed in a custom place, you can get this path by running
    which cmake
    in your terminal. With PATH variable modified, click on Apply button and Close one to finish.