Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: Workaround for rocksdb compiling errors
When compiling cubefs using a newer version gcc (version 10.2.1), it complains that: ./db/version_edit.h:156:33: error: implicitly-declared ‘constexpr rocksdb::FileDescriptor::FileDescriptor(const rocksdb::FileDescriptor&)’ is deprecated [-Werror=deprecated-copy] 76 | struct FileMetaData { | ^~~~~~~~~~~~ ./memtable/inlineskiplist.h:282:11: error: ‘void* memcpy(void*, const void*, size_t)’ writing to an object of type ‘struct std::atomic<rocksdb::InlineSkipList<const rocksdb::MemTableRep::KeyComparator&>::Node*>’ with no trivial copy-assignment [-Werror=class-memaccess] 282 | memcpy(&next_[0], &height, sizeof(int)); | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ./utilities/persistent_cache/persistent_cache_util.h:51:23: error: moving a local object in a return statement prevents copy elision [-Werror=pessimizing-move] 51 | return std::move(t); | ^ The best way to address that is to backport patches or upgrade rocksdb. However this is a big move for cubefs. So let's just switch these errors off temporarily to make gcc happy. Reference: facebook/rocksdb#5303 Signed-off-by: Sheng Yong <[email protected]>
- Loading branch information