cockroachdb / c-rocksdb

🚫 DEPRECATED
45 stars 19 forks source link

Fails to compile on DragonflyBSD #5

Open cgag opened 9 years ago

cgag commented 9 years ago

I tried to go get cockroach, but I get this error:

# github.com/cockroachdb/c-rocksdb
In file included from internal/port/port.h:18:0,
                 from internal/db/filename.h:18,
                 from internal/util/auto_roll_logger.h:12,
                 from src/go/src/github.com/cockroachdb/c-rocksdb/auto_roll_logger.cc:6:
internal/port/port_posix.h:37:22: fatal error: endian.h: No such file or directory
compilation terminated.

I looked at the detect platform script and I can see it uses uname -s and compares it to DragonFly, which should define OS_DRAGONFLYBSD. That all looks correct but the if defined check still seems to fail in port_posix.h.

Let me know if there's any more information I can get for you if you don't have access to a dragonfly system.

petermattis commented 9 years ago

@cgag While rocksdb supports DragonFly, our c-rocksdb package doesn't (yet). Adding support should be pretty easy. You just need to add the appropriate cflags to https://github.com/cockroachdb/c-rocksdb/blob/master/cgo_flags.go with the build constraint of dragonfly. Something like:

// #cgo dragonfly CPPFLAGS: -DOS_DRAGONFLYBSD
knz commented 8 years ago

See https://github.com/cockroachdb/c-rocksdb/pull/12 And also https://github.com/cockroachdb/c-rocksdb/commit/4d67cb2d76c14b7d117fbcd95fa9586b7b92e048