Building and Installing REDHAWK from Source
Building the Framework
This section describes how to build and install REDHAWK from source and use the environment variables to run REDHAWK.
Installing Build Dependencies
Building REDHAWK from source requires a few additional dependencies beyond those required to run REDHAWK. The following procedure explains how to install the additional build dependencies.
- First, ensure your system has the necessary dependency software provided by RHEL / CentOS and Fedora EPEL.
- Ensure the REDHAWK Yum repository is set up using the process described in Setting Up the REDHAWK Repostiory. Install the dependencies distributed with the REDHAWK tarball.
Installing the Framework from Source
To install the Core Framework (CF) from source, the redhawk-src-<version>.tar.gz
must be downloaded.
wget https://github.com/RedhawkSDR/redhawk/releases/download/<version>/redhawk-src-<version>.tar.gz
You must set the OSSIEHOME
and SDRROOT
environment variables (recommended defaults shown below) before running the installation script. You must have write permission for the locations of OSSIEHOME
and SDRROOT
or the installation will not work.
Recent Linux distributions include newer versions of GCC that default to the C++11 standard or newer. REDHAWK is developed and tested using the C++98 standard and may not compile in C++11 mode.
To configure GCC to use the C++98 standard, set the CXXFLAGS
environment variable before building REDHAWK from source:
export CXXFLAGS="--std=gnu++98"
To compile the source, execute the following commands:
export OSSIEHOME=/usr/local/redhawk/core
export SDRROOT=/var/redhawk/sdr
tar zxvf redhawk-src-<version>.tar.gz
cd redhawk-src-<version>/
./redhawk-install.sh
. $OSSIEHOME/environment-setup
If you wish to preserve the environment used to compile the source, add the following lines to .bashrc
:
export OSSIEHOME=/usr/local/redhawk/core
export SDRROOT=/var/redhawk/sdr
. $OSSIEHOME/environment-setup
To build the source code with or without optional features, provide the appropriate build option to the configure
setup. The following table describes some common options.
Common Build Options for the Configure
Command
Option | Description |
---|---|
--disable-affinity |
Affinity processing is enabled by default. This option will disable NUMA affinity processing. |
--enable-persistence=<type> |
Enable persistence support. Supported types: bdb , gdbm , sqlite . |
--disable-persistence |
Disable persistence support. This may be desired for specialized builds to eliminate the additional database dependency. |
--disable-log4cxx |
Disable log4cxx support. |
As of REDHAWK 2.2.1, the default setting is to enable persistence using sqlite
.
It is only necessary to specify --enable-persistence
to use a different backend database.
The default setting from prior versions is selectable with --disable-persistence
.
To view a complete list of configurations, enter the following commands:
cd <redhawk src directory>
cd redhawk/src
./reconf
./configure --help
To provide any of the build options, edit the redhawk-install.sh
script and change the following line to include the appropriate option:
./configure
Setting Environment Variables
REDHAWK expects several environment variables to be set to run. REDHAWK installs a set of scripts that appropriately set these variables in the etc/profile.d
directory in your installation. Source the appropriate files for your shell before running. For example, if you installed to the default OSSIEHOME
location (/usr/local/redhawk/core
) and are using bash/dash:
. /usr/local/redhawk/core/etc/profile.d/redhawk.sh
. /usr/local/redhawk/core/etc/profile.d/redhawk-sdrroot.sh
or copy them to your system’s /etc/profile.d
directory to make them global for all users:
sudo cp /usr/local/redhawk/core/etc/profile.d/* /etc/profile.d
Remember to restart your terminal if you modify the system’s /etc/profile.d
directory for changes to take effect.
Configuring omniORB
Refer to Configuring omniORB for information on how to edit the omniORB configuration file (/etc/omniORB.cfg
) to provide information about how to reach the CORBA Event Service.