Core C/C++ code for LROSE.
This project is maintained by NCAR
Setting up the manual build environment allows a user to develop LROSE-specific code in an efficient environment.
It uses Makefiles that are simple to use, rather than the complex makefiles generated by the GNU tools autoconf and automake.
Install either the XCode development environment or a stand-alone version of the XCode command line tools. If you intend to do lots of Apple development and want to use an IDE, then install XCode.
To install the full XCode package, get an Apple ID and register for the Apple App Store.
You will need to provide a credit card, so Apple can charge you if you actually buy anything.
However, XCode is free.
From the App Store, install XCode. Start XCode, open the preferences window, select the ‘Downloads’ tab, and install “Command Line Tools”
You may also need to run:
xcode-select --install
Alternatively, you can install the stand-alone XCode command line tools by downloading “Command Line Tools” from:
http://developer.apple.com/downloads
You will need to register for a free Apple id, no credit card is required.
The default location for homebrew is /usr/local. So you need write permission to /usr/local to perform the install.
Run the following ruby script:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
/usr/local/bin/brew update
brew install pkg-config
brew install szip
brew install hdf5
brew install netcdf
brew install udunits
brew install fftw
brew install flex
brew install jasper
brew install jpeg
brew install libpng
brew install qt
Create a working directory for cloning:
mkdir -p ~/git
cd ~/git
cd ~/git
git clone https://github.com/ncar/lrose-core
The distribution will be in the lrose-core subdirectory:
cd ~/git/lrose-core
The LROSE manual build uses a recursive makefile approach, using environment variables to identify the various directories to be used during the build.
For details on the makefile system, see:
For sh or bash:
export HOST_OS=OSX_LROSE
export LROSE_INSTALL_DIR=$HOME/lrose
export LROSE_CORE_DIR=$HOME/git/lrose-core
For csh or tcsh:
setenv HOST_OS OSX_LROSE
setenv LROSE_INSTALL_DIR $HOME/lrose
setenv LROSE_CORE_DIR $HOME/git/lrose-core
Preferably, you should permanently set these directly in your .cshrc
or .bashrc
file.
Then the environment will always be correctly set.
LROSE will be installed in:
$LROSE_INSTALL_DIR/bin
$LROSE_INSTALL_DIR/lib
$LROSE_INSTALL_DIR/include
Note: if there are errors related to Qt, try setting this variable
export PKG_CONFIG_PATH="/usr/local/opt/qt/lib/pkgconfig"
You can choose to build manually from the command line, or you can use the python script provided.
The script build_lrose_manual.py
is in lrose-core/build/scripts
.
The usage is:
build_lrose_manual.py --help
Usage: build_lrose_manual.py [options]
Options:
-h, --help show this help message and exit
--debug Set debugging on
--verbose Set verbose debugging on
--package=PACKAGE Package name. Options are: lrose-core (default), lrose-
blaze, lrose-cyclone, lrose-cidd
--prefix=PREFIX Prefix name for install location
--scripts Install scripts as well as binaries
If you run using the defaults, it will install the lrose-core package into $HOME/lrose.
If you want to install the real-time runtime scripts, use --scripts
.
The make
application can use makefiles named either Makefile
or makefile
.
The lower-case version takes preference.
The codebase contains upper-case Makefiles appropriate for building lrose-core. If you are building lrose-core, you do not need this step.
If you are building a different version - for example samurai, you will need to install the makefiles for that version.
For the samurai distribtion, run the following:
cd $LROSE_CORE_DIR
./build/scripts/installPackageMakefiles.py --package samurai
For the lrose-radx distribtion, run the following:
cd $LROSE_CORE_DIR
./build/scripts/installPackageMakefiles.py --package lrose-radx
To re-install the lrose-core standard package Makefiles, perform the following:
cd $LROSE_CORE_DIR
./build/scripts/installPackageMakefiles.py
since lrose-core is the default package.
cd $LROSE_CORE_DIR/codebase/libs/tdrp/src
make install
cd $LROSE_CORE_DIR/codebase/apps/tdrp/src/tdrp_gen
make install
cd $LROSE_CORE_DIR/codebase/libs/
make -j 8 install_include
make -j 8 install
If you get an install error, try:
make install
cd $LROSE_CORE_DIR/codebase/apps
make -j 8 install
If you get an install error, try:
make install
cd $LROSE_CORE_DIR/codebase/apps/scripts/src
make install
cd $LROSE_CORE_DIR/codebase/apps/procmap/src/scripts
make install
Once you have set up the environment specified above, you are free to edit and build individual applications.
For example, if you want to work on RadxConvert, you would go to the relevant directory and perform the build locally there.
cd $LROSE_CORE_DIR/codebase/apps/Radx/src/RadxConvert
make clean
make
make install
The following is the full list of commands to run, in order.
You can cut-and-paste these into a terminal window to run the full procedure.
cd $LROSE_CORE_DIR
./build/scripts/installPackageMakefiles.py
cd $LROSE_CORE_DIR/codebase/libs/tdrp/src
make install
cd $LROSE_CORE_DIR/codebase/apps/tdrp/src/tdrp_gen
make install
cd $LROSE_CORE_DIR/codebase/libs/
make -j 8 install_include
make -j 8 install
make install
cd $LROSE_CORE_DIR/codebase/apps
make -j 8 install
make install
cd $LROSE_CORE_DIR/codebase/apps/scripts/src
make install
cd $LROSE_CORE_DIR/codebase/apps/procmap/src/scripts
make install