Homebrew and BornAgain installation

Two things to worry

  • Homebrew uses /usr/local but promises not to affect stuff which is installed there by some third party installations
    • Particularly, everything goes in /usr/local/Cellar, necessary links in /usr/local/include, /usr/local/lib etc are created.
    • When specific package is uninstalled, homebrew removes its links.
  • You have to have github account and setup special Github API token to use homebrew

see https://gist.github.com/christopheranderton/8644743

How to install BornAgain

i.e. simply run command below in terminal

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" 
  • Install third party software
    brew install git cmake fftw gsl python homebrew/python/matplotlib numpy boost boost-python qt5
  • Qt5 issue
    • Homebrew calls Qt5 "keg-only", which means that Qt5 is installed into /usr/local/Cellar/qt5 and no links in /usr/local are provided
    • This is done for safety, to not to interfere with possible application using Qt4
    • For us it leads to BornAgain's cmake which can't find qt installation
    • The solution to force linking by giving the command "homebref link --force qt5" is not working (some of FindQtWidget.cmake stuff are not linked correctly.
  • The working solution: define PATH=/usr/local/opt/qt5/bin/:$PATH
  • Compile BornAgain

cmake -DCMAKE_PREFIX_PATH=/usr/local <source>

Update homebrew

  • brew update; brew upgrade; brew cleanup; brew doctor