spi-device: node-gyp fails on armv7 32bit
I’m on Arch Linux ARM for amv7h, 32bit.
node-gyp fails with:
[alarm@lio-sta-001 MySpiTool]$ npm install
npm ERR! code 1
npm ERR! path /home/alarm/MySpiTool/node_modules/spi-device
npm ERR! command failed
npm ERR! command sh -c node-gyp rebuild
npm ERR! make: Entering directory '/home/alarm/MySpiTool/node_modules/spi-device/build'
npm ERR!   CXX(target) Release/obj.target/spi/src/spi.o
npm ERR!   CXX(target) Release/obj.target/spi/src/spidevice.o
npm ERR!   CXX(target) Release/obj.target/spi/src/open.o
npm ERR!   CXX(target) Release/obj.target/spi/src/close.o
npm ERR!   CXX(target) Release/obj.target/spi/src/transfer.o
npm ERR!   CXX(target) Release/obj.target/spi/src/getoptions.o
npm ERR! make: Leaving directory '/home/alarm/MySpiTool/node_modules/spi-device/build'
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@8.1.0
npm ERR! gyp info using node@14.16.0 | linux | arm
npm ERR! gyp info find Python using Python version 3.9.5 found at "/usr/bin/python3"
npm ERR! gyp info spawn /usr/bin/python3
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args   '/usr/lib/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   '/home/alarm/MySpiTool/node_modules/spi-device/build/config.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/usr/lib/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/home/alarm/.cache/node-gyp/14.16.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=/home/alarm/.cache/node-gyp/14.16.0',
npm ERR! gyp info spawn args   '-Dnode_gyp_dir=/usr/lib/node_modules/node-gyp',
npm ERR! gyp info spawn args   '-Dnode_lib_file=/home/alarm/.cache/node-gyp/14.16.0/<(target_arch)/node.lib',
npm ERR! gyp info spawn args   '-Dmodule_root_dir=/home/alarm/MySpiTool/node_modules/spi-device',
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:290,
npm ERR!                  from ../src/getoptions.cc:4:
npm ERR! ../../nan/nan_new.h: In instantiation of ‘typename Nan::imp::Factory<T>::return_t Nan::New(A0) [with T = v8::Uint32; A0 = long unsigned int; typename Nan::imp::Factory<T>::return_t = v8::Local<v8::Uint32>]’:
npm ERR! ../src/getoptions.cc:35:65:   required from here
npm ERR! ../../nan/nan_new.h:208:30: error: call of overloaded ‘New(long unsigned int&)’ is ambiguous
npm ERR!   208 |   return imp::Factory<T>::New(arg0);
npm ERR!       |          ~~~~~~~~~~~~~~~~~~~~^~~~~~
npm ERR! In file included from ../../nan/nan_new.h:189,
npm ERR!                  from ../../nan/nan.h:290,
npm ERR!                  from ../src/getoptions.cc:4:
npm ERR! ../../nan/nan_implementation_12_inl.h:177:1: note: candidate: ‘static Nan::imp::FactoryBase<v8::Uint32>::return_t Nan::imp::Factory<v8::Uint32>::New(int32_t)’
npm ERR!   177 | Factory<v8::Uint32>::New(int32_t value) {
npm ERR!       | ^~~~~~~~~~~~~~~~~~~
npm ERR! ../../nan/nan_implementation_12_inl.h:183:1: note: candidate: ‘static Nan::imp::FactoryBase<v8::Uint32>::return_t Nan::imp::Factory<v8::Uint32>::New(uint32_t)’
npm ERR!   183 | Factory<v8::Uint32>::New(uint32_t value) {
npm ERR!       | ^~~~~~~~~~~~~~~~~~~
npm ERR! make: *** [spi.target.mk:115: Release/obj.target/spi/src/getoptions.o] Error 1
npm ERR! gyp ERR! build error
npm ERR! gyp ERR! stack Error: `make` failed with exit code: 2
npm ERR! gyp ERR! stack     at ChildProcess.onExit (/usr/lib/node_modules/node-gyp/lib/build.js:194:23)
npm ERR! gyp ERR! stack     at ChildProcess.emit (events.js:315:20)
npm ERR! gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12)
npm ERR! gyp ERR! System Linux 5.10.44-1-ARCH
npm ERR! gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd /home/alarm/MySpiTool/node_modules/spi-device
npm ERR! gyp ERR! node -v v14.16.0
npm ERR! gyp ERR! node-gyp -v v8.1.0
npm ERR! gyp ERR! not ok
npm ERR! A complete log of this run can be found in:
npm ERR!     /home/alarm/.npm/_logs/2021-06-22T13_17_31_561Z-debug.log
Runs fine on Ach Linux ARM for armv8/aarch64, 64bit.
Any ideas howto solve the error call of overloaded ‘New(long unsigned int&)’ is ambiguous?
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 15 (9 by maintainers)
Yes, I’ll do that in the coming days. It shouldn’t take too long.
This issue has been fixed and the fix is available with spi-device@3.1.2 which has been published on npm.