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

Can't install jmx #13

Closed
jbrownD3 opened this issue Nov 4, 2016 · 11 comments
Closed

Can't install jmx #13

jbrownD3 opened this issue Nov 4, 2016 · 11 comments
Assignees

Comments

@jbrownD3
Copy link

jbrownD3 commented Nov 4, 2016

Failed when installing from npm into my project. Tried again into an empty directory (to eliminate any other packages as the issue). Version of node and npm:

jbrown001:junk jbrown$ node --version
v6.3.1
jbrown001:junk jbrown$ npm --version
3.10.3

The results of the install attempt below:

jbrown001:src jbrown$ mkdir junk
jbrown001:src jbrown$ cd junk
jbrown001:junk jbrown$ npm init
This utility will walk you through creating a package.json file.
It only covers the most common items, and tries to guess sensible defaults.

See `npm help json` for definitive documentation on these fields
and exactly what they do.

Use `npm install <pkg> --save` afterwards to install a package and
save it as a dependency in the package.json file.

Press ^C at any time to quit.
name: (junk)
version: (1.0.0)
description:
entry point: (index.js)
test command:
git repository:
keywords:
author:
license: (ISC)
About to write to /Users/jbrown/src/junk/package.json:

{
  "name": "junk",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "author": "",
  "license": "ISC"
}


Is this ok? (yes)
jbrown001:junk jbrown$ ls
package.json
jbrown001:junk jbrown$ npm install --save jmx
npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue

> java@0.6.1 install /Users/jbrown/src/junk/node_modules/java
> node-gyp rebuild

  CXX(target) Release/obj.target/nodejavabridge_bindings/src/java.o
In file included from ../src/java.cpp:1:
In file included from ../src/java.h:9:
../../nan/nan.h:590:20: error: no type named 'GCEpilogueCallback' in 'v8::Isolate'
      v8::Isolate::GCEpilogueCallback callback
      ~~~~~~~~~~~~~^
../../nan/nan.h:596:20: error: no type named 'GCEpilogueCallback' in 'v8::Isolate'
      v8::Isolate::GCEpilogueCallback callback) {
      ~~~~~~~~~~~~~^
../../nan/nan.h:601:20: error: no type named 'GCPrologueCallback' in 'v8::Isolate'
      v8::Isolate::GCPrologueCallback callback
      ~~~~~~~~~~~~~^
../../nan/nan.h:607:20: error: no type named 'GCPrologueCallback' in 'v8::Isolate'
      v8::Isolate::GCPrologueCallback callback) {
      ~~~~~~~~~~~~~^
4 errors generated.
make: *** [Release/obj.target/nodejavabridge_bindings/src/java.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:276:23)
gyp ERR! stack     at emitTwo (events.js:106:13)
gyp ERR! stack     at ChildProcess.emit (events.js:191:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:204:12)
gyp ERR! System Darwin 16.0.0
gyp ERR! command "/usr/local/Cellar/node/6.3.1/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/jbrown/src/junk/node_modules/java
gyp ERR! node -v v6.3.1
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok
junk@1.0.0 /Users/jbrown/src/junk
└── async@1.5.2  extraneous

npm WARN junk@1.0.0 No description
npm WARN junk@1.0.0 No repository field.
npm ERR! Darwin 16.0.0
npm ERR! argv "/usr/local/Cellar/node/6.3.1/bin/node" "/usr/local/bin/npm" "install" "--save" "jmx"
npm ERR! node v6.3.1
npm ERR! npm  v3.10.3
npm ERR! code ELIFECYCLE

npm ERR! java@0.6.1 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the java@0.6.1 install script 'node-gyp rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the java package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs java
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls java
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/jbrown/src/junk/npm-debug.log
@jbrownD3
Copy link
Author

jbrownD3 commented Nov 4, 2016

Installing on mac...python version is 2.7.12 if that has anything to do with this (I see install the java npm mentions python version must be 2.x)

@zuazo zuazo added the bug label Nov 4, 2016
@craigotis
Copy link

craigotis commented Nov 10, 2016

I'm seeing the same thing.

> python --version
Python 2.7.10
> npm --version
3.10.8

Output:

In file included from ../src/java.cpp:1:
In file included from ../src/java.h:9:
../../nan/nan.h:590:20: error: no type named 'GCEpilogueCallback' in 'v8::Isolate'
      v8::Isolate::GCEpilogueCallback callback
      ~~~~~~~~~~~~~^
../../nan/nan.h:596:20: error: no type named 'GCEpilogueCallback' in 'v8::Isolate'
      v8::Isolate::GCEpilogueCallback callback) {
      ~~~~~~~~~~~~~^
../../nan/nan.h:601:20: error: no type named 'GCPrologueCallback' in 'v8::Isolate'
      v8::Isolate::GCPrologueCallback callback
      ~~~~~~~~~~~~~^
../../nan/nan.h:607:20: error: no type named 'GCPrologueCallback' in 'v8::Isolate'
      v8::Isolate::GCPrologueCallback callback) {
      ~~~~~~~~~~~~~^

I can include the full stack but it's likely the same as above.

@zuazo zuazo self-assigned this Nov 10, 2016
@zuazo zuazo closed this as completed in 3e16257 Nov 10, 2016
@zuazo
Copy link
Owner

zuazo commented Nov 10, 2016

Thanks for the report!

I think I fixed it in master by updating the java dependency. Can you help me testing it?

$ npm install https://github.com/zuazo/node-jmx

@jbrownD3
Copy link
Author

jbrownD3 commented Nov 10, 2016

Still doesn't work, may be a node-java problem, not a node-jmx problem:

 error: no member named 'SetHiddenValue' in 'v8::Object'

This same error is popping up in the node-java issues list since early August, but without any resolution.

@zuazo
Copy link
Owner

zuazo commented Nov 10, 2016

@jbrownD3 thanks for the feedback.

What g++ and java versions are you using?

@zuazo zuazo reopened this Nov 10, 2016
@craigotis
Copy link

Seeing the same (new) issue as @jbrownD3.

> g++ --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/include/c++/4.2.1
Apple LLVM version 8.0.0 (clang-800.0.42.1)
Target: x86_64-apple-darwin16.1.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

And:

> java -version
java version "1.8.0_111"
Java(TM) SE Runtime Environment (build 1.8.0_111-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.111-b14, mixed mode)

@craigotis
Copy link

craigotis commented Nov 10, 2016

But: That command (npm install https://github.com/zuazo/node-jmx) does work for me after downgrading from Node 7 to Node 6 LTS.

I updated my package.json to read:

"dependencies": {
    ...
    "jmx": "zuazo/node-jmx",
    ...
}

And I'm up and running.

@zuazo
Copy link
Owner

zuazo commented Nov 10, 2016

@jbrownD3, maybe it's related to the nan dependency of the java module:

chrisa/node-dtrace-provider#80

I created a branch that uses master (unreleased) version of the java module. Can you try the following?

$ npm install https://github.com/zuazo/node-jmx.git#dev-java

@jbrownD3
Copy link
Author

That works, thanks for the updates. Hopefully node-java will get that branch released soon.

@zuazo
Copy link
Owner

zuazo commented Nov 12, 2016

I just released 0.6.1 to update java dependency version to 0.7.

Edit: Sorry, I accidentally released the dev-java in 0.6.0 release 😧

@zuazo zuazo added Type: Bug and removed bug labels Jan 27, 2017
@zuazo
Copy link
Owner

zuazo commented Jan 28, 2017

I think this is already fixed. Please, add a comment here if not and I will reopen the issue.

@zuazo zuazo closed this as completed Jan 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants