Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Added "coming soon" information about Mac OS support

...

Some developers may need to also include the underlying, external, transport libraries (e.g. libnng) in the package in order to make unit testing of wrappers (bindings) stand-alone. To do this, the CMake option -DPACK_EXTERNALS=1  should also be added to the CMake command line. (See the CMake examples paragraph later on this page.)


Coming Soon: Build On Mac OS

The reliance on the epoll family of functions to provide timeout support in RMR has been removed and RMR now supports the ability to be used on operating systems which do not support epoll (e.g. Mac OS).  The build process is the same, the operating system flavour will be detected during CMake configuration, however there are some limitations on Mac OS which cannot be worked round and affect one aspect of RMR functions: multi-threaded call support.


For the most part, the surpport for Mac OS is only to allow developers to easily test if they choose to us a non-Linux environment for development.  It is NOT recommended that RMR based applications be run on a Mac OS based system for production.


To build:

  1. Clone the repo and switch to the top level directory
  2. Create the .build directory (mkdir .build)
  3. Switch to the .build directory (cd .build)
  4. Configure with CMake (see note on options below)
  5. Build and install  (make install)

CMake Configuration Options

For developers, it is likely that configuration options will be useful:

  • the option to install the underlying transport libraries (e.g. NNG) along with the RMR libraries eliminates the need to install the transport libraries:
    -DPACK_EXTERNALS=1   
  • the option to install RMR, and transport libraries, into an alternate directory:
    -DCMAKE_INSTALL_PREFIX=/tmp/$LOGNAME/
    This will place libraries and header files into a directory based on the user name in /tmp (makes cleanup and/or complete removal much easier.
  • the option to generate headers and a development archive:
    -DDEV_PKG=1  
    This option will likely be required for C and Go developers as this causes the RMR header file (rmr.h) to be placed into the include directory. For Python programmers, it is likely that this option is not needed as the RMR bindings need to reference the shared object library (.so) which is not generated with this option. 

Setting the environment variable LD_LIBRARY_PATH to reference either the standard library installation location, or the alternate path provided as in the previous example, will likely be necessary. For C progammers, the C_INCLUDE_PATH environment variable will also need to be set if an alternate install location was used (this may also apply to Go programmers).


Example CMake Commands

These should be useful regardless of the development environment. These commands assume that the current working directory is .build which was created at the top of the repo directory tree.


# configure and generate a production package set

cmake ..

make package


# configure and generate a development package set

cmake .. -DDEV_PKG=1

make package


# configure and install in an alternate directory, and to install transport libraries

cmake .. -DEV_PKG=1 -DCMAKE_INSTALL_PREFIX=/tmp/$LOGNAME/ -DPACK_EXTERNALS

make install


# configure and install in the preferred system lib/include directory path; builds both package types

cmake .. -DDEV_PKG=1

make install

cmake .. 

make install