Actions

Mac-Build

From Lrose Wiki

How to install LROSE source on Mac?

1. Download the lrose-core-20200610.src.mac_osx.tgz tar file.

2. There are two ways to build LROSE:

1. Run the build script:
To build and install into the default directory: /usr/local/lrose
./build_src_release.py
Or set an install directory:
./build_src_release.py --prefix /my/install/dir


2. Using Homebrew formula
  • Install prerequisites in a terminal:
brew install cmake
brew install eigen
brew install fftw flex
brew install qt5 netcdf
brew install szip pkg-config
brew install geographiclib
brew install armadillo
brew install libomp libzip
brew install rsync
brew cask install xquartz
  • Specify the paths in a terminal:
export PKG_CONFIG_PATH=/usr/local/opt/qt/lib/pkgconfig
export PATH=/usr/local/opt/qt/bin:$PATH
export LROSE_INSTALL_DIR=/usr/local/Cellar/lrose-core/core-20200610
  • In a terminal, untar the release and install:
cd ~/Downloads/
tar xvfz lrose-core-20200610.src.mac_osx.tgz
cd lrose-core-20200610.src.mac_osx/codebase/
./configure --disable-dependency-tracking --prefix=$LROSE_INSTALL_DIR
make install
cd ..
rsync -av share $LROSE_INSTALL_DIR

Important Note: Steps 3 and 4 are for the wind analysis tools FRACTL and SAMURAI installation. Users are allowed to skip steps 3 and 4 if they are not in need of these two tools.

3. Build FRACTL:

cd lrose-core-20200610.src.mac_osx/fractl/
cmake -DCMAKE_INSTALL_PREFIX=/usr/local/Cellar/lrose-core/core-20200610/ .
cd ..

4. Build SAMURAI:

  • Install prerequisites in a terminal:
brew install cmake
brew install eigen
brew install libomp libzip
brew install llvm
  • Install:
export OCFLAGS=`pkg-config --cflags ompi-c`
export OCXXFLAGS=`pkg-config --cflags ompi-cxx`
cmake -DCMAKE_INSTALL_PREFIX=$LROSE_INSTALL_DIR -DCMAKE_MODULE_PATH=$CMAKE_QT5 -D OpenMP_C_FLAGS=$OCFLAGS -D OpenMP_C_LIB_NAMES="" -D OpenMP_CXX_FLAGS=$OCXXFLAGS -D OpenMP_CXX_LIB_NAMES="" .
make
make install

5. You are done with the lrose installation! Go to the documentation to learn how to run LROSE-Elle!