gemini-testing / png-img

Lite libpng wrapper for node.js
MIT License
29 stars 13 forks source link

Build fails for node 12 #45

Closed Li0liQ closed 5 years ago

Li0liQ commented 5 years ago

png-img fails to install when using node 12.

  CC(target) Release/obj.target/zlib/third_party/zlib/inftrees.o
  CC(target) Release/obj.target/zlib/third_party/zlib/trees.o
  CC(target) Release/obj.target/zlib/third_party/zlib/uncompr.o
  CC(target) Release/obj.target/zlib/third_party/zlib/zutil.o
  LIBTOOL-STATIC Release/zlib.a
  CXX(target) Release/obj.target/png_img/src/init.o
../src/init.cc:10:125: error: too few arguments to function call, single argument 'context' was not specified
    Nan::Set(target, New<String>("PngImg").ToLocalChecked(), New<FunctionTemplate>(PngImgAdapter::NewInstance)->GetFunction());
                                                             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
/Users/li0liq/.node-gyp/12.6.0/include/node/v8.h:5948:3: note: 'GetFunction' declared here
  V8_WARN_UNUSED_RESULT MaybeLocal<Function> GetFunction(
  ^
/Users/li0liq/.node-gyp/12.6.0/include/node/v8config.h:351:31: note: expanded from macro 'V8_WARN_UNUSED_RESULT'
#define V8_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
                              ^
1 error generated.
make: *** [Release/obj.target/png_img/src/init.o] Error 1
lukalimova commented 5 years ago

Same. Any solution yet? ` CC(target) Release/obj.target/zlib/third_party/zlib/zutil.o LIBTOOL-STATIC Release/zlib.a CXX(target) Release/obj.target/png_img/src/init.o ../src/init.cc:10:125: error: too few arguments to function call, single argument 'context' was not specified ...New(PngImgAdapter::NewInstance)->GetFunction());


/Users/l.kalimova/.node-gyp/12.7.0/include/node/v8.h:5955:3: note: 
      'GetFunction' declared here
  V8_WARN_UNUSED_RESULT MaybeLocal<Function> GetFunction(
  ^
/Users/l.kalimova/.node-gyp/12.7.0/include/node/v8config.h:351:31: note: 
      expanded from macro 'V8_WARN_UNUSED_RESULT'
#define V8_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
                              ^
1 error generated.
make: *** [Release/obj.target/png_img/src/init.o] Error 1
gyp ERR! build error 
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/Users/l.kalimova/.nvm/versions/node/v12.7.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:266:23)
gyp ERR! stack     at ChildProcess.emit (events.js:203:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gyp ERR! System Darwin 18.7.0
gyp ERR! command "/Users/l.kalimova/.nvm/versions/node/v12.7.0/bin/node" "/Users/l.kalimova/.nvm/versions/node/v12.7.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/l.kalimova/Documents/lu-tests/node_modules/png-img
gyp ERR! node -v v12.7.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok `
j0tunn commented 5 years ago

https://github.com/gemini-testing/png-img/pull/46 Fixed in png-img@2.2.1