This procedure describes how to clone the source code from the pmdk github repository and compile, then install it.
If your system is behind a firewall and requires a proxy to access the Internet, configure your package manager to use a proxy.
To build the PMDK libraries on Linux, you may need to install the following required packages on the build system:
$ sudo dnf install autoconf automake pkg-config glib2-devel libfabric-devel pandoc ncurses-devel
Some of the required packages can be found in the EPEL repository. Verify the EPEL repository is active:
$ sudo yum repolist
If the EPEL repository is not listed, install and activate it using:
$ sudo yum -y install epel-release
To install the prerequisite packages, run:
$ sudo yum install autoconf automake pkgconfig glib2-devel libfabric-devel pandoc ncurses-devel
For Ubuntu 18.04 (Bionic) or Debian 9 (Stretch) or later
$ sudo apt install autoconf automake pkg-config libglib2.0-dev libfabric-dev pandoc libncurses5-dev
For Ubuntu 16.04 (Xenial) and Debian 8 (Jessie):
$ sudo apt install autoconf automake pkg-config libglib2.0-dev pandoc libncurses5-dev
To build and test the PMDK library on FreeBSD, you may need to install the following required packages on the build system:
$ sudo pkg install autoconf automake bash coreutils e2fsprogs-libuuid glib2 glib2-devel gmake libunwind pandoc ncurses pkg-config
(*) The pkg version of ncurses is required for proper operation; the base version included in FreeBSD is not sufficient.
The following packages are required only by selected PMDK components or features. If not present, those components or features may not be available:
libfabric (v1.4.2 or later) -- required by librpmem
libndctl and libdaxctl (v60.1 or later) -- required by daxio and RAS features. See Installing NDCTL
To build pmdk without ndctl support, set 'NDCTL_ENABLE=n' using:
$ export NDCTL_ENABLE=n
A C/C++ Compiler is required. GCC/G++ will be used in this documentation but you may use a different compiler then set the
CXX shell environments accordingly.
$ sudo dnf install gcc gcc-c++
$ sudo yum install gcc gcc-c++
$ sudo apt install gcc g++
The following uses the
git utility to clone the repository.
$ git clone https://github.com/pmem/pmdk$ cd pmdk
$ wget https://github.com/pmem/pmdk/archive/master.zip$ unzip master.zip$ cd pmdk-master
To build the master branch run the
make utility in the root directory:
If you want to compile with a different compiler, you have to provide the
CXXvariables. For example:
$ make CC=clang CXX=clang++
These variables are independent and setting
CC=clang does not set
Installing the library is more convenient since it installs man pages and libraries in the standard system locations.
To install the libraries to the default
$ sudo make install
To install this library into other locations, you can use the
prefix=path option, e.g:
$ sudo make install prefix=/usr
If you installed to non-standard directory (anything other than /usr) you may need to add $prefix/lib or $prefix/lib64 (depending on the distribution you use) to the list of directories searched by the linker:
sudo sh -c "echo /usr/local/lib >> /etc/ld.so.conf"sudo sh -c "echo /usr/local/lib64 >> /etc/ld.so.conf"sudo ldconfig