nodebots/nodebots-interchange

Issues installing package in Raspbian GNU/Linux 10 (Raspberry pi 3)

drio opened this issue · 11 comments

drio commented

I have issues installing nodebots-interchange in my system. Not sure what the issue is exactly. Any help is welcome.

Thank you in advance.

System details:

$ cat /etc/issue                                                                               
Raspbian GNU/Linux 10
$ uname -a
Linux testpi 4.19.75-v7+ #1270 SMP Tue Sep 24 18:45:11 BST 2019 armv7l GNU/Linux
pi@testpi:~/src/test-node-pixel $ npm -v
6.13.1
pi@testpi:~/src/test-node-pixel $ node -v
v12.13.1
$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/arm-linux-gnueabihf/8/lto-wrapper
Target: arm-linux-gnueabihf
Configured with: ../src/configure -v --with-pkgversion='Raspbian 8.3.0-6+rpi1' --with-bugurl=file:///usr/share/doc/gcc-8/README.Bugs --enable-languages=c,ada,c++,go,d,fortran,objc,obj-c++ --prefix=/usr --with-gcc-major-version-only --program-suffix=-8 --program-prefix=arm-linux-gnueabihf- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-bootstrap --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-libitm --disable-libquadmath --disable-libquadmath-support --enable-plugin --with-system-zlib --with-target-system-zlib --enable-objc-gc=auto --enable-multiarch --disable-sjlj-exceptions --with-arch=armv6 --with-fpu=vfp --with-float=hard --disable-werror --enable-checking=release --build=arm-linux-gnueabihf --host=arm-linux-gnueabihf --target=arm-linux-gnueabihf
Thread model: posix
gcc version 8.3.0 (Raspbian 8.3.0-6+rpi1)
pi@testpi:~/src/test-node-pixel $ npm install -g nodebots-interchange
....
../../nan/nan.h:1740:3: note: declared here
   Call(int argc, v8::Local<v8::Value> argv[]) const {
   ^~~~
../src/serialport.cpp: In function ‘Nan::NAN_METHOD_RETURN_TYPE Set(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/serialport.cpp:250:53: error: no matching function for call to ‘v8::Value::ToObject()’
   v8::Local<v8::Object> options = info[1]->ToObject();
 ....                                                    ^
In file included from /home/pi/.cache/node-gyp/13.2.0/include/node/node.h:63,
                 from ../../nan/nan.h:54,
                 from ../src/./serialport.h:6,
                 from ../src/serialport.cpp:1:
/home/pi/.cache/node-gyp/13.2.0/include/node/v8.h:2754:44: note: candidate:
....
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:210:5)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gyp ERR! System Linux 4.19.75-v7+
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/pi/.npm-global/lib/node_modules/nodebots-interchange/node_modules/serialport
gyp ERR! node -v v12.13.1
gyp ERR! node-gyp -v v5.0.5
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! serialport@6.2.2 install: `prebuild-install || node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the serialport@6.2.2 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/pi/.npm/_logs/2019-12-01T19_09_40_501Z-debug.log
pi@testpi:~/src/test-node-pixel $ cat /home/pi/.npm/_logs/2019-12-01T19_09_40_501Z-debug.log

8714 verbose unlock done using /home/pi/.npm/_locks/staging-b40c4eb2186fd376.lock for /home/pi/.npm-global/lib/node_modules/.staging
8715 timing stage:rollbackFailedOptional Completed in 16374ms
8716 timing stage:runTopLevelLifecycles Completed in 105557ms
8717 verbose stack Error: serialport@6.2.2 install: `prebuild-install || node-gyp rebuild`
8717 verbose stack Exit status 1
8717 verbose stack     at EventEmitter.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16)
8717 verbose stack     at EventEmitter.emit (events.js:210:5)
8717 verbose stack     at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
8717 verbose stack     at ChildProcess.emit (events.js:210:5)
8717 verbose stack     at maybeClose (internal/child_process.js:1021:16)
8717 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
8718 verbose pkgid serialport@6.2.2
8719 verbose cwd /home/pi/src/test-node-pixel
8720 verbose Linux 4.19.75-v7+
8721 verbose argv "/usr/bin/node" "/usr/bin/npm" "install" "-g" "nodebots-interchange"
8722 verbose node v12.13.1
8723 verbose npm  v6.13.1
8724 error code ELIFECYCLE
8725 error errno 1
8726 error serialport@6.2.2 install: `prebuild-install || node-gyp rebuild`
8726 error Exit status 1
8727 error Failed at the serialport@6.2.2 install script.
8727 error This is probably not a problem with npm. There is likely additional logging output above.
8728 verbose exit [ 1, true ]

Same exact issue for me as well.

Ok so after some digging it appears serialport 6 no longer compiles using node v12 and above. Serialport v7 and 8 do compile on node v12, so a dependency upgrade would be necessary.

Howdy peeps - I can do a dependency update and publish a version which you could try an install if you are able to test for me. Right now my time is limited due to work (festive period in retail is a little hectic) so I can only test a build on my local machine quickly.

drio commented

I can do a dependency update and publish a version which you could try an install if you are able to test for me

👍 @ajfisher

Howdy peeps - I can do a dependency update and publish a version which you could try an install if you are able to test for me. Right now my time is limited due to work (festive period in retail is a little hectic) so I can only test a build on my local machine quickly.

Sure thing, let me know when you have published.

Disregard, I see the commit. I will test now.

Success!

drio commented

Umm.... It fails for me. What versions (node/npm) are you using @swiftmypants?

../src/serialport.cpp: In function ‘void EIO_AfterGet(uv_work_t*)’:
../src/serialport.cpp:329:96: error: no matching function for call to ‘v8::Object::Set(v8::Local<v8::String>, Nan::imp::FactoryBase<v8::Boolean>::return_t)’
     results->Set(Nan::New<v8::String>("cts").ToLocalChecked(), Nan::New<v8::Boolean>(data->cts));
                                                                                                ^
In file included from /home/pi/.cache/node-gyp/13.2.0/include/node/node.h:63,
                 from ../../../../../nan/nan.h:54,
                 from ../src/./serialport.h:6,
                 from ../src/serialport.cpp:1:

........


gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:210:5)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:270:12)
gyp ERR! System Linux 4.19.75-v7+
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/pi/.npm-global/lib/node_modules/nodebots-interchange/node_modules/serialport/node_modules/@serialport/bindings
gyp ERR! node -v v13.2.0
gyp ERR! node-gyp -v v5.0.5
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @serialport/bindings@2.0.8 install: `prebuild-install --tag-prefix @serialport/bindings@ || node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @serialport/bindings@2.0.8 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/pi/.npm/_logs/2019-12-04T15_55_21_176Z-debug.log

Umm.... It fails for me. What versions (node/npm) are you using @swiftmypants?

../src/serialport.cpp: In function ‘void EIO_AfterGet(uv_work_t*)’:
../src/serialport.cpp:329:96: error: no matching function for call to ‘v8::Object::Set(v8::Local<v8::String>, Nan::imp::FactoryBase<v8::Boolean>::return_t)’
     results->Set(Nan::New<v8::String>("cts").ToLocalChecked(), Nan::New<v8::Boolean>(data->cts));
                                                                                                ^
In file included from /home/pi/.cache/node-gyp/13.2.0/include/node/node.h:63,
                 from ../../../../../nan/nan.h:54,
                 from ../src/./serialport.h:6,
                 from ../src/serialport.cpp:1:

........


gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:210:5)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:270:12)
gyp ERR! System Linux 4.19.75-v7+
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/pi/.npm-global/lib/node_modules/nodebots-interchange/node_modules/serialport/node_modules/@serialport/bindings
gyp ERR! node -v v13.2.0
gyp ERR! node-gyp -v v5.0.5
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @serialport/bindings@2.0.8 install: `prebuild-install --tag-prefix @serialport/bindings@ || node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @serialport/bindings@2.0.8 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/pi/.npm/_logs/2019-12-04T15_55_21_176Z-debug.log

I test on LTS, which currently is v12.13.1.

drio commented

I test on LTS, which currently is v12.13.1.

Thank you, I switched to 13.1 and didn't go back to TLS. It works on TLS. Thank you, both.

Wonderful - glad that is all working properly. Thanks for testing it as well peeps.