Mac-Build
From Lrose Wiki
Revision as of 16:43, 2 July 2020 by Tingyucha (talk | contribs) (→How to install LROSE source on Mac?)
Revision as of 16:43, 2 July 2020 by Tingyucha (talk | contribs) (→How to install LROSE source on Mac?)
How to install LROSE source on a Mac?
1. Download the lrose-core-20200701.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
- To build and install into the default directory:
- 2. Using Homebrew formula
- Install prerequisites in a terminal:
brew install cmakebrew install eigenbrew install fftw flexbrew install qt5 netcdfbrew install szip pkg-configbrew install geographiclibbrew install armadillobrew install libomp libzipbrew install rsyncbrew cask install xquartz
- Specify the paths in a terminal:
export PKG_CONFIG_PATH=/usr/local/opt/qt/lib/pkgconfigexport PATH=/usr/local/opt/qt/bin:$PATHexport 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.tgzcd lrose-core-20200610.src.mac_osx/codebase/./configure --disable-dependency-tracking --prefix=$LROSE_INSTALL_DIRmake installcd ..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 cmakebrew install eigenbrew install libomp libzipbrew 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="" .makemake install
5. You are done with the lrose installation! Go to the documentation to learn how to run LROSE-Elle!