creationix / node-leveldb

NodeJS bindings to levelDB - a fast and lightweight key/value database library
http://code.google.com/p/leveldb/
113 stars 32 forks source link

Compiling on Mac OS X 10.6.7 Fails #3

Closed joemccann closed 13 years ago

joemccann commented 13 years ago

Have a look: Checking for program g++ or c++ : /usr/bin/g++ Checking for program cpp : /usr/bin/cpp Checking for program ar : /usr/bin/ar Checking for program ranlib : /usr/bin/ranlib Checking for g++ : ok
Checking for program gcc or cc : /usr/bin/gcc Checking for program ar : /usr/bin/ar Checking for program ranlib : /usr/bin/ranlib Checking for gcc : ok
Checking for node path : ok /Users/joemccann718/.node_libraries Checking for node prefix : ok /usr/local 'configure' finished successfully (0.070s) Waf: Entering directory /Users/joemccann718/Documents/workspace/node-leveldb/build' [ 1/72] cxx: deps/leveldb/db/builder.cc -> build/default/deps/leveldb/db/builder_1.o cc1plus: error: unrecognized command line option "-std=c++0x" [ 2/72] cxx: deps/leveldb/db/db_impl.cc -> build/default/deps/leveldb/db/db_impl_1.o [ 3/72] cxx: deps/leveldb/db/db_iter.cc -> build/default/deps/leveldb/db/db_iter_1.o cc1plus: error: unrecognized command line option "-std=c++0x" cc1plus: error: unrecognized command line option "-std=c++0x" Waf: Leaving directory/Users/joemccann718/Documents/workspace/node-leveldb/build' Build failed: -> task failed (err #1): {task: cxx builder.cc -> builder_1.o} -> task failed (err #1): {task: cxx db_impl.cc -> db_impl_1.o} -> task failed (err #1): {task: cxx db_iter.cc -> db_iter_1.o}

creationix commented 13 years ago

This is a known issue with leveldb. Apple's GCC doesn't support the -std=c++0x option that leveldb requires. I'm not sure what to do about it.

joemccann commented 13 years ago

Ahh gotcha...thx.

creationix commented 13 years ago

You're welcome to dig into the problem. I don't develop on a mac.

joemccann commented 13 years ago

I'll take a look and see if anything is on the Google Code wiki/mailing list about it.

joemccann commented 13 years ago

Looks like a patch here: https://github.com/davisp/leveldb/commit/50e280c9b1cfde0e255d124f38e1aa436d36ba52

joemccann commented 13 years ago

Working on porting the patch now...

shinuza commented 13 years ago

Please see issue 2 for the fix. The version I've commited builds on both Mac OS X 10.6.7 and Arch Linux.

joemccann commented 13 years ago

Ahh nice, I just got it to build, but was debugging the wscript file.

creationix commented 13 years ago

@joemccann, does @shinuza's patch work for you?

joemccann commented 13 years ago

yup

creationix commented 13 years ago

closing...