Abstract
The purpose of this documentation is to provided detailed information about the NDS client library to those wanting to further develope the NDS client library. It is NOT intended for those who simply want to use or develope applications against the NDS client library
Development Platforms
Linux (Red Hat Derivative)
Prerequesites
The easiest way to obtain the list of packages that needs to be installed prior to building the packages is by querying the specification file.
Obtaining build dependencies for NDS Client base distribution
egrep '^BuildRequires:' config/cmake/nds2-client*.spec.in \
| sed -e 's,^BuildRequires:[[:space:]]*,,' -e 's,[[:space:]]*[>][=][[:space:]]*[[:digit:].]*,,g' -e s/,
Linux (Debian Derivative)
Prerequesites
The easiest way to obtain the list of packages that needs to be installed prior to building the packages is by querying the control file.
Obtaining build dependencies for NDS Client base distribution
sed -n -e'/^Build-Depends:$/,/^Standards-Version:/p' debian/control \
| sed -e 's/^Build-Depends://' -e '/^Standards-Version:/d' -e 's/[(][^)]*[)]//g' -e 's/|[^,]*,/,/' -e 's/,//'
When updating debian/changelog, use
date '+%a, %d %b %G %T %z'
for properly formatted date information.
OSX
Prerequesites
The easiest way to obtain the list of packages that needs to be installed prior to building the packages is by querying the control file.
Obtaining build dependencies for NDS Client base distribution
sed -n -E -e'/^[ \t]*depends_(build|lib)/,/^$/p' config/cmake/Portfile.in \
| sed -E -e 's,^[ \t]*depends_(build|lib)(-append)*,,' -e 's/\\$//g' -e '/^([ \t]*|})$/d' -e 's/^[ \t]*port://g'
Windows
Prerequesites
- Python
- Python (2.7 or 3.6) is used to run the unit tests along with being a supported extension language. To support running of unit tests, only the interpreter needs to be installed. It can be obtained from www.python.org/downloads/windows
- If using version 2.7 of Python, then the version of numpy needs to be upgraded using the following command:
\Python27\python -m pip install --upgrade numpy
- If wanting to build debug version of library and using python, the file 'pyconfig.h' in the python installation directory needs to be edited to comment out '#define Py_DEBUG'. Also, python27.lib needs to be copied to python27_d.lib.
- SWIG
- To be able to build the Java or Python extensions, SWIG is required. The Windows version can be downloaded from www.swig.org/downloads Be sure to get the latest swigwin zip file.
- PowerShell
- To make building easier under windows, a PowerShell script has been created. The script can be invoked by calling powershell -command "[path_to_top_level_source_dir]\build-all.ps1 [options]"
Option | Description |
-EnabeTesting:[$true|$false] | Enable running of unit tests |
-EnabeBuildCore:[$true|$false] | Control building of the base component |
-EnabeBuildSWIG:[$true|$false] | Control building of the SWIG component |
Configuration
- As NDS Client is a cross platform library, CMake is used to configure the software when building from source. Currently, the minimal version of CMake needed is 3.0.2. Specifying options via CMake uses the following syntax: Invoking CMake:
cmake [<options>] <source_directory>
- CMAKE_INSTALL_PREFIX path
- Installation prefix
- REPLAY_BLOB_CACHE_DIR path
- Path to testing data
- WITH_GSSAPI path
- Path to top level gssapi installation or yes/no. If the value is no, then gssapi is disabled. If the value is yes, the system tries to auto detect. If a directory is specified, it is taken to be the top level directory of the gssapi installation.
- WITH_SASL path
- Path to top level SASL installation or yes/no. If the value is no, then SASL is disabled. If the value is yes, the system tries to auto detect. If a directory is specified, it is taken to be the top level directory of the SASL installation.
Docker
With the source code being hosted on git.ligo.org, one service that is available is continuous integration. As part of this service, several entries have been added to the configuration file (.gitlab-ci.yml) which allow for testing compilability of the code. There are two major flavors:
-
nds2-client-build/nds2-client-swig This paring is intended to be run on the gitlab CI infistructure whenever code is committed to the repository.
-
nds2-client-verify This is intended to be run manually on ones local host.
The nds2-client-verify variants can be run locally with the command:
gitlab-runner exec docker --timeout 7200 nds2-client-verify:<os_target>
Where os_target is one of:
-
bullseye
-
buster
-
jessie
-
stretch
-
rl8
-
rl9
-
sl7
-
ubuntu-1604
-
ubuntu-2004
-
ubuntu-2204