From 7e3a5850f34d4c8f16e5e0985920c0b6d12cf661 Mon Sep 17 00:00:00 2001 From: Niels de Vos Date: Wed, 29 Jan 2020 08:38:33 +0100 Subject: [PATCH] README: add requirement for build-tags when using non-current Ceph libraries In order to selectively exclude/include certain .go files while building and testing with the standard `go` tools, build-tags can be used. Because go-ceph aims to support multiple Ceph versions, some functions might not be available in the C libraries, or have been marked deprecated in the header files. By selectively excluding/including some of the .go files, warnings and errors can be prevented. See-also: https://golang.org/pkg/go/build/#hdr-Build_Constraints Signed-off-by: Niels de Vos --- README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/README.md b/README.md index 25b2344..8843afd 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,18 @@ On rpm based systems (dnf, yum, etc): libcephfs-devel librbd-devel librados-devel ``` +go-ceph tries to support different Ceph versions. However some functions might +only be available in recent versions, and others can be deprecated. In order to +work with non-current versions of Ceph, it is required to pass build-tags to on +the `go` commandline. A tag with the named Ceph release will enable/disable +certain features of the go-ceph packages, and prevent warnings or compile +problems. E.g. build against libcephfs/librados/librbd from Mimic, or run `go +test` against Limunous, use: +```sh +go build -tags mimic .... +go test -tags luminous .... +``` + ## Documentation Detailed documentation is available at