Skip to content

Commit

Permalink
Merge pull request #99 from Lesterpig/97_indicate_compatible_rocksdb_…
Browse files Browse the repository at this point in the history
…version

Add RocksDB required version in README
  • Loading branch information
tecbot authored Jun 9, 2017
2 parents b4e91b8 + 1dead17 commit 209fbe7
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 31 deletions.
2 changes: 0 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,9 @@ install:
- sudo cp -r ./include/rocksdb/ /usr/include/
- popd
- go get -t ./...
- go version|grep go1.5 > /dev/null && go get -t -tags embed ./... || true

script:
- go test -v ./
- go version|grep go1.5 > /dev/null && go test -v -tags embed ./ || true

notifications:
email:
Expand Down
16 changes: 7 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,15 @@

## Install

There exist two options to install gorocksdb.
You can use either a own shared library or you use the embedded RocksDB version from [CockroachDB](https://github.com/cockroachdb/c-rocksdb).
You'll need to build [RocksDB](https://github.com/facebook/rocksdb) v5.4+ on your machine.

To install the embedded version (it might take a while):

go get -tags=embed github.com/tecbot/gorocksdb

If you want to go the way with the shared library you'll need to build
[RocksDB](https://github.com/facebook/rocksdb) before on your machine.
If you built RocksDB you can install gorocksdb now:
After that, you can install gorocksdb using the following command:

CGO_CFLAGS="-I/path/to/rocksdb/include" \
CGO_LDFLAGS="-L/path/to/rocksdb -lrocksdb -lstdc++ -lm -lz -lbz2 -lsnappy -llz4" \
go get github.com/tecbot/gorocksdb

Please note that this package might upgrade the required RocksDB version at any moment.
Vendoring is thus highly recommended if you require high stability.

*The [embedded CockroachDB RocksDB](https://github.com/cockroachdb/c-rocksdb) is no longer supported in gorocksdb.*
2 changes: 0 additions & 2 deletions dynflag.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// +build !embed

package gorocksdb

// #cgo LDFLAGS: -lrocksdb -lstdc++ -lm -lz -lbz2 -lsnappy
Expand Down
18 changes: 0 additions & 18 deletions embedflag.go

This file was deleted.

0 comments on commit 209fbe7

Please sign in to comment.