abligh / gonbdserver

And NBD server written in golang
MIT License
81 stars 22 forks source link

Reverse the `noceph` build flag to `ceph` #6

Open robvanmieghem opened 7 years ago

robvanmieghem commented 7 years ago

On a default linux system, without the ceph developer packages installed, the build currently fails:

github.com/ceph/go-ceph/rados/conn.go:5:29: fatal error: rados/librados.h: No such file or directory
 // #include <rados/librados.h>

Wouldn't it be better to reverse the build directive in rbd.go from // +build linux,!noceph to // +build linux,ceph so one can choose to explicitly enable the RbdBackend instead?

This is especially annoying if you want to import the nbd code in an external project where this blocks a normal go get installation.

abligh commented 7 years ago

Hmm... possibly yes. Indeed if I do that, I could just to '// +build ceph' so that ceph could be built on any platform, as ceph client can be built on other OS (at least it could at one stage).

On 22 Feb 2017, at 08:37, Rob Van Mieghem notifications@github.com wrote:

On a default linux system, without the ceph developer packages installed, the build currently fails. Wouldn't it be better to reverse the build directive in rbd.go from // +build linux,!noceph to // +build linux,ceph so one can choose to explicitly enable the RbdBackend instead?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

-- Alex Bligh