Skip to content
lni edited this page Jan 16, 2019 · 4 revisions

FAQ

Q: I got the following error message when building my dragonboat application in Go.

internal/logdb/gorocksdb/backup.go:5:23: fatal error: rocksdb/c.h: No such file or directory
compilation terminated.

A: RocksDB is not installed or its installation location is not provided to the go tool when building your application. Assuming RocksDB's header files are installed at /usr/local/include/rocksdb, and its lib files are installed at /usr/local/lib, use the following command when building your package xyz.

CGO_LDFLAGS="-L/usr/local/lib -lrocksdb" CGO_CFLAGS="-I/usr/local/include" go build xyz

Q: I got the following error message when building my dragonboat application in Go.

# github.com/lni/dragonboat/internal/logdb/gorocksdb
/tmp/go-build420214618/b111/_x003.o: In function `_cgo_ee4f3b6122c2_Cfunc_rocksdb_cache_get_pinned_usage':
/tmp/go-build/cgo-gcc-prolog:73: undefined reference to `rocksdb_cache_get_pinned_usage'
/tmp/go-build420214618/b111/_x003.o: In function `_cgo_ee4f3b6122c2_Cfunc_rocksdb_cache_get_usage':
/tmp/go-build/cgo-gcc-prolog:91: undefined reference to `rocksdb_cache_get_usage'
/tmp/go-build420214618/b111/_x005.o: In function `_cgo_ee4f3b6122c2_Cfunc_rocksdb_checkpoint_create':
/tmp/go-build/cgo-gcc-prolog:43: undefined reference to `rocksdb_checkpoint_create'
/tmp/go-build420214618/b111/_x005.o: In function `_cgo_ee4f3b6122c2_Cfunc_rocksdb_checkpoint_object_destroy':
/tmp/go-build/cgo-gcc-prolog:55: undefined reference to `rocksdb_checkpoint_object_destroy'
... ...

A: RocksDB is not installed or its installation location is not provided to the go tool when building your application. Assuming RocksDB is installed at /usr/local/lib, use the following command when building your package xyz.

CGO_LDFLAGS="-L/usr/local/lib -lrocksdb" go build xyz

Q: RocksDB failed to build.

A: Please use GCC version 5, 6 or 7 for building RocksDB. When using GCC 8, you may want to use the following command to install a more recent version of RocksDB.

ROCKSDB_VER=5.16.6 make install-rocksdb-ull

This issue has been discussed in #7 and #16.

Q: I got the following error message when playing with those built-in tests.

==27559==ASan runtime does not come first in initial library list; you should either link runtime to your application or manually preload it with LD_PRELOAD.

A: Run make clean and start over again. This is usually caused by loading a .so plugin built with ASAN from a test program not using ASAN.

Q: What is the status for other CPU/OS support.

A: Linux/AMD64 is the most tested platform. MacOSX/Darwin can be used as your DEV/TEST environment. Dragonboat is also known to work on Linux/ARM64,it has been tested on both Amazon EC2's A1 instances and scaleway.com's ARM cloud. 32bit platforms such as Linux/386 will not be supported. Windows will not be supported.

MacOSX/Darwin should not be used in production, see this issue. A warning message is emitted every time when you start NodeHost on Darwin.

Q: Go module support?

A: Go module was added as preliminary support in Go 1.11, it will be finalized in the coming Go 1.12. Go module will be supported by dragonboat once Go 1.12 is released.

Clone this wiki locally