Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ZanRedisDB make failed:undefined reference to `ZSTD_versionNumber' #56

Open
hhofchina opened this issue Feb 10, 2020 · 3 comments
Open

Comments

@hhofchina
Copy link

github.com/youzan/gorocksdb

/root/soft/rocksdb/librocksdb.a(db_impl.o): In function rocksdb::DBImpl::DBImpl(rocksdb::DBOptions const&, std::string const&, bool, bool)': /root/soft/rocksdb/./util/compression.h:275: undefined reference to ZSTD_versionNumber'

@absolute8511
Copy link

rocksdb的zstd压缩开启了的话, 可以使用下面两种方式解决

添加CGO_LDFLAGS参数, 例如 CGO_LDFLAGS="-L/usr/local/lib -lrocksdb -lzstd" ,这样要求其他部署机器上也要安装 zstd 库

或者编译rocksdb时, 使用ROCKSDB_DISABLE_ZSTD禁用zstd

@hhofchina
Copy link
Author

/root/soft/rocksdb/./util/compression.h:844: undefined reference to LZ4_createStreamDecode' /root/soft/rocksdb/librocksdb.a(format.o): In function rocksdb::UncompressBlockContentsForCompressionType(rocksdb::UncompressionContext const&, char const*, unsigned long, rocksdb::BlockContents*, unsigned int, rocksdb::ImmutableCFOptions const&, rocksdb::MemoryAllocator*)':
format.cc:(.text+0x103e): undefined reference to LZ4_setStreamDecode' format.cc:(.text+0x1065): undefined reference to LZ4_decompress_safe_continue'
format.cc:(.text+0x1074): undefined reference to LZ4_freeStreamDecode' format.cc:(.text+0x127e): undefined reference to LZ4_createStreamDecode'
format.cc:(.text+0x129e): undefined reference to LZ4_setStreamDecode' format.cc:(.text+0x12c5): undefined reference to LZ4_decompress_safe_continue'
format.cc:(.text+0x12d4): undefined reference to `LZ4_freeStreamDecode'

需要继续禁用LZ4?

@absolute8511
Copy link

是的, 类似处理

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants