blackbeam / poppler-simple

A simple javascript interface to poppler library
Apache License 2.0
37 stars 14 forks source link

No longer working with Node 0.10 #10

Closed mgartner closed 9 years ago

mgartner commented 9 years ago

Looks like the changes in 2.0+ created an issue when using Node 0.10.32.

Can Node 0.10 be supported or will 0.12 be the new minimum?

npm i                                                                                                                                                                                                                                                                               ~/workspace/poppler-simple

> poppler-simple@0.2.1 preinstall /Users/marcus/workspace/poppler-simple
> ((npm install nan) && (node-gyp configure)) || (exit 0)

nan@2.0.9 node_modules/nan
-
> poppler-simple@0.2.1 install /Users/marcus/workspace/poppler-simple
> (node-gyp rebuild) || (exit 0)

  CXX(target) Release/obj.target/poppler/src/poppler.o
../src/poppler.cc:10:31: error: no viable conversion from 'Handle<v8::Object>' to 'v8::Local<v8::Object>'
    NodePopplerDocument::Init(exports);
                              ^~~~~~~
/Users/marcus/.node-gyp/0.10.32/deps/v8/include/v8.h:269:26: note: candidate constructor (the implicit copy constructor) not viable: cannot bind base class object of type 'Handle<v8::Object>' to derived class reference 'const v8::Local<v8::Object> &' for 1st argument
template <class T> class Local : public Handle<T> {
                         ^
/Users/marcus/.node-gyp/0.10.32/deps/v8/include/v8.h:272:29: note: candidate template ignored: could not match 'Local' against 'Handle'
  template <class S> inline Local(Local<S> that)
                            ^
/Users/marcus/.node-gyp/0.10.32/deps/v8/include/v8.h:281:29: note: candidate template ignored: could not match 'S *' against 'Handle<v8::Object>'
  template <class S> inline Local(S* that) : Handle<T>(that) { }
                            ^
../src/NodePopplerDocument.h:26:48: note: passing argument to parameter 'exports' here
        static void Init(v8::Local<v8::Object> exports);
                                               ^
../src/poppler.cc:11:27: error: no viable conversion from 'Handle<v8::Object>' to 'v8::Local<v8::Object>'
    NodePopplerPage::Init(exports);
                          ^~~~~~~
/Users/marcus/.node-gyp/0.10.32/deps/v8/include/v8.h:269:26: note: candidate constructor (the implicit copy constructor) not viable: cannot bind base class object of type 'Handle<v8::Object>' to derived class reference 'const v8::Local<v8::Object> &' for 1st argument
template <class T> class Local : public Handle<T> {
                         ^
/Users/marcus/.node-gyp/0.10.32/deps/v8/include/v8.h:272:29: note: candidate template ignored: could not match 'Local' against 'Handle'
  template <class S> inline Local(Local<S> that)
                            ^
/Users/marcus/.node-gyp/0.10.32/deps/v8/include/v8.h:281:29: note: candidate template ignored: could not match 'S *' against 'Handle<v8::Object>'
  template <class S> inline Local(S* that) : Handle<T>(that) { }
                            ^
../src/NodePopplerPage.h:103:48: note: passing argument to parameter 'exports' here
        static void Init(v8::Local<v8::Object> exports);
                                               ^
2 errors generated.
make: *** [Release/obj.target/poppler/src/poppler.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/Users/marcus/.nvm/v0.10.32/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:269:23)
gyp ERR! stack     at ChildProcess.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:810:12)
gyp ERR! System Darwin 14.1.0
gyp ERR! command "node" "/Users/marcus/.nvm/v0.10.32/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/marcus/workspace/poppler-simple
gyp ERR! node -v v0.10.32
gyp ERR! node-gyp -v v1.0.3
gyp ERR! not ok
blackbeam commented 9 years ago

Thanks for report! 0.10 is the new minimum. Changes published as v0.2.2

mgartner commented 9 years ago

Awesome! Thanks!