Skip to content

Cluster2 fails to build on node>=v0.11.4 #83

@karolyi

Description

@karolyi

Hi, just got this error, after several tries of building cluster2, changing node versions around to see where it fails:

$ npm install cluster2
npm http GET https://registry.npmjs.org/cluster2
npm http 200 https://registry.npmjs.org/cluster2
npm http GET https://registry.npmjs.org/cluster2/-/cluster2-0.4.25.tgz
npm http 200 https://registry.npmjs.org/cluster2/-/cluster2-0.4.25.tgz
npm http GET https://registry.npmjs.org/underscore
npm http GET https://registry.npmjs.org/express
npm http GET https://registry.npmjs.org/ejs
npm http GET https://registry.npmjs.org/npm
npm http GET https://registry.npmjs.org/when
npm http GET https://registry.npmjs.org/usage
npm http GET https://registry.npmjs.org/bignumber.js
npm http GET https://registry.npmjs.org/gc-stats
npm http 200 https://registry.npmjs.org/underscore
npm http GET https://registry.npmjs.org/underscore/-/underscore-1.4.4.tgz
npm http 200 https://registry.npmjs.org/when
npm http GET https://registry.npmjs.org/when/-/when-2.4.0.tgz
npm http 200 https://registry.npmjs.org/gc-stats
npm http GET https://registry.npmjs.org/gc-stats/-/gc-stats-0.0.1.tgz
npm http 200 https://registry.npmjs.org/ejs
npm http GET https://registry.npmjs.org/ejs/-/ejs-0.8.8.tgz
npm http 200 https://registry.npmjs.org/bignumber.js
npm http GET https://registry.npmjs.org/bignumber.js/-/bignumber.js-1.1.1.tgz
npm http 200 https://registry.npmjs.org/usage
npm http GET https://registry.npmjs.org/usage/-/usage-0.3.9.tgz
npm http 200 https://registry.npmjs.org/underscore/-/underscore-1.4.4.tgz
npm http 200 https://registry.npmjs.org/when/-/when-2.4.0.tgz
npm http 200 https://registry.npmjs.org/gc-stats/-/gc-stats-0.0.1.tgz
npm http 200 https://registry.npmjs.org/ejs/-/ejs-0.8.8.tgz
npm http 200 https://registry.npmjs.org/bignumber.js/-/bignumber.js-1.1.1.tgz
npm http 200 https://registry.npmjs.org/express
npm http 200 https://registry.npmjs.org/usage/-/usage-0.3.9.tgz
npm http GET https://registry.npmjs.org/express/-/express-2.5.11.tgz
npm http 200 https://registry.npmjs.org/npm
npm http GET https://registry.npmjs.org/npm/-/npm-1.3.26.tgz
npm http 200 https://registry.npmjs.org/express/-/express-2.5.11.tgz
npm http 200 https://registry.npmjs.org/npm/-/npm-1.3.26.tgz

> [email protected] install /home/karolyi/test/node_modules/cluster2/node_modules/gc-stats
> node-gyp rebuild

npm http GET https://registry.npmjs.org/bindings
npm http GET https://registry.npmjs.org/connect
npm http GET https://registry.npmjs.org/mime/1.2.4
npm http GET https://registry.npmjs.org/qs
npm http GET https://registry.npmjs.org/mkdirp/0.3.0
npm http 200 https://registry.npmjs.org/bindings
npm http GET https://registry.npmjs.org/bindings/-/bindings-1.2.0.tgz
make: Entering directory `/home/karolyi/test/node_modules/cluster2/node_modules/gc-stats/build'
npm http 200 https://registry.npmjs.org/qs
  CXX(target) Release/obj.target/gcstats/src/gcstats.o
npm http GET https://registry.npmjs.org/qs/-/qs-0.4.2.tgz
In file included from /home/karolyi/.node-gyp/0.11.4/src/node.h:62:0,
                 from ../src/gcstats.cc:1:
/home/karolyi/.node-gyp/0.11.4/deps/v8/include/v8.h: In member function ‘void v8::ReturnValue<T>::Set(uint32_t)’:
/home/karolyi/.node-gyp/0.11.4/deps/v8/include/v8.h:5810:31: warning: typedef ‘I’ locally defined but not used [-Wunused-local-typedefs]
   typedef internal::Internals I;
                               ^
../src/gcstats.cc: In function ‘void recordBeforeGC(v8::GCType, v8::GCCallbackFlags)’:
../src/gcstats.cc:30:38: warning: ‘static void v8::V8::GetHeapStatistics(v8::HeapStatistics*)’ is deprecated (declared at /home/karolyi/.node-gyp/0.11.4/deps/v8/include/v8.h:4639) [-Wdeprecated-declarations]
  V8::GetHeapStatistics(&beforeGCStats);
                                      ^
In file included from /home/karolyi/.node-gyp/0.11.4/src/node.h:62:0,
                 from ../src/gcstats.cc:1:
/home/karolyi/.node-gyp/0.11.4/deps/v8/include/v8.h: In function ‘void asyncAfter(uv_work_t*, int)’:
/home/karolyi/.node-gyp/0.11.4/deps/v8/include/v8.h:771:16: error: ‘T* v8::Persistent<T>::operator->() const [with T = v8::Function]’ is private
   V8_INLINE(T* operator->() const) { return val_; }
                ^
/home/karolyi/.node-gyp/0.11.4/deps/v8/include/v8.h:80:69: note: in definition of macro ‘V8_INLINE’
 #define V8_INLINE(declarator) inline __attribute__((always_inline)) declarator
                                                                     ^
../src/gcstats.cc:82:17: error: within this context
  afterGCCallback->Call(callbackContext, 1, arguments);
                 ^
../src/gcstats.cc:82:53: error: no matching function for call to ‘v8::Function::Call(v8::Persistent<v8::Object>&, int, v8::Handle<v8::Value> [1])’
  afterGCCallback->Call(callbackContext, 1, arguments);
                                                     ^
../src/gcstats.cc:82:53: note: candidate is:
In file included from /home/karolyi/.node-gyp/0.11.4/src/node.h:62:0,
                 from ../src/gcstats.cc:1:
/home/karolyi/.node-gyp/0.11.4/deps/v8/include/v8.h:2336:16: note: v8::Local<v8::Value> v8::Function::Call(v8::Handle<v8::Object>, int, v8::Handle<v8::Value>*)
   Local<Value> Call(Handle<Object> recv, int argc, Handle<Value> argv[]);
                ^
/home/karolyi/.node-gyp/0.11.4/deps/v8/include/v8.h:2336:16: note:   no known conversion for argument 1 from ‘v8::Persistent<v8::Object>’ to ‘v8::Handle<v8::Object>’
../src/gcstats.cc: In function ‘void afterGC(v8::GCType, v8::GCCallbackFlags)’:
../src/gcstats.cc:102:30: warning: ‘static void v8::V8::GetHeapStatistics(v8::HeapStatistics*)’ is deprecated (declared at /home/karolyi/.node-gyp/0.11.4/deps/v8/include/v8.h:4639) [-Wdeprecated-declarations]
  V8::GetHeapStatistics(&stats);
                              ^
../src/gcstats.cc: In function ‘v8::Handle<v8::Value> AfterGC(const v8::Arguments&)’:
../src/gcstats.cc:124:54: error: no matching function for call to ‘v8::Persistent<v8::Function>::New(v8::Handle<v8::Function>&)’
  afterGCCallback = Persistent<Function>::New(callback);
                                                      ^
../src/gcstats.cc:124:54: note: candidate is:
In file included from /home/karolyi/.node-gyp/0.11.4/src/node.h:62:0,
                 from ../src/gcstats.cc:1:
/home/karolyi/.node-gyp/0.11.4/deps/v8/include/v8.h:5585:4: note: static T* v8::Persistent<T>::New(v8::Isolate*, T*) [with T = v8::Function]
 T* Persistent<T>::New(Isolate* isolate, T* that) {
    ^
/home/karolyi/.node-gyp/0.11.4/deps/v8/include/v8.h:5585:4: note:   candidate expects 2 arguments, 1 provided
../src/gcstats.cc:125:76: error: no matching function for call to ‘v8::Persistent<v8::Object>::New(v8::Local<v8::Object>)’
  callbackContext  = Persistent<Object>::New(Context::GetCalling()->Global());
                                                                            ^
../src/gcstats.cc:125:76: note: candidate is:
In file included from /home/karolyi/.node-gyp/0.11.4/src/node.h:62:0,
                 from ../src/gcstats.cc:1:
/home/karolyi/.node-gyp/0.11.4/deps/v8/include/v8.h:5585:4: note: static T* v8::Persistent<T>::New(v8::Isolate*, T*) [with T = v8::Object]
 T* Persistent<T>::New(Isolate* isolate, T* that) {
    ^
/home/karolyi/.node-gyp/0.11.4/deps/v8/include/v8.h:5585:4: note:   candidate expects 2 arguments, 1 provided
../src/gcstats.cc: In function ‘void init(v8::Handle<v8::Object>)’:
../src/gcstats.cc:134:74: warning: ‘static v8::Local<v8::FunctionTemplate> v8::FunctionTemplate::New(v8::InvocationCallback, v8::Handle<v8::Value>, v8::Handle<v8::Signature>, int)’ is deprecated (declared at /home/karolyi/.node-gyp/0.11.4/deps/v8/include/v8.h:3263) [-Wdeprecated-declarations]
  exports->Set(String::NewSymbol("afterGC"), FunctionTemplate::New(AfterGC)->GetFunction());
                                                                          ^
make: *** [Release/obj.target/gcstats/src/gcstats.o] Error 1
make: Leaving directory `/home/karolyi/test/node_modules/cluster2/node_modules/gc-stats/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/home/karolyi/.nvm/v0.11.4/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR!npm http 200 https://registry.npmjs.org/mime/1.2.4
 stack     at ChildProcess.EventEmitter.emit (events.js:103:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:789:12)
gyp ERR! System Linux 3.13.0-24-generic
gyp ERR! command "node" "/home/karolyi/.nvm/v0.11.4/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! npm http GET https://registry.npmjs.org/mime/-/mime-1.2.4.tgz
cwd /home/karolyi/test/node_modules/cluster2/node_modules/gc-stats
gyp ERR! node -v v0.11.4
gyp ERR! node-gyp -v v0.10.6
gyp ERR! not ok 
npm http 200 https://registry.npmjs.org/mkdirp/0.3.0
npm http GET https://registry.npmjs.org/mkdirp/-/mkdirp-0.3.0.tgz
npm ERR! Error: ENOENT, lstat '/home/karolyi/test/node_modules/cluster2/node_modules/npm/lib/submodule.js'
npm ERR! If you need help, you may report this log at:
npm ERR!     <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR!     <[email protected]>

npm ERR! System Linux 3.13.0-24-generic
npm ERR! command "/home/karolyi/.nvm/v0.11.4/bin/node" "/home/karolyi/.nvm/v0.11.4/bin/npm" "install" "cluster2"
npm ERR! cwd /home/karolyi/test
npm ERR! node -v v0.11.4
npm ERR! npm -v 1.3.4
npm ERR! path /home/karolyi/test/node_modules/cluster2/node_modules/npm/lib/submodule.js
npm ERR! fstream_path /home/karolyi/test/node_modules/cluster2/node_modules/npm/lib/submodule.js
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! fstream_stack /home/karolyi/.nvm/v0.11.4/lib/node_modules/npm/node_modules/fstream/lib/writer.js:284:26
npm ERR! fstream_stack Object.oncomplete (fs.js:94:15)
npm http 200 https://registry.npmjs.org/bindings/-/bindings-1.2.0.tgz
npm http 200 https://registry.npmjs.org/qs/-/qs-0.4.2.tgz
npm ERR! weird error 1
npm ERR! EEXIST, mkdir '/home/karolyi/tmp/npm-498-EFOxySg-/1399639421737-0.11779368296265602/package'
File exists: /home/karolyi/tmp/npm-498-EFOxySg-/1399639421737-0.11779368296265602/package
Move it away, and try again. 

