Skip to content

Installation on macOS with Apple Silicon chip from source code

Kimrli edited this page Jan 5, 2023 · 10 revisions

Xcode

Xcode developer tools are needed for installing Homebrew and MacPort. Homebrew is needed for isntalling addtional libraries: jpeg-turbo, libtiff, gsl. MacPort is needed for installing clang15 which has OpenMP and other funcionality required by this project.

  1. Download and install latest Xcode from Apple developer website
    • Installing from Mac App Store is sometimes malfunctioning
  2. In shell (Terminal) run: xcode-select --install

More info here: website with instructions to install Xcode

Homebrew

Homebrew is package manager for macOS (needs Xcode).

  1. In shell (Terminal) run: /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

More info here: website with instruction to install Homebrew

Install additional libraries

ColorScreen requires several packages:

  • jpeg-turbobrew install jpeg-turbo (run in shell)
  • libtiffbrew install libtiff (run in shell)
  • gslbrew install gsl (run in shell)

On Mac with Apple Silicon chip Homebrew installs packages into folder /opt/homebrew/Cellar/ Note: During configuration it can be handy to see mac’s hidden folders (⇧⌘.)

MacPorts

From MacPorts website download and open installer for macOS Ventura (needs Xcode).

Clang15

For running ColorScreen on Mac with Apple Silicon chip you need a different clang than default. You need a compiler that support OpenMP and -march=native. After installing MacPorts run in shell (Terminal): sudo port install clang-15

More info here: clang-15 MacPort website

Install ColorScreen

  • Clone (or download) ColorScreen repository.
  • From shell (Terminal) in the folder with source code (git repository) run following:
    • replace <path where to build> with your custom destination, where you want to have ColorScreen
CC="/opt/local/bin/clang-mp-15" CXX="/opt/local/bin/clang++-mp-15" CXXFLAGS="-I/opt/homebrew/include" LDFLAGS="-L/opt/homebrew/lib" ./configure --prefix=<path where to build>
make install

Clone this wiki locally