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

Installation fail in node v0.11.16, v0.12.1 #7

Open
mori-dev opened this issue Apr 10, 2015 · 9 comments
Open

Installation fail in node v0.11.16, v0.12.1 #7

mori-dev opened this issue Apr 10, 2015 · 9 comments

Comments

@mori-dev
Copy link

I can install librsvg in node v0.10.36.
But I cannnot install in node v0.11.16 and v0.12.1.
How to install rsvg in node v0.11.16 and v0.12.1?

gyp ERR! stack Error: `make` failed with exit code: 2
child_process: customFds option is deprecated, use stdio instead.
  CXX(target) Release/obj.target/rsvg/src/Rsvg.o
In file included from ../src/Rsvg.cc:2:
../src/Rsvg.h:7:27: error: expected class name
class Rsvg : public node::ObjectWrap {
                          ^
../src/Rsvg.h:15:41: 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/b05997/.node-gyp/0.12.1/deps/v8/include/v8.h:127:7: note: 'v8::internal::Arguments' declared here
class Arguments;
      ^
In file included from ../src/Rsvg.cc:2:
../src/Rsvg.h:16:48: error: no type named 'Arguments' in namespace 'v8'; did you mean 'v8::internal::Arguments'?
        static v8::Handle<v8::Value> GetBaseURI(const v8::Arguments& args);
                                                      ^~~~~~~~~~~~~
v8::internal::Arguments

...

/Users/b05997/.node-gyp/0.12.1/deps/v8/include/v8.h:127:7: note: 'v8::internal::Arguments' declared here
class Arguments;
      ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make: *** [Release/obj.target/rsvg/src/Rsvg.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/Users/b05997/.nodebrew/node/v0.12.1/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack     at ChildProcess.emit (events.js:110:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:1067:12)
gyp ERR! System Darwin 14.1.0
gyp ERR! command "node" "/Users/b05997/.nodebrew/node/v0.12.1/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/b05997/repos/fam/fam-image-server/node_modules/rsvg
gyp ERR! node -v v0.12.1
gyp ERR! node-gyp -v v1.0.2
gyp ERR! not ok
npm ERR! Darwin 14.1.0
npm ERR! argv "/Users/b05997/.nodebrew/node/v0.12.1/bin/node" "/Users/b05997/.nodebrew/current/bin/npm" "install" "rsvg"
npm ERR! node v0.12.1
npm ERR! npm  v2.5.1
npm ERR! code ELIFECYCLE

npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the rsvg 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 their info via:
npm ERR!     npm owner ls rsvg
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/b05997/repos/fam/fam-image-server/npm-debug.log
@deyhle
Copy link

deyhle commented May 6, 2015

Seems to be an issue with the changes of node 0.12: https://strongloop.com/strongblog/node-js-v0-12-c-apis-breaking/

Apparently usage of nan would fix that.
Update would be much appreciated!

@walling
Copy link
Owner

walling commented May 28, 2015

PRs accepted! I could possibly take a look at nanifying the code, if I have time the coming month.

@mori-dev
Copy link
Author

🙏

@ctizen
Copy link

ctizen commented Jun 5, 2015

Recently tried to make a port using nan: https://github.com/heilage-nsk/node-rsvg/tree/port-to-node-0.12 - current status is "works for me", tested on node 0.10.37 and 0.12.4.

Based on this fork: https://github.com/anru/node-rsvg/
Made a PR: anru#1 - some code review would be much appreciated.

@ricordisamoa
Copy link

Just tried librsvg from git instead of rsvg, and it works like a charm even in Node/io.js 2.2.1!
💛

@ali-habibzadeh
Copy link

Any update on this getting fixed?

@walling
Copy link
Owner

walling commented Aug 5, 2015

I'm sorry I haven't been able to keep up with the issues in this project and unfortunately I must confess it's not super high priority for me right now compared to some other things. It seems the fork of @anru works quite well right now.

If anyone wants commit access to this repo to make it up-to-date, please send a private message. Otherwise, I'll see if I can back port the changes from anru’s fork in a few months.

@cp
Copy link

cp commented Nov 10, 2015

npm install librsvg per @ricordisamoa's comment worked for me!

@ctizen
Copy link

ctizen commented Nov 10, 2015

For now, librsvg npm package is up-to-date and points to a maintained fork of node-rsvg at https://github.com/2gis/node-rsvg that supports nodejs up to 5.x.

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

No branches or pull requests

7 participants