npm ERR! System Linux 3.13.0-24-generic
npm ERR! command "/home/karolyi/.nvm/v0.11.4/bin/node" "/home/karolyi/.nvm/v0.11.4/bin/npm" "install" "cluster2"
npm ERR! cwd /home/karolyi/test
npm ERR! node -v v0.11.4
npm ERR! npm -v 1.3.4
npm ERR! path /home/karolyi/tmp/npm-498-EFOxySg-/1399639421737-0.11779368296265602/package
npm ERR! fstream_path /home/karolyi/tmp/npm-498-EFOxySg-/1399639421737-0.11779368296265602/package/.gitignore
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code EEXIST
npm ERR! errno 47
npm ERR! fstream_stack /home/karolyi/.nvm/v0.11.4/lib/node_modules/npm/node_modules/fstream/lib/writer.js:171:23
npm ERR! fstream_stack /home/karolyi/.nvm/v0.11.4/lib/node_modules/npm/node_modules/mkdirp/index.js:37:53
npm ERR! fstream_stack Object.oncomplete (fs.js:94:15)
npm ERR! Error: ENOENT, lstat '/home/karolyi/tmp/npm-498-EFOxySg-/1399639421726-0.31578966532833874/package/README.md'
npm ERR! If you need help, you may report this log at:
npm ERR!     <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR!     <[email protected]>

npm ERR! System Linux 3.13.0-24-generic
npm ERR! command "/home/karolyi/.nvm/v0.11.4/bin/node" "/home/karolyi/.nvm/v0.11.4/bin/npm" "install" "cluster2"
npm ERR! cwd /home/karolyi/test
npm ERR! node -v v0.11.4
npm ERR! npm -v 1.3.4
npm ERR! path /home/karolyi/tmp/npm-498-EFOxySg-/1399639421726-0.31578966532833874/package/README.md
npm ERR! fstream_path /home/karolyi/tmp/npm-498-EFOxySg-/1399639421726-0.31578966532833874/package/README.md
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! fstream_stack /home/karolyi/.nvm/v0.11.4/lib/node_modules/npm/node_modules/fstream/lib/writer.js:284:26
npm ERR! fstream_stack Object.oncomplete (fs.js:94:15)
npm ERR! Error: ENOENT, lstat '/home/karolyi/test/node_modules/cluster2/node_modules/bignumber.js/test/round.js'
npm ERR! If you need help, you may report this log at:
npm ERR!     <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR!     <[email protected]>

npm ERR! System Linux 3.13.0-24-generic
npm ERR! command "/home/karolyi/.nvm/v0.11.4/bin/node" "/home/karolyi/.nvm/v0.11.4/bin/npm" "install" "cluster2"
npm ERR! cwd /home/karolyi/test
npm ERR! node -v v0.11.4
npm ERR! npm -v 1.3.4
npm ERR! path /home/karolyi/test/node_modules/cluster2/node_modules/bignumber.js/test/round.js
npm ERR! fstream_path /home/karolyi/test/node_modules/cluster2/node_modules/bignumber.js/test/round.js
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! fstream_stack /home/karolyi/.nvm/v0.11.4/lib/node_modules/npm/node_modules/fstream/lib/writer.js:284:26
npm ERR! fstream_stack Object.oncomplete (fs.js:94:15)
npm http 200 https://registry.npmjs.org/mime/-/mime-1.2.4.tgz
npm http 200 https://registry.npmjs.org/mkdirp/-/mkdirp-0.3.0.tgz
npm http 200 https://registry.npmjs.org/connect
npm http GET https://registry.npmjs.org/connect/-/connect-1.9.2.tgz
npm http 200 https://registry.npmjs.org/connect/-/connect-1.9.2.tgz
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /home/karolyi/test/npm-debug.log
npm ERR! not ok code 0

$ nvm ls
        .nvm
     v0.11.0
     v0.11.2
     v0.11.3
->   v0.11.4
    v0.11.10
    v0.11.12
    v0.11.13

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions