Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bunyan can't be installed with io.js #212

Closed
domharrington opened this issue Jan 14, 2015 · 6 comments · Fixed by #217
Closed

Bunyan can't be installed with io.js #212

domharrington opened this issue Jan 14, 2015 · 6 comments · Fixed by #217

Comments

@domharrington
Copy link

EDIT: this looks like a problem with dtrace-provider and not with bunyan. But it'll need an update in this module if/when a fix gets made upstream.

Running:

V=1 npm i bunyan

Returns with the following errors with iojs v1.0.1.

> dtrace-provider@0.3.1 install /private/tmp/node_modules/bunyan/node_modules/dtrace-provider
> scripts/install.js

child_process: customFds option is deprecated, use stdio instead.
  LD_LIBRARY_PATH=/private/tmp/node_modules/bunyan/node_modules/dtrace-provider/build/Release/lib.host:/private/tmp/node_modules/bunyan/node_modules/dtrace-provider/build/Release/lib.target:$LD_LIBRARY_PATH; export LD_LIBRARY_PATH; cd ../.; sh libusdt-build.sh
Building libusdt for x86_64
rm -f *.gch
rm -f *.o
rm -f libusdt.a
rm -f test_usdt
rm -f test_usdt32
rm -f test_usdt64
rm -f test_mem_usage
gcc -O2 -Wall -arch x86_64   -c -o usdt.o usdt.c
gcc -O2 -Wall -arch x86_64   -c -o usdt_dof_file.o usdt_dof_file.c
gcc -arch x86_64 -o usdt_tracepoints.o -c usdt_tracepoints_x86_64.s
gcc -O2 -Wall -arch x86_64   -c -o usdt_probe.o usdt_probe.c
gcc -O2 -Wall -arch x86_64   -c -o usdt_dof.o usdt_dof.c
gcc -O2 -Wall -arch x86_64   -c -o usdt_dof_sections.o usdt_dof_sections.c
rm -f libusdt.a
ar cru libusdt.a usdt.o usdt_dof_file.o usdt_tracepoints.o usdt_probe.o usdt_dof.o usdt_dof_sections.o
ranlib libusdt.a
  touch Release/obj.target/libusdt.stamp
  c++ '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DBUILDING_NODE_EXTENSION' -I/Users/domh/.node-gyp/1.0.1/src -I/Users/domh/.node-gyp/1.0.1/deps/uv/include -I/Users/domh/.node-gyp/1.0.1/deps/v8/include -I../libusdt -I../node_modules/nan  -Os -gdwarf-2 -mmacosx-version-min=10.5 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -std=gnu++0x -fno-rtti -fno-exceptions -fno-threadsafe-statics -fno-strict-aliasing -MMD -MF ./Release/.deps/Release/obj.target/DTraceProviderBindings/dtrace_provider.o.d.raw  -c -o Release/obj.target/DTraceProviderBindings/dtrace_provider.o ../dtrace_provider.cc
