some dependencies are needed:
- bash (coinbrew)
- wget (coinbrew)
- gcc (includes gfortran)
these can be obtained with homebrew:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"brew install bash wget gccto download and build CLP, first download coinbrew, if not already present:
wget https://raw.githubusercontent.com/coin-or/coinbrew/master/coinbrew
chmod +x coinbrewSee https://coin-or.github.io/coinbrew/ for additional requirements and install only if necessary (i.e., coinbrew fails).
Then build and install CBC (prefix e.g., (win64|linux64|osx)/dist)
export ADD_FFLAGS=-fallow-argument-mismatch # only use for gfortran10 (from gcc10), when getting errors
export ADD_CXXFLAGS=-lrt # only use if getting the error: "undefined reference to `clock_gettime'"
./coinbrew build install Cbc@releases/2.10.8 --parallel-jobs $(nproc) --tests none --prefix $prefix