diff options
Diffstat (limited to '')
-rw-r--r-- | README.md | 26 |
1 files changed, 18 insertions, 8 deletions
@@ -1,7 +1,7 @@ # libnvme -![MesonBuild](https://github.com/linux-nvme/libnvme/actions/workflows/meson.yml/badge.svg) -![PyBuild](https://github.com/linux-nvme/libnvme/actions/workflows/python-publish.yml/badge.svg) +![MesonBuild](https://github.com/linux-nvme/libnvme/actions/workflows/build.yml/badge.svg) +![PyBuild](https://github.com/linux-nvme/libnvme/actions/workflows/release-python.yml/badge.svg) [![PyPI](https://img.shields.io/pypi/v/libnvme)](https://pypi.org/project/libnvme/) [![PyPI - Wheel](https://img.shields.io/pypi/wheel/libnvme)](https://pypi.org/project/libnvme/) ![GitHub](https://img.shields.io/github/license/linux-nvme/libnvme) @@ -79,7 +79,13 @@ there are two project which implement the Ninja and the Meson API in pure C99 - samurai: https://github.com/michaelforney/samurai.git - muon: https://git.sr.ht/~lattis/muon -See the CI [build](.github/workflows/build.yml) for an example how to use it. +The CI build helper script `scripts/build.sh` is able to setup and build this +project in a minimal setup using samurai and muon and thus only depending on: +- gcc +- make +- git + +`scripts/build.sh -m muon` ## To compile libnvme @@ -106,7 +112,7 @@ completely "clean" all the build artifacts, one need only delete the To compile: ``` -meson -C .build +meson compile -C .build ``` ## To install libnvme @@ -145,10 +151,10 @@ A few build options can be specified on the command line when invoking meson. | docs | [false], html, man, rst, all | Install documentation | | docs-build | [false], true | Enable build documentation | | python | [auto], enabled, disabled | Whether to build the Python bindings. When set to `auto`, the default, meson will check for the presence of the tools and libraries (e.g. `swig`) required to build the Python bindings. If found, meson will configure the project to build the Python bindings. If a tool or library is missing, then the Python bindings won't be built. Setting this to `enabled`, forces the Python bindings to be built. When set to `disabled`, meson will configure the project to not build the Python bindings.<br />Example: `meson setup .build -Dpython=disabled` | -| openssl | [auto], enabled, disabled | Enables OpenSSL dependend features (e.g. authentication), adds build dependency on OpenSSL | -| libdbus | auto, enabled, [disabled] | Enables D-Bus dependend features (libnvme-mi: End point discovery), adds build dependency on libdbus | +| openssl | [auto], enabled, disabled | Enables OpenSSL dependent features (e.g. TLS over TCP), adds build dependency on OpenSSL | +| libdbus | auto, enabled, [disabled] | Enables D-Bus dependent features (libnvme-mi: End point discovery), adds build dependency on libdbus | | json-c | [auto], enabled, disabled | (recommended) Enables JSON-C dependend features (e.g. config.json parsing), adds build depdency on json-c | -| keyutils | [auto], enabled, disabled | Enables keyutils dependend features (e.g. TLS over TCP), adds build dependency on keyutils | +| keyutils | [auto], enabled, disabled | Enables keyutils dependent features (e.g. authentication), adds build dependency on keyutils | See the full configuration options with @@ -171,8 +177,12 @@ To enable address sanitizer (advanced debugging of memory issues): meson setup .build -Db_sanitize=address ``` -This option adds `-fsanitize=address` to the gcc options. Note that when using the sanitize feature, the library `libasan.so` must be available and must be the very first library loaded when running an executable. Ensuring that `libasan.so` gets loaded first can be achieved with the `LD_PRELOAD` environment variable as follows: +This option adds `-fsanitize=address` to the gcc options. The tests can then be run normally (`meson test -C .build`). + +Note that when using the sanitize feature, the library `libasan.so` must be available and must be the very first library loaded when running an executable. If experiencing linking issues, you can ensure that `libasan.so` gets loaded first with the `LD_PRELOAD` environment variable as follows: ``` meson setup .build -Db_sanitize=address && LD_PRELOAD=/lib64/libasan.so.6 ninja -C .build test ``` + +It's also possible to enable the undefined behavior sanitizer with `-Db_sanitize=undefined`. To enable both, use `-Db_sanitize=address,undefined`. |