In file included from ../dtrace_provider.cc:1:
In file included from ../dtrace_provider.h:1:
../node_modules/nan/nan.h:481:19: error: no type named 'ExternalAsciiStringResource' in 'v8::String'; did you mean 'ExternalStringResource'?
      v8::String::ExternalAsciiStringResource *resource) {
      ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
                  ExternalStringResource
/Users/domh/.node-gyp/1.0.1/deps/v8/include/v8.h:2016:19: note: 'ExternalStringResource' declared here
  class V8_EXPORT ExternalStringResource
                  ^
In file included from ../dtrace_provider.cc:1:
In file included from ../dtrace_provider.h:1:
../node_modules/nan/nan.h:480:36: error: redefinition of 'NanNew'
  NAN_INLINE v8::Local<v8::String> NanNew(
                                   ^
../node_modules/nan/nan.h:475:36: note: previous definition is here
  NAN_INLINE v8::Local<v8::String> NanNew(
                                   ^
../node_modules/nan/nan.h:2103:12: error: no member named 'IsExternalAscii' in 'v8::String'; did you mean 'IsExternal'?
  if (str->IsExternalAscii()) {
           ^~~~~~~~~~~~~~~
           IsExternal
/Users/domh/.node-gyp/1.0.1/deps/v8/include/v8.h:1980:8: note: 'IsExternal' declared here
  bool IsExternal() const;
       ^
In file included from ../dtrace_provider.cc:1:
In file included from ../dtrace_provider.h:1:
../node_modules/nan/nan.h:2104:23: error: no type named 'ExternalAsciiStringResource' in 'v8::String'; did you mean 'ExternalStringResource'?
    const v8::String::ExternalAsciiStringResource* ext;
          ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
                      ExternalStringResource
/Users/domh/.node-gyp/1.0.1/deps/v8/include/v8.h:2016:19: note: 'ExternalStringResource' declared here
  class V8_EXPORT ExternalStringResource
                  ^
In file included from ../dtrace_provider.cc:1:
In file included from ../dtrace_provider.h:1:
../node_modules/nan/nan.h:2105:16: error: no member named 'GetExternalAsciiStringResource' in 'v8::String'; did you mean 'GetExternalOneByteStringResource'?
    ext = str->GetExternalAsciiStringResource();
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
               GetExternalOneByteStringResource
/Users/domh/.node-gyp/1.0.1/deps/v8/include/v8.h:2083:40: note: 'GetExternalOneByteStringResource' declared here
  const ExternalOneByteStringResource* GetExternalOneByteStringResource() const;
                                       ^
In file included from ../dtrace_provider.cc:1:
In file included from ../dtrace_provider.h:1:
../node_modules/nan/nan.h:2105:9: error: assigning to 'const v8::String::ExternalStringResource *' from incompatible type 'const v8::String::ExternalOneByteStringResource *'
    ext = str->GetExternalAsciiStringResource();
        ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:2106:11: error: assigning to 'const char *' from incompatible type 'const uint16_t *' (aka 'const unsigned short *')
    *data = ext->data();
          ^ ~~~~~~~~~~~
7 errors generated.
make: *** [Release/obj.target/DTraceProviderBindings/dtrace_provider.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:1038:12)
gyp ERR! System Darwin 14.0.0
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /private/tmp/node_modules/bunyan/node_modules/dtrace-provider
gyp ERR! node -v v1.0.1
gyp ERR! node-gyp -v v1.0.2
gyp ERR! not ok
bunyan@1.2.3 node_modules/bunyan
├── mv@2.0.3 (rimraf@2.2.8, ncp@0.6.0, mkdirp@0.5.0)
└── dtrace-provider@0.3.1 (nan@1.3.0)

I'm guessing this is due to the substantial v8 upgrade from node -> iojs?

@timoxley
Copy link

nodejs/node#456

@trentm
Copy link
Owner

trentm commented Jan 26, 2015

Will be in bunyan 1.3.3, which I should have published tonight. Thanks.

@trentm
Copy link
Owner

trentm commented Jan 26, 2015

published

@cgreening
Copy link

I think this is broken again for iojs-v2.0.0 +

../node_modules/nan/nan_implementation_12_inl.h:172:66: error: too many arguments to function call, expected at most 2, have 4
  return v8::Signature::New(v8::Isolate::GetCurrent(), receiver, argc, argv);
         ~~~~~~~~~~~~~~~~~~                                      ^~~~~~~~~~
/Users/chrisgreening/.node-gyp/2.0.0/deps/v8/include/v8.h:4188:3: note: 'New' declared here
  static Local<Signature> New(
  ^
1 error generated.
make: *** [Release/obj.target/DTraceProviderBindings/dtrace_provider.o] Error 1

@spoon16
Copy link

spoon16 commented Jun 2, 2015

I am having this issue as well.

~ % nvm current
iojs-v2.2.1
~ % V=1 npm install bunyan

> dtrace-provider@0.4.0 install /Users/eric/node_modules/bunyan/node_modules/dtrace-provider
> node scripts/install.js

  LD_LIBRARY_PATH=/Users/eric/node_modules/bunyan/node_modules/dtrace-provider/build/Release/lib.host:/Users/eric/node_modules/bunyan/node_modules/dtrace-provider/build/Release/lib.target:$LD_LIBRARY_PATH; export LD_LIBRARY_PATH; cd ../.; sh libusdt-build.sh
Building libusdt for x86_64
rm -f *.gch
rm -f *.o
rm -f libusdt.a
rm -f test_usdt
rm -f test_usdt32
rm -f test_usdt64
rm -f test_mem_usage
gcc -O2 -Wall -arch x86_64   -c -o usdt.o usdt.c
gcc -O2 -Wall -arch x86_64   -c -o usdt_dof_file.o usdt_dof_file.c
gcc -arch x86_64 -o usdt_tracepoints.o -c usdt_tracepoints_x86_64.s
gcc -O2 -Wall -arch x86_64   -c -o usdt_probe.o usdt_probe.c
gcc -O2 -Wall -arch x86_64   -c -o usdt_dof.o usdt_dof.c
gcc -O2 -Wall -arch x86_64   -c -o usdt_dof_sections.o usdt_dof_sections.c
rm -f libusdt.a
ar cru libusdt.a usdt.o usdt_dof_file.o usdt_tracepoints.o usdt_probe.o usdt_dof.o usdt_dof_sections.o
ranlib libusdt.a
  touch Release/obj.target/libusdt.stamp
  c++ '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DBUILDING_NODE_EXTENSION' -I/Users/eric/.node-gyp/2.2.1/src -I/Users/eric/.node-gyp/2.2.1/deps/uv/include -I/Users/eric/.node-gyp/2.2.1/deps/v8/include -I../libusdt -I../node_modules/nan  -Os -gdwarf-2 -mmacosx-version-min=10.5 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -std=gnu++0x -fno-rtti -fno-exceptions -fno-threadsafe-statics -fno-strict-aliasing -MMD -MF ./Release/.deps/Release/obj.target/DTraceProviderBindings/dtrace_provider.o.d.raw  -c -o Release/obj.target/DTraceProviderBindings/dtrace_provider.o ../dtrace_provider.cc
In file included from ../dtrace_provider.cc:1:
In file included from ../dtrace_provider.h:1:
In file included from ../node_modules/nan/nan.h:74:
In file included from ../node_modules/nan/nan_new.h:181:
../node_modules/nan/nan_implementation_12_inl.h:172:66: error: too many arguments to function call,
      expected at most 2, have 4
  return v8::Signature::New(v8::Isolate::GetCurrent(), receiver, argc, argv);
         ~~~~~~~~~~~~~~~~~~                                      ^~~~~~~~~~
/Users/eric/.node-gyp/2.2.1/deps/v8/include/v8.h:4188:3: note: 'New' declared here
  static Local<Signature> New(
  ^
1 error generated.
make: *** [Release/obj.target/DTraceProviderBindings/dtrace_provider.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/Users/eric/.nvm/versions/io.js/v2.2.1/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:269:23)
gyp ERR! stack     at emitTwo (events.js:87:13)
gyp ERR! stack     at ChildProcess.emit (events.js:172:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:199:12)
gyp ERR! System Darwin 14.3.0
gyp ERR! command "/Users/eric/.nvm/versions/io.js/v2.2.1/bin/iojs" "/Users/eric/.nvm/versions/io.js/v2.2.1/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/eric/node_modules/bunyan/node_modules/dtrace-provider
gyp ERR! node -v v2.2.1
gyp ERR! node-gyp -v v1.0.3
gyp ERR! not ok
bunyan@1.3.6 node_modules/bunyan
├── safe-json-stringify@1.0.3
├── mv@2.0.3 (rimraf@2.2.8, ncp@0.6.0, mkdirp@0.5.1)
└── dtrace-provider@0.4.0 (nan@1.5.3)

@trentm
Copy link
Owner

trentm commented Jun 16, 2015

Fixed in bunyan 1.4.0 with dtrace-provider@0.5.0 upgrade I hope (https://github.com/trentm/node-bunyan/blob/master/CHANGES.md#bunyan-140).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants