It may be necessary to provide configure with explicit CFLAGS and LDFLAGS to find the appropriate RADOS/Mobject headers/libraries.
You can manage Mobject and dependencies by hand, or via spack
Spack and Mobject
Spack uses RPATH to deal with library dependencies. For packages like mobject, though, RPATH is not sufficient. mobject needs margo and several other libraries, particularly if those mobject dependencies support pkg-config. Spack can help here.
(on one machine I had to set PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=yes to get pkg-config --cflags output. Not sure what happened there...)
A few extra steps beyond those listed above are required to build IOR against libmobject-store properly:
Since IOR is looking to link against librados by default, LIBS=-lmobject-store must be additionally specified on the configure line to link against Mobject libraries.
Since the RADOS backend in IOR is only including the rados/librados.h header, we need a way to point it at the Mobject headers instead. There are 2 options:
Manually modify the RADOS backend source to include libmobject-store.h instead.
Create a symlink to librados-mobject-store.h at rados/librados.h, making sure to inform configure of the location of the parent rados directory (i.e., not the directory the symlink itself is stored at) using CFLAGS.
Remove any references to '-lrados' in Makefile.am. Our configure invocation will add the right libraries.
Running against Mobject
With IOR properly linked against Mobject, next run docker ps to verify the mobject/demo daemon is running, and if not follow the instructions in the Deploying section.
The Mobject server daemon spawned inside of the Docker container will write its config file out to /tmp/mobject-cluster.gid on success. To be able to connect to this server daemon, the Mobject client library must be informed on the location of this config file by exporting its location in the environment variable MOBJECT_CLUSTER_FILE (e.g., export MOBJECT_CLUSTER_FILE=/tmp/mobject-cluster.gid).
To run, invoke IOR with the RADOS backend and required arguments. For example:
ior -a RADOS --rados.user=foo --rados.pool=bar --rados.conf=$MOBJECT_CLUSTER_FILE.
(the user, pool, and conf arguments are ignored by mobject, but are required by the IOR RADOS driver)
Running against RADOS
Run docker ps to verify the ceph/demo daemon is running, and if not follow the instructions in the Deploying section.
Note that since the docker container runs as root, the Ceph config files it creates require root priveleges for reading. To work around this, either run IOR as root, or update the priveleges of these files by running sudo chmod 644 /etc/ceph/*.
To run, simply invoke IOR, specifying RADOS as the backend, like: