linxGnu / grocksdb

RocksDB wrapper for Go. Support 9.x, 8.x, 7.x, 6.x, etc

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Documentation fix: Add -lbz2 link flag

aureliar8 opened this issue · comments

On ubuntu22, I had to add -lbz2 to the CGO_LDFLAGS to successfully run go build

I'd suggest to add it in the Readme build flags:

CGO_CFLAGS="-I/path/to/rocksdb/include" \
CGO_LDFLAGS="-L/path/to/rocksdb -lrocksdb -lstdc++ -lm -lz -lsnappy -llz4 -lzstd -lbz2" \
  go build

Thanks fro your work

Thank you for suggestion. I think it's reasonable to update the README.

To clarify why bz2 is needed by your case:

  • your rocksdb was built with bz2 support
  • it's root cause why you need to specify bz2 link

I updated README. Thank you.