node-libxl
node-libxl copied to clipboard
Doesn't compile on Node 14, 16, and 17
Hi, trying to update we ran into this issue:
npm ERR! path /app/node_modules/libxl
npm ERR! command failed
npm ERR! command sh -c node install-libxl.js && node-gyp rebuild
npm ERR! Automatic download overriden by NODE_LIBXL_SDK_ARCHIVE, using archive "/app/libxl-lib-latest.tar.gz"...
npm ERR! Extracting /app/libxl-lib-latest.tar.gz ...
npm ERR! Renaming deps/libxl-3.8.8.2 to deps/libxl ...
npm ERR! All done!
npm ERR! make: Entering directory '/app/node_modules/libxl/build'
npm ERR! CXX(target) Release/obj.target/liblibxl/src/bindings.o
npm ERR! CXX(target) Release/obj.target/liblibxl/src/book.o
npm ERR! CXX(target) Release/obj.target/liblibxl/src/argument_helper.o
npm ERR! CXX(target) Release/obj.target/liblibxl/src/util.o
npm ERR! CXX(target) Release/obj.target/liblibxl/src/sheet.o
npm ERR! CXX(target) Release/obj.target/liblibxl/src/format.o
npm ERR! CXX(target) Release/obj.target/liblibxl/src/font.o
npm ERR! CXX(target) Release/obj.target/liblibxl/src/book_wrapper.o
npm ERR! CXX(target) Release/obj.target/liblibxl/src/string_copy.o
npm ERR! CXX(target) Release/obj.target/liblibxl/src/buffer_copy.o
npm ERR! SOLINK_MODULE(target) Release/obj.target/libxl.node
npm ERR! make: Leaving directory '/app/node_modules/libxl/build'
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using [email protected]
npm ERR! gyp info using [email protected] | linux | arm64
npm ERR! (node:4428) [DEP0150] DeprecationWarning: Setting process.config is deprecated. In the future the property will be read-only.
npm ERR! (Use `node --trace-deprecation ...` to show where the warning was created)
npm ERR! gyp info spawn /usr/bin/python2
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args '/app/node_modules/node-gyp/gyp/gyp_main.py',
npm ERR! gyp info spawn args 'binding.gyp',
npm ERR! gyp info spawn args '-f',
npm ERR! gyp info spawn args 'make',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/app/node_modules/libxl/build/config.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/app/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/root/.node-gyp/16.14.0/include/node/common.gypi',
npm ERR! gyp info spawn args '-Dlibrary=shared_library',
npm ERR! gyp info spawn args '-Dvisibility=default',
npm ERR! gyp info spawn args '-Dnode_root_dir=/root/.node-gyp/16.14.0',
npm ERR! gyp info spawn args '-Dnode_gyp_dir=/app/node_modules/node-gyp',
npm ERR! gyp info spawn args '-Dnode_lib_file=/root/.node-gyp/16.14.0/<(target_arch)/node.lib',
npm ERR! gyp info spawn args '-Dmodule_root_dir=/app/node_modules/libxl',
npm ERR! gyp info spawn args '-Dnode_engine=v8',
npm ERR! gyp info spawn args '--depth=.',
npm ERR! gyp info spawn args '--no-parallel',
npm ERR! gyp info spawn args '--generator-output',
npm ERR! gyp info spawn args 'build',
npm ERR! gyp info spawn args '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! gyp info spawn make
npm ERR! gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
npm ERR! In file included from ../../nan/nan.h:56,
npm ERR! from ../src/common.h:28,
npm ERR! from ../src/bindings.cc:25:
npm ERR! /root/.node-gyp/16.14.0/include/node/node.h:842:43: warning: cast between incompatible function types from 'void (*)(v8::Local<v8::Object>)' to 'node::addon_register_func' {aka 'void (*)(v8::Local<v8::Object>, v8::Local<v8::Value>, void*)'} [-Wcast-function-type]
npm ERR! (node::addon_register_func) (regfunc), \
npm ERR! ^
npm ERR! /root/.node-gyp/16.14.0/include/node/node.h:876:3: note: in expansion of macro 'NODE_MODULE_X'
npm ERR! NODE_MODULE_X(modname, regfunc, NULL, 0) // NOLINT (readability/null_usage)
npm ERR! ^~~~~~~~~~~~~
npm ERR! ../src/bindings.cc:41:1: note: in expansion of macro 'NODE_MODULE'
npm ERR! NODE_MODULE(libxl, Initialize)
npm ERR! ^~~~~~~~~~~
npm ERR! /usr/bin/ld: cannot find -lxl
npm ERR! collect2: error: ld returned 1 exit status
npm ERR! make: *** [liblibxl.target.mk:149: Release/obj.target/libxl.node] Error 1
I know this is super old, but I updated the version of nan in the package and it now compiles:
npm i nan@latest --save
This created:
"nan": "^2.19.0"
in the package.json file