if you are using Ubuntu 18, just use apt pkg.
This tutorial is tested on Ubuntu 16, and would build PMDK & C++ bindings from source codes.
Before starting, make sure
autoconf, cmake, make are on your computer.
firstly install NDCTL from source codes
# install dependence sudo apt-get install -y git gcc g++ autoconf automake asciidoc asciidoctor bash-completion xmlto libtool pkg-config libglib2.0-0 libglib2.0-dev doxygen graphviz pandoc libncurses5 libkmod2 libkmod-dev libudev-dev uuid-dev libjson-c-dev libkeyutils-dev git clone https://github.com/pmem/ndctl cd ndctl ./autogen.sh ./configure CFLAGS='-g -O2' --prefix=/usr/local --sysconfdir=/etc make sudo make install
Secondly install PMDK from source codes
# install dependence sudo apt install autoconf automake pkg-config libglib2.0-dev pandoc libncurses5-dev # Note: if you need RDMA remote access, install libfabric from source codes: https://github.com/ofiwg/libfabric git clone https://github.com/pmem/pmdk cd pmdk make sudo make install # update so path sudo sh -c "echo /usr/local/lib >> /etc/ld.so.conf" sudo sh -c "echo /usr/local/lib64 >> /etc/ld.so.conf" sudo ldconfig
Finally install PMDK Cpp bindings from source codes. Note: here use 1.10 as an example. I have some unknown building errors on 1.11.
wget https://github.com/pmem/libpmemobj-cpp/archive/1.10.zip unzip 1.10.zip cd libpmemobj-cpp-1.10 mkdir build cd build cmake .. # note: building is slow here, you can use -j 17 or sth else to make it faster make make install
by default, all *.so and *.hpp would be installed to
You can test your new lib by using pmdk-example