node-memwatch icon indicating copy to clipboard operation
node-memwatch copied to clipboard

memwatch-next doesn't build on node v5

Open maritz opened this issue 10 years ago • 8 comments

Sadly memwatch-next does not have Issues enabled, so I can't create this issue there.

@marcominetti Can you have a look at this?

During npm install -g I get the following:

make: Entering directory '/home/mpeters/dev/oebb-ticketing-svc/node_modules/memwatch-next/build'
  CXX(target) Release/obj.target/memwatch/src/heapdiff.o
/home/mpeters/dev/oebb-ticketing-svc/node_modules/.bin/touch: 1: /home/mpeters/dev/oebb-ticketing-svc/node_modules/.bin/touch: Syntax error: "(" unexpected
memwatch.target.mk:93: recipe for target 'Release/obj.target/memwatch/src/heapdiff.o' failed
make: *** [Release/obj.target/memwatch/src/heapdiff.o] Error 2
make: Leaving directory '/home/mpeters/dev/oebb-ticketing-svc/node_modules/memwatch-next/build'

This is on node v5.0.0, debian 8, gcc 4.9.2.

maritz avatar Nov 09 '15 14:11 maritz

Hi @maritz, I've enabled the issues in my memwatch fork.

marcominetti avatar Nov 09 '15 18:11 marcominetti

Sorry, but I'm not having any issue... it seems to be related to some modules touch...

marcominetti avatar Nov 09 '15 18:11 marcominetti

I am having the same issue. Install log included. memcrash.txt

KimSchneider avatar Dec 17 '15 15:12 KimSchneider

Same error here

mitermayer avatar Dec 30 '15 01:12 mitermayer

Same error there: ja0ui_1 | memwatch.target.mk:93: recipe for target 'Release/obj.target/memwatch/src/heapdiff.o' failed ja0ui_1 | make: *** [Release/obj.target/memwatch/src/heapdiff.o] Error 1 ja0ui_1 | make: Leaving directory '/opt/node/app/node_modules/app_configurer/node_modules/nodejs-utils/node_modules/memwatch/build' ja0ui_1 | gyp ERR! build error ja0ui_1 | gyp ERR! stack Error: make failed with exit code: 2 ja0ui_1 | gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:270:23) ja0ui_1 | gyp ERR! stack at emitTwo (events.js:87:13) ja0ui_1 | gyp ERR! stack at ChildProcess.emit (events.js:172:7) ja0ui_1 | gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12) ja0ui_1 | gyp ERR! System Linux 4.1.13-boot2docker ja0ui_1 | gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" ja0ui_1 | gyp ERR! cwd /opt/node/app/node_modules/app_configurer/node_modules/nodejs-utils/node_modules/memwatch ja0ui_1 | gyp ERR! node -v v5.1.0 ja0ui_1 | gyp ERR! node-gyp -v v3.0.3 ja0ui_1 | gyp ERR! not ok

ArturSkowronski avatar Jan 13 '16 21:01 ArturSkowronski

here's what i'm seeing

> [email protected] install /Users/mattk/code/mup-web/node_modules/memwatch
> node-gyp rebuild

  CXX(target) Release/obj.target/memwatch/src/heapdiff.o
In file included from ../src/heapdiff.cc:5:
../src/heapdiff.hh:14:35: error: expected class name
    class HeapDiff : public node::ObjectWrap
                                  ^
../src/heapdiff.hh:19:49: error: no type named 'Arguments' in namespace 'v8';
      did you mean 'v8::internal::Arguments'?
        static v8::Handle<v8::Value> New( const v8::Arguments& args );
                                                ^~~~~~~~~~~~~
                                                v8::internal::Arguments
/Users/mattk/.node-gyp/5.6.0/include/node/v8.h:139:7: note:
      'v8::internal::Arguments' declared here
class Arguments;
      ^
In file included from ../src/heapdiff.cc:5:
../src/heapdiff.hh:20:49: error: no type named 'Arguments' in namespace 'v8';
      did you mean 'v8::internal::Arguments'?
        static v8::Handle<v8::Value> End( const v8::Arguments& args );
                                                ^~~~~~~~~~~~~
                                                v8::internal::Arguments
/Users/mattk/.node-gyp/5.6.0/include/node/v8.h:139:7: note:
      'v8::internal::Arguments' declared here
class Arguments;
      ^
../src/heapdiff.cc:30:34: error: member initializer 'ObjectWrap' does not name a
      non-static data member or base class
heapdiff::HeapDiff::HeapDiff() : ObjectWrap(), before(NULL), after(NULL),
                                 ^~~~~~~~~~~~
../src/heapdiff.cc:51:21: error: calling a protected constructor of class
      'v8::HandleScope'
    v8::HandleScope scope;
                    ^
/Users/mattk/.node-gyp/5.6.0/include/node/v8.h:889:13: note: declared protected
      here
  V8_INLINE HandleScope() {}
            ^
../src/heapdiff.cc:52:67: error: cannot initialize a parameter of type
      'v8::Isolate *' with an lvalue of type 'v8::Handle<v8::Value> (const
      v8::internal::Arguments &)'
    v8::Local<v8::FunctionTemplate> t = v8::FunctionTemplate::New(New);
                                                                  ^~~
/Users/mattk/.node-gyp/5.6.0/include/node/v8.h:4349:16: note: passing argument
      to parameter 'isolate' here
      Isolate* isolate, FunctionCallback callback = 0,
               ^
../src/heapdiff.cc:54:29: error: no member named 'NewSymbol' in 'v8::String'
    t->SetClassName(String::NewSymbol("HeapDiff"));
                    ~~~~~~~~^
../src/heapdiff.cc:56:41: error: cannot initialize a parameter of type
      'v8::FunctionCallback' (aka 'void (*)(const
      FunctionCallbackInfo<v8::Value> &)') with an lvalue of type
      'v8::Handle<v8::Value> (const v8::internal::Arguments &)': type mismatch
      at 1st parameter ('const FunctionCallbackInfo<v8::Value> &' vs 'const
      v8::internal::Arguments &')
    NODE_SET_PROTOTYPE_METHOD(t, "end", End);
                                        ^~~
/Users/mattk/.node-gyp/5.6.0/include/node/node.h:254:60: note: passing argument
      to parameter 'callback' here
                                      v8::FunctionCallback callback) {
                                                           ^
../src/heapdiff.cc:58:29: error: no member named 'NewSymbol' in 'v8::String'
    target->Set(v8::String::NewSymbol( "HeapDiff"), t->GetFunction());
                ~~~~~~~~~~~~^
../src/heapdiff.cc:62:32: error: no type named 'Arguments' in namespace 'v8';
      did you mean 'v8::internal::Arguments'?
heapdiff::HeapDiff::New (const v8::Arguments& args)
                               ^~~~~~~~~~~~~
                               v8::internal::Arguments
/Users/mattk/.node-gyp/5.6.0/include/node/v8.h:139:7: note:
      'v8::internal::Arguments' declared here
class Arguments;
      ^
../src/heapdiff.cc:67:14: error: member access into incomplete type 'const
      v8::internal::Arguments'
    if (!args.IsConstructCall()) {
             ^
/Users/mattk/.node-gyp/5.6.0/include/node/v8.h:139:7: note: forward declaration
      of 'v8::internal::Arguments'
class Arguments;
      ^
../src/heapdiff.cc:70:25: error: no member named 'New' in 'v8::String'
                String::New("Use the new operator to create instances o...
                ~~~~~~~~^
../src/heapdiff.cc:73:21: error: calling a protected constructor of class
      'v8::HandleScope'
    v8::HandleScope scope;
                    ^
/Users/mattk/.node-gyp/5.6.0/include/node/v8.h:889:13: note: declared protected
      here
  V8_INLINE HandleScope() {}
            ^
../src/heapdiff.cc:77:11: error: no member named 'Wrap' in 'heapdiff::HeapDiff'
    self->Wrap(args.This());
    ~~~~  ^
../src/heapdiff.cc:77:20: error: member access into incomplete type 'const
      v8::internal::Arguments'
    self->Wrap(args.This());
                   ^
/Users/mattk/.node-gyp/5.6.0/include/node/v8.h:139:7: note: forward declaration
      of 'v8::internal::Arguments'
class Arguments;
      ^
../src/heapdiff.cc:82:38: error: no member named 'TakeSnapshot' in
      'v8::HeapProfiler'
    self->before = v8::HeapProfiler::TakeSnapshot(v8::String::New(""));
                   ~~~~~~~~~~~~~~~~~~^
../src/heapdiff.cc:82:63: error: no member named 'New' in 'v8::String'
    self->before = v8::HeapProfiler::TakeSnapshot(v8::String::New(""));
                                                  ~~~~~~~~~~~~^
../src/heapdiff.cc:85:16: error: member access into incomplete type 'const
      v8::internal::Arguments'
    return args.This();
               ^
/Users/mattk/.node-gyp/5.6.0/include/node/v8.h:139:7: note: forward declaration
      of 'v8::internal::Arguments'
class Arguments;
      ^
../src/heapdiff.cc:97:21: error: calling a protected constructor of class
      'v8::HandleScope'
    v8::HandleScope scope;
                    ^
/Users/mattk/.node-gyp/5.6.0/include/node/v8.h:889:13: note: declared protected
      here
  V8_INLINE HandleScope() {}
            ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.

mattkime avatar Mar 03 '16 20:03 mattkime

I've updated dependencies and tested against node v4, v5 and v6...can you retry with 0.3.0 package?

marcominetti avatar Apr 30 '16 10:04 marcominetti

Thanks @marcominetti I had the same issue as @mattkime, but no more issue with your fork

Onurbon avatar May 02 '16 02:05 Onurbon