Lendfating / leveldb

Automatically exported from code.google.com/p/leveldb
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Trouble building on Linux Red Hat with g++ 3.4.6 #62

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
When building I get the following error:
g++ -c -I. -I./include -fno-builtin-memcmp -DLEVELDB_PLATFORM_POSIX -pthread -DO
S_LINUX -O2 -DNDEBUG         db/version_set.cc -o db/version_set.o
db/version_set.cc: In member function `void leveldb::VersionSet::Builder::Apply(
leveldb::VersionEdit*)':
./db/version_edit.h:100: error: `std::vector<std::pair<int, leveldb::InternalKey
>, std::allocator<std::pair<int, leveldb::InternalKey> > > leveldb::VersionEdit:
:compact_pointers_' is private
db/version_set.cc:574: error: within this context
./db/version_edit.h:100: error: `std::vector<std::pair<int, leveldb::InternalKey
>, std::allocator<std::pair<int, leveldb::InternalKey> > > leveldb::VersionEdit:
:compact_pointers_' is private
db/version_set.cc:575: error: within this context
./db/version_edit.h:100: error: `std::vector<std::pair<int, leveldb::InternalKey
>, std::allocator<std::pair<int, leveldb::InternalKey> > > leveldb::VersionEdit:
:compact_pointers_' is private
db/version_set.cc:577: error: within this context
./db/version_edit.h:87: error: `typedef class std::set<std::pair<int, uint64_t>,
 std::less<std::pair<int, uint64_t> >, std::allocator<std::pair<int, uint64_t> >
 > leveldb::VersionEdit::DeletedFileSet' is private
db/version_set.cc:581: error: within this context
./db/version_edit.h:101: error: `std::set<std::pair<int, uint64_t>, std::less<st
d::pair<int, uint64_t> >, std::allocator<std::pair<int, uint64_t> > > leveldb::V
ersionEdit::deleted_files_' is private
db/version_set.cc:581: error: within this context
./db/version_edit.h:102: error: `std::vector<std::pair<int, leveldb::FileMetaDat
a>, std::allocator<std::pair<int, leveldb::FileMetaData> > > leveldb::VersionEdi
t::new_files_' is private
db/version_set.cc:591: error: within this context
./db/version_edit.h:102: error: `std::vector<std::pair<int, leveldb::FileMetaDat
a>, std::allocator<std::pair<int, leveldb::FileMetaData> > > leveldb::VersionEdi
t::new_files_' is private
db/version_set.cc:592: error: within this context
./db/version_edit.h:102: error: `std::vector<std::pair<int, leveldb::FileMetaDat
a>, std::allocator<std::pair<int, leveldb::FileMetaData> > > leveldb::VersionEdi
t::new_files_' is private
db/version_set.cc:593: error: within this context
db/version_set.cc: In member function `void leveldb::VersionSet::Builder::SaveTo
(leveldb::Version*)':
./db/version_set.h:122: error: `std::vector<leveldb::FileMetaData*, std::allocat
or<leveldb::FileMetaData*> > leveldb::Version::files_[7]' is private
db/version_set.cc:624: error: within this context
./db/version_set.h:122: error: `std::vector<leveldb::FileMetaData*, std::allocat
or<leveldb::FileMetaData*> > leveldb::Version::files_[7]' is private
db/version_set.cc:628: error: within this context
db/version_set.cc: In member function `void leveldb::VersionSet::Builder::MaybeA
ddFile(leveldb::Version*, int, leveldb::FileMetaData*)':
./db/version_set.h:122: error: `std::vector<leveldb::FileMetaData*, std::allocat
or<leveldb::FileMetaData*> > leveldb::Version::files_[7]' is private
db/version_set.cc:670: error: within this context
make: *** [db/version_set.o] Error 1

What version of the product are you using? On what operating system?
I cloned the git repository on Dec 16.  

Operating system is Linux Red Hat, uname output is:
bash-3.00$ uname -a
Linux adc2190095 2.6.9-89.0.0.0.1.ELxenU #1 SMP Tue May 19 04:48:26 EDT 2009 
i686 i686 i386 GNU/Linux

Compiler is gcc:

bash-3.00$ g++ --version
g++ (GCC) 3.4.6 20060404 (Red Hat 3.4.6-11)
Copyright (C) 2006 Free Software Foundation, Inc.

Original issue reported on code.google.com by Lauren.F...@gmail.com on 16 Dec 2011 at 5:15

GoogleCodeExporter commented 9 years ago
hi
your GCC version may be too old to compile leveldb

Original comment by yafei.zh...@langtaojin.com on 12 Jan 2012 at 9:14

GoogleCodeExporter commented 9 years ago
edit MakeFile and set CFLAGS like this:
CFLAGS  = -c -fno-access-control  -I. -I./include $(PORT_CFLAGS) 
$(PLATFORM_CFLAGS) $(OPT) $(SNAPPY_CFLAGS)

now make it and works

Original comment by simon...@gmail.com on 16 Jan 2012 at 8:22

GoogleCodeExporter commented 9 years ago
It's not CFLAGS, set CXXFLAGS like this:
CXXFLAGS += -fno-access-control -I. -I./include $(PLATFORM_CXXFLAGS) $(OPT)
It works.

Original comment by dark.z....@gmail.com on 7 Jan 2014 at 3:23