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

compile error with g++-4.7 #65

Closed
aimxhaisse opened this issue Jan 29, 2014 · 2 comments
Closed

compile error with g++-4.7 #65

aimxhaisse opened this issue Jan 29, 2014 · 2 comments

Comments

@aimxhaisse
Copy link

It seems that there is a missing include with g++-4.7:

$ make CXX=g++-4.7
g++-4.7 -g -Wall -Werror -I. -I./include -std=gnu++11  -DROCKSDB_PLATFORM_POSIX  -DOS_LINUX -fno-builtin-memcmp -DROCKSDB_FALLOCATE_PRESENT -DGFLAGS -DZLIB -DBZIP2   -DHAVE_JEMALLOC -O2 -fno-omit-frame-pointer -momit-leaf-frame-pointer -Woverloaded-virtual -c db/compaction.cc -o db/compaction.o 
In file included from ./db/compaction.h:11:0,
                 from db/compaction.cc:10:
./db/version_set.h:437:3: error: 'atomic' in namespace 'std' does not name a type
./db/version_set.h: In member function 'uint64_t rocksdb::VersionSet::LastSequence() const':
./db/version_set.h:333:12: error: 'last_sequence_' was not declared in this scope
./db/version_set.h:333:32: error: 'memory_order_acquire' is not a member of 'std'
./db/version_set.h: In member function 'void rocksdb::VersionSet::SetLastSequence(uint64_t)':
./db/version_set.h:338:5: error: 'last_sequence_' was not declared in this scope
./db/version_set.h:339:29: error: 'memory_order_release' is not a member of 'std'
make: *** [db/compaction.o] Error 1
@aimxhaisse
Copy link
Author

Fixed with the following patch:

diff --git a/db/version_set.h b/db/version_set.h
index 376b259..da23772 100644
--- a/db/version_set.h
+++ b/db/version_set.h
@@ -18,6 +18,7 @@
 // synchronization on all accesses.

 #pragma once
+#include <atomic>
 #include <map>
 #include <memory>
 #include <set>

@igorcanadi
Copy link
Collaborator

Tnx for the report! Fixed with e57f0cc

201341 pushed a commit to 201341/rocksdb that referenced this issue Mar 25, 2020
Move static methods to CloudEnvImpl
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