Building libzpc
Read about the prerequisites and instructions for building the libzpc library.
The following software components are the minimum requirements for building the libzpc library:
- a 64-bit Linux® on IBM® Z and IBM LinuxONE platform (s390x),
- a Linux kernel version 5.7 or later. For ECC programming, a kernel version 5.10 or later is required.
- a C99 compiler for the C programming language (a GCC-compatible compiler driver (clang)),
- the libpthread library, providing functions that support POSIX threading,
- CMake version 3.10 or later, an open source, cross-platform family of tools designed to build, test and package software,
- a make tool for automatic building of executable programs and libraries from source code.
Additional prerequisites for building the test program are the following components:
- a C++11 compiler (clang or g++),
- a libjson-c devel package version 0.13 or later, which is a library to construct JSON objects in C, output them as JSON formatted strings, and parse JSON formatted strings back into the C representation of JSON objects,
- an internet connection.
Viewing and generating libzpc documentation
You can view an online version of the libzpc documentation at:
https://opencryptoki.github.io/libzpc/
The source for generating this documentation is updated with each published modification of libzpc and may contain information that is more current than the current edition of this publication.
You can also generate an HTML or PDF version of this libzpc documentation yourself from information within the libzpc code, using one of the following documentation generators:
- Doxygen version 1.9.8 or later, which is a documentation generator and static analysis tool for software source trees. When used as a documentation generator, Doxygen extracts information from specially-formatted comments within the code.
- latex or bibtex, which are document generation tools most often used for producing medium-to-large technical or scientific documents.
Building the executable libzpc library
To build the executable libzpc library versions, execute the following commands:
mkdir build && cd build cmake .. make
You can pass the following options to the cmake invocation:
- ..
- points to the upper directory which must contain the CMakeLists.txt file used for the build. (Or you can specify a different file path containing CMakeLists.txt.)
- -DCMAKE_INSTALL_PREFIX=<path>
- Change the install prefix from /usr/local/ to <path>.
- -DCMAKE_BUILD_TYPE=<type>
- Choose predefined build options. The choices for <type> are
Debug,Release,RelWithDebInfo, andMinSizeRel. - -DBUILD_SHARED_LIBS=ON
- Build a shared object (instead of an archive).
- -DBUILD_TEST=ON
- Build the test program.
- -DBUILD_DOC=ON
- Build the html and latex doc.
Complete command example for cloning and building:
# git clone https://github.com/opencryptoki/libzpc # mkdir build # cd build # cmake -DBUILD_TEST=ON -DCMAKE_BUILD_TYPE=Debug .. (or, for example: # cmake -DCMAKE_BUILD_TYPE=Release ..) # make # make install # ldconfig
For options that are available for the cmake command, refer to the cmake man page.
Custom compile options can also be passed to cmake via the CFLAGS and CXXFLAGS environment variables.