Re:LevelDB: a fast and lightweight key/value database library
by argvzero on Sunday May 08, 2011 @11:49PM
(#2527490)
Was really psyched until I saw --std=c++0x in the Makefile. What 0x features does leveldb depend on, and can those dependencies be realistically removed?
[ Parent
| on HN ]
Re:LevelDB: a fast and lightweight key/value database library
by sghemawat on Monday May 09, 2011 @12:54AM
(#2527611)
The use of c++0x should be limited to the small AtomicPointer class in port_posix.h. The class uses <cstdatomic> for its implementation. If you can provide a different implementation of "acquire store" and "release load" for your architecture, you should be all set without the need for c++0x.
I suspect that you may find suitable code in the chromium source code. See leveldb's port_chromium.h.
Re:LevelDB: a fast and lightweight key/value database library
by davisp on Monday May 09, 2011 @07:17AM
(#2528290)
I managed to get an initial patch up here:
Re:LevelDB: a fast and lightweight key/value database library
by xinmans on Wednesday May 11, 2011 @11:11PM
(#2539345)
I suspect you need a newer version of gcc/g++ (one that supports the
c++0x standard). You can probably download a later gcc package and
then use that to install.
-Jeff
On Wed, May 11, 2011 at 3:37 AM, conglin.deng <[email protected]> wrote:
> Hi jeff,
>
>
>
> I have checkout leveldb code from code.google.com,
>
> But when I run make command on the root folder, encounter a error as
> below,
>
>
>
> ///////////////////////////
>
> [root@host]$make
>
> g++ -c -DLEVELDB_PLATFORM_POSIX -I. -I./include -std=c++0x -g2
> db/db_bench.cc -o db/db_bench.o
>
> cc1plus: error: unrecognized command line option "-std=c++0x"
>
> make: * [db/db_bench.o] Error 1
>
> [root@host]$pwd
>
> /home/admin/leveldb
>
> [root@host]$
>
> ///////////////////////////
>
>
>
>
>
> Would you please to tell me how to build and setup leveldb on a redhat
> 5.4 env. Thanks very much!
>
>
>
> Thanks
>
> linc