Level/level-rocksdb

npm install fails with io.js

ralphtheninja opened this issue · 15 comments

npm install fails with io.js

It also fails under Node 0.10.32 (OSX)

In file included from ../deps/leveldb/leveldb-rocksdb/db/version_set_reduce_num_levels.cc:10:
In file included from ../deps/leveldb/leveldb-rocksdb/db/version_set.h:26:
In file included from ../deps/leveldb/leveldb-rocksdb/db/dbformat.h:13:
In file included from ../deps/leveldb/leveldb-rocksdb/include/rocksdb/db.h:12:
In file included from ../deps/leveldb/leveldb-rocksdb/include/rocksdb/iterator.h:19:
../deps/leveldb/leveldb-rocksdb/include/rocksdb/status.h:24:21: error: use of undeclared
      identifier 'nullptr'
  Status() : state_(nullptr) { }
                    ^
../deps/leveldb/leveldb-rocksdb/include/rocksdb/status.h:58:39: error: use of undeclared
      identifier 'nullptr'
  bool ok() const { return (state_ == nullptr); }
                                      ^
../deps/leveldb/leveldb-rocksdb/include/rocksdb/status.h:105:23: error: use of
      undeclared identifier 'nullptr'
    return (state_ == nullptr) ? kOk : static_cast<Code>(state_[4]);
                      ^
../deps/leveldb/leveldb-rocksdb/include/rocksdb/status.h:113:25: error: use of
      undeclared identifier 'nullptr'
  state_ = (s.state_ == nullptr) ? nullptr : CopyState(s.state_);
                        ^
../deps/leveldb/leveldb-rocksdb/include/rocksdb/status.h:113:36: error: use of
      undeclared identifier 'nullptr'
  state_ = (s.state_ == nullptr) ? nullptr : CopyState(s.state_);
                                   ^
../deps/leveldb/leveldb-rocksdb/include/rocksdb/status.h:120:27: error: use of
      undeclared identifier 'nullptr'
    state_ = (s.state_ == nullptr) ? nullptr : CopyState(s.state_);
                          ^
../deps/leveldb/leveldb-rocksdb/include/rocksdb/status.h:120:38: error: use of
      undeclared identifier 'nullptr'
    state_ = (s.state_ == nullptr) ? nullptr : CopyState(s.state_);
                                     ^
In file included from ../deps/leveldb/leveldb-rocksdb/db/version_set_reduce_num_levels.cc:10:
In file included from ../deps/leveldb/leveldb-rocksdb/db/version_set.h:26:
In file included from ../deps/leveldb/leveldb-rocksdb/db/dbformat.h:13:
In file included from ../deps/leveldb/leveldb-rocksdb/include/rocksdb/db.h:13:
In file included from ../deps/leveldb/leveldb-rocksdb/include/rocksdb/options.h:14:
In file included from ../deps/leveldb/leveldb-rocksdb/include/rocksdb/memtablerep.h:43:
../deps/leveldb/leveldb-rocksdb/include/rocksdb/arena.h:28:11: warning: 'const' type
      qualifier on return type has no effect [-Wignored-qualifiers]
  virtual const size_t ApproximateMemoryUsage() = 0;
          ^~~~~~
../deps/leveldb/leveldb-rocksdb/include/rocksdb/arena.h:31:11: warning: 'const' type
      qualifier on return type has no effect [-Wignored-qualifiers]
  virtual const size_t MemoryAllocatedBytes() = 0;
          ^~~~~~
In file included from ../deps/leveldb/leveldb-rocksdb/db/version_set_reduce_num_levels.cc:10:
In file included from ../deps/leveldb/leveldb-rocksdb/db/version_set.h:26:
In file included from ../deps/leveldb/leveldb-rocksdb/db/dbformat.h:13:
In file included from ../deps/leveldb/leveldb-rocksdb/include/rocksdb/db.h:13:
In file included from ../deps/leveldb/leveldb-rocksdb/include/rocksdb/options.h:14:
../deps/leveldb/leveldb-rocksdb/include/rocksdb/memtablerep.h:117:16: error: no type
      named 'shared_ptr' in namespace 'std'
  virtual std::shared_ptr<Iterator> GetIterator() = 0;
          ~~~~~^
../deps/leveldb/leveldb-rocksdb/include/rocksdb/memtablerep.h:117:26: error: expected
      member name or ';' after declaration specifiers
  virtual std::shared_ptr<Iterator> GetIterator() = 0;
  ~~~~~~~~~~~~~~~~~~~~~~~^
../deps/leveldb/leveldb-rocksdb/include/rocksdb/memtablerep.h:122:16: error: no type
      named 'shared_ptr' in namespace 'std'
  virtual std::shared_ptr<Iterator> GetIterator(const Slice& user_key) {
          ~~~~~^
../deps/leveldb/leveldb-rocksdb/include/rocksdb/memtablerep.h:122:26: error: expected
      member name or ';' after declaration specifiers
  virtual std::shared_ptr<Iterator> GetIterator(const Slice& user_key) {
  ~~~~~~~~~~~~~~~~~~~~~~~^
../deps/leveldb/leveldb-rocksdb/include/rocksdb/memtablerep.h:150:16: error: no type
      named 'shared_ptr' in namespace 'std'
  virtual std::shared_ptr<MemTableRep> CreateMemTableRep(
          ~~~~~^
../deps/leveldb/leveldb-rocksdb/include/rocksdb/memtablerep.h:150:26: error: expected
      member name or ';' after declaration specifiers
  virtual std::shared_ptr<MemTableRep> CreateMemTableRep(
  ~~~~~~~~~~~~~~~~~~~~~~~^
../deps/leveldb/leveldb-rocksdb/include/rocksdb/memtablerep.h:167:16: error: no type
      named 'shared_ptr' in namespace 'std'
  virtual std::shared_ptr<MemTableRep> CreateMemTableRep(
          ~~~~~^
../deps/leveldb/leveldb-rocksdb/include/rocksdb/memtablerep.h:167:26: error: expected
      member name or ';' after declaration specifiers
  virtual std::shared_ptr<MemTableRep> CreateMemTableRep(
  ~~~~~~~~~~~~~~~~~~~~~~~^
../deps/leveldb/leveldb-rocksdb/include/rocksdb/memtablerep.h:169:36: warning:
      'override' keyword is a C++11 extension [-Wc++11-extensions]
  virtual const char* Name() const override {
                                   ^
../deps/leveldb/leveldb-rocksdb/include/rocksdb/memtablerep.h:177:16: error: no type
      named 'shared_ptr' in namespace 'std'
  virtual std::shared_ptr<MemTableRep> CreateMemTableRep(
          ~~~~~^
../deps/leveldb/leveldb-rocksdb/include/rocksdb/memtablerep.h:177:26: error: expected
      member name or ';' after declaration specifiers
  virtual std::shared_ptr<MemTableRep> CreateMemTableRep(
  ~~~~~~~~~~~~~~~~~~~~~~~^
../deps/leveldb/leveldb-rocksdb/include/rocksdb/memtablerep.h:179:36: warning:
      'override' keyword is a C++11 extension [-Wc++11-extensions]
  virtual const char* Name() const override {
                                   ^
../deps/leveldb/leveldb-rocksdb/include/rocksdb/memtablerep.h:214:16: error: no type
      named 'shared_ptr' in namespace 'std'
  virtual std::shared_ptr<MemTableRep> CreateMemTableRep(
          ~~~~~^
../deps/leveldb/leveldb-rocksdb/include/rocksdb/memtablerep.h:214:26: error: expected
      member name or ';' after declaration specifiers
  virtual std::shared_ptr<MemTableRep> CreateMemTableRep(
  ~~~~~~~~~~~~~~~~~~~~~~~^
../deps/leveldb/leveldb-rocksdb/include/rocksdb/memtablerep.h:217:36: warning:
      'override' keyword is a C++11 extension [-Wc++11-extensions]
  virtual const char* Name() const override {
                                   ^
../deps/leveldb/leveldb-rocksdb/include/rocksdb/memtablerep.h:239:36: warning:
      'override' keyword is a C++11 extension [-Wc++11-extensions]
  virtual const char* Name() const override {
                                   ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
6 warnings and 20 errors generated.
make: *** [Release/obj.target/leveldb/deps/leveldb/leveldb-rocksdb/db/version_set_reduce_num_levels.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack     at ChildProcess.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:810:12)
gyp ERR! System Darwin 14.3.0
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"

Agreed! Fails to install under OSX!

This repo hasn't been updated in 2 years. @ralphtheninja should there be an indicator in the README that this repo is no longer maintained?

@notduncansmith I think we should try to fix it instead.

@ralphtheninja I have been working on this from my machine and should be able to get it working... I'll keep you posted.

@ralphtheninja I'm pretty sure this will work if we get @rvagg to update the "rocksdb" NPMJS package to the latest version on github, v0.10.1, which builds on my machine.

I've contacted him off line with the request.

rvagg commented

Added @ralphtheninja and @juliangruber to npm for rocksdb, sorry for being a holdup folks!

No problem!

Can you add me as a contributor as well on both the GitHub and NPMJS repositories.

I plan to be using rocksDB and nodes extensively in the future and would love to contribute to these projects.

Warm Regards,
Brad Serbu

Sent from my iPhone

On Jul 31, 2015, at 9:15 PM, Rod Vagg notifications@github.com wrote:

Added @ralphtheninja and @juliangruber to npm for rocksdb, sorry for being a holdup folks!


Reply to this email directly or view it on GitHub.

rvagg commented

contributions first, access later

Okay.  I thought figuring out what was needed to fix this would count as a contribution.  It may not have required coding changes, but it was time consuming.

I will have to fork both projects, create a new npm repository for both the ‘level-rocksdb’ and ‘rocksdb’ packages, just to host a rebuild and wait until the pull requests are merged.  

-- 
Brad Serbu
Sent with Airmail

On July 31, 2015 at 9:27:34 PM, Rod Vagg (notifications@github.com) wrote:

contributions first, access later


Reply to this email directly or view it on GitHub.

rvagg commented

if you're going to bring it up to date with the latest leveldown code, target this branch: Level/leveldown#195 which should be merged soon, also the package.json has a git ref but it can now just be nan ^2 cause it's in npm now, then it'll be compatible up to io.js v3 (out today hopefully) and Node.js v4 (out later this month hopefully)

ping This is still broken on nodejs 4.2.1

@ralphtheninja hey! do you know what the state of this is? Level/leveldown#195 has been merged, curious what next steps are.

seeing this error with node 5.1.0

edit: works with 4.2.2 for me. my previous error was a node-gyp issue afaik