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

make install-rocksdb-ull failed with gcc 8.x #7

Closed
rleungx opened this issue Jan 4, 2019 · 1 comment
Closed

make install-rocksdb-ull failed with gcc 8.x #7

rleungx opened this issue Jan 4, 2019 · 1 comment
Labels
doc Issue in documentation

Comments

@rleungx
Copy link

rleungx commented Jan 4, 2019

When running make install-rocksdb-ull, there is an error:

In file included from memtable/skiplistrep.cc:6:
./memtable/inlineskiplist.h: In instantiation of 'void rocksdb::InlineSkipList<Comparator>::Node::StashHeight(int) [with Comparator = const rocksdb::MemTableRep::KeyComparator&]':
./memtable/inlineskiplist.h:612:3:   required from 'rocksdb::InlineSkipList<Comparator>::Node* rocksdb::InlineSkipList<Comparator>::AllocateNode(size_t, int) [with Comparator = const rocksdb::MemTableRep::KeyComparator&; size_t = long unsigned int]'
./memtable/inlineskiplist.h:574:13:   required from 'rocksdb::InlineSkipList<Comparator>::InlineSkipList(Comparator, rocksdb::Allocator*, int32_t, int32_t) [with Comparator = const rocksdb::MemTableRep::KeyComparator&; int32_t = int]'
memtable/skiplistrep.cc:28:28:   required from here
./memtable/inlineskiplist.h:283: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]
     memcpy(&next_[0], &height, sizeof(int));
     ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./memtable/inlineskiplist.h:47,
                 from memtable/skiplistrep.cc:6:
/usr/include/c++/8.2.1/atomic:352:12: note: 'struct std::atomic<rocksdb::InlineSkipList<const rocksdb::MemTableRep::KeyComparator&>::Node*>' declared here
     struct atomic<_Tp*>
            ^~~~~~~~~~~~
gcc version 8.2.1 20181127 (GCC)

This is a known issue in RocksDB: facebook/rocksdb#2705

@lni
Copy link
Owner

lni commented Jan 5, 2019

I guess non of my docker based test images use GCC 8. Thanks for reporting this issue.

I've updated the Makefile so user can specify what RocksDB version to use on command line, e.g.

ROCKSDB_VER=5.16.6 make install-rocksdb-ull

I am in the process of looking for a pure-go alternative KV store for Raft entry logs. Requiring users to specify CGO_CFLAGS/CGO_LDFLAGS when building their own application is not that user friendly. Issues like the above is another motivation for that.

RocksDB will always be supported, but it will eventually become something you need to explicitly select in NodeHostConfig - just like the gRPC based transport module in plugin/rpc.

@lni lni closed this as completed Jan 5, 2019
@lni lni added the doc Issue in documentation label Jan 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc Issue in documentation
Projects
None yet
Development

No branches or pull requests

2 participants