Closed WebReflection closed 5 years ago
Hmmm, it looks like we have a different version of Node.js on our RPis, as I don't get that error on my RPi4 using the NodeSource PPAs. I suspect I need to update the engines field in package.json to allow arm64 too, but I'd like to confirm a couple things first:
1) Can you run which node | xargs file
and paste the output here? I get output that looks like this, showing that the Node.js binary is 32-bit:
/usr/bin/node: ELF 32-bit LSB executable, ARM, EABI5 version 1 (GNU/Linux), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, for GNU/Linux 3.16.42, with debug_info, not stripped
2) Can you let me know how you installed Node.js, and I'll try and mimic it?
Thanks for the report @WebReflection!
So, the RPi is 3, not 4, as 4 has the same old 32bit software behind, but RPi3 has been happily on arm64 for a while thanks to ArchLinux ARM.
Basically, ArchLinux ARM for Pi3 is arm64 and it's apparently capable of using, and building, software common in 32bits too, but since it's arm64 it doesn't pass the arm only check
Gotcha. Technically speaking Raspi IO doesn't support any distro other than Raspbian, but this seems like an easy enough fix and I'm sure Raspbian will have a 64-bit flavor eventually.
To confirm, if you add arm64
(with that exact spelling, spacing, capitalization, etc) to https://github.com/nebrius/raspi-peripheral/blob/master/package.json#L25, does that fix the error?
I can confirm raspi-io works well on ArchLinux too, with the right counter python helper, and yes the arm64 version is the one that should be added there, indeed using npm i -f
installs the package.
However, since apparently only this module specifies the architecture, wouldn't it be better to drop that list instead?
Either ways works for me, thanks
Most modules in Raspi IO specify this constraint, see https://github.com/nebrius/raspi-i2c/blob/master/package.json#L25-L27 for an example. I use it to give a more human-readable error to folks trying to install this on a not Raspberry Pi. Some modules, such as raspi-i2c, have install scripts that are specific to the Raspberry Pi and fail with cryptic errors otherwise (I used to get a lot of issues filed for this), so it's important that it stays.
I'll add arm64
to the cpu
field.
@nebrius, if there's any specific test you'd like me to do in arm64 and ArchLinux so we can be sure adding arm64 won't hurt anyone, I'd be happy to test for you.
Just let me know, thanks.
@WebReflection I just published new versions of the affected modules. Can you test installing it without the -f
flag to see if it works now? I did a test install in 32-bit Raspbian, and it still installs fine, so we're good in terms of regressions.
Yes, it works without any issue now, thank you 🎉
Following the whole build step
┌────────────────┐
│ ╔╗ ╔═╗╔╗╔ ╦╔═╗ │ Bootable
│ ╠╩╗║╣ ║║║ ║╠═╣ │ Electron
│ ╚═╝╚═╝╝╚╝╚╝╩ ╩ │ Node JS App
└────────────────┘
https://archibold.io/benja
[alarm@alarm ~]$ npm i -g raspi-io
> raspi-soft-pwm@6.0.2 preinstall /home/alarm/.npm-packages/lib/node_modules/raspi-io/node_modules/raspi-soft-pwm
> sh ./script/pigpio.sh
pigpio is already installed, skipping installation
> raspi-gpio@6.2.2 preinstall /home/alarm/.npm-packages/lib/node_modules/raspi-io/node_modules/raspi-gpio
> sh ./script/pigpio.sh
pigpio is already installed, skipping installation
> i2c-bus@4.0.11 install /home/alarm/.npm-packages/lib/node_modules/raspi-io/node_modules/i2c-bus
> node-gyp rebuild
make: Entering directory '/home/alarm/.npm-packages/lib/node_modules/raspi-io/node_modules/i2c-bus/build'
CXX(target) Release/obj.target/i2c/src/i2c.o
SOLINK_MODULE(target) Release/obj.target/i2c.node
COPY Release/i2c.node
make: Leaving directory '/home/alarm/.npm-packages/lib/node_modules/raspi-io/node_modules/i2c-bus/build'
> pigpio@1.3.0 install /home/alarm/.npm-packages/lib/node_modules/raspi-io/node_modules/pigpio
> node-gyp rebuild
make: Entering directory '/home/alarm/.npm-packages/lib/node_modules/raspi-io/node_modules/pigpio/build'
CXX(target) Release/obj.target/pigpio/src/pigpio.o
In file included from ../src/pigpio.cc:3:
../../nan/nan.h: In function 'void Nan::AsyncQueueWorker(Nan::AsyncWorker*)':
../../nan/nan.h:2298:62: warning: cast between incompatible function types from 'void (*)(uv_work_t*)' {aka 'void (*)(uv_work_s*)'} to 'uv_after_work_cb' {aka 'void (*)(uv_work_s*, int)'} [-Wcast-function-type]
, reinterpret_cast<uv_after_work_cb>(AsyncExecuteComplete)
^
In file included from ../../nan/nan.h:54,
from ../src/pigpio.cc:3:
../src/pigpio.cc: At global scope:
/home/alarm/.cache/node-gyp/12.11.1/include/node/node.h:560:43: warning: cast between incompatible function types from 'void (*)(Nan::ADDON_REGISTER_FUNCTION_ARGS_TYPE)' {aka 'void (*)(v8::Local<v8::Object>)'} to 'node::addon_register_func' {aka 'void (*)(v8::Local<v8::Object>, v8::Local<v8::Value>, void*)'} [-Wcast-function-type]
(node::addon_register_func) (regfunc), \
^
/home/alarm/.cache/node-gyp/12.11.1/include/node/node.h:594:3: note: in expansion of macro 'NODE_MODULE_X'
NODE_MODULE_X(modname, regfunc, NULL, 0) // NOLINT (readability/null_usage)
^~~~~~~~~~~~~
../src/pigpio.cc:855:1: note: in expansion of macro 'NODE_MODULE'
NODE_MODULE(pigpio, InitAll)
^~~~~~~~~~~
In file included from /home/alarm/.cache/node-gyp/12.11.1/include/node/node.h:63,
from ../../nan/nan.h:54,
from ../src/pigpio.cc:3:
/home/alarm/.cache/node-gyp/12.11.1/include/node/v8.h: In instantiation of 'void v8::PersistentBase<T>::SetWeak(P*, typename v8::WeakCallbackInfo<P>::Callback, v8::WeakCallbackType) [with P = node::ObjectWrap; T = v8::Object; typename v8::WeakCallbackInfo<P>::Callback = void (*)(const v8::WeakCallbackInfo<node::ObjectWrap>&)]':
/home/alarm/.cache/node-gyp/12.11.1/include/node/node_object_wrap.h:84:78: required from here
/home/alarm/.cache/node-gyp/12.11.1/include/node/v8.h:10004:16: warning: cast between incompatible function types from 'v8::WeakCallbackInfo<node::ObjectWrap>::Callback' {aka 'void (*)(const v8::WeakCallbackInfo<node::ObjectWrap>&)'} to 'Callback' {aka 'void (*)(const v8::WeakCallbackInfo<void>&)'} [-Wcast-function-type]
reinterpret_cast<Callback>(callback), type);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/alarm/.cache/node-gyp/12.11.1/include/node/v8.h: In instantiation of 'void v8::PersistentBase<T>::SetWeak(P*, typename v8::WeakCallbackInfo<P>::Callback, v8::WeakCallbackType) [with P = Nan::ObjectWrap; T = v8::Object; typename v8::WeakCallbackInfo<P>::Callback = void (*)(const v8::WeakCallbackInfo<Nan::ObjectWrap>&)]':
../../nan/nan_object_wrap.h:65:61: required from here
/home/alarm/.cache/node-gyp/12.11.1/include/node/v8.h:10004:16: warning: cast between incompatible function types from 'v8::WeakCallbackInfo<Nan::ObjectWrap>::Callback' {aka 'void (*)(const v8::WeakCallbackInfo<Nan::ObjectWrap>&)'} to 'Callback' {aka 'void (*)(const v8::WeakCallbackInfo<void>&)'} [-Wcast-function-type]
SOLINK_MODULE(target) Release/obj.target/pigpio.node
COPY Release/pigpio.node
make: Leaving directory '/home/alarm/.npm-packages/lib/node_modules/raspi-io/node_modules/pigpio/build'
> @serialport/bindings@2.0.8 install /home/alarm/.npm-packages/lib/node_modules/raspi-io/node_modules/@serialport/bindings
> prebuild-install --tag-prefix @serialport/bindings@ || node-gyp rebuild
prebuild-install WARN install No prebuilt binaries found (target=12.11.1 runtime=node arch=arm64 libc= platform=linux)
make: Entering directory '/home/alarm/.npm-packages/lib/node_modules/raspi-io/node_modules/@serialport/bindings/build'
CXX(target) Release/obj.target/bindings/src/serialport.o
In file included from ../src/./serialport.h:6,
from ../src/serialport.cpp:1:
../../../nan/nan.h: In function 'void Nan::AsyncQueueWorker(Nan::AsyncWorker*)':
../../../nan/nan.h:2298:62: warning: cast between incompatible function types from 'void (*)(uv_work_t*)' {aka 'void (*)(uv_work_s*)'} to 'uv_after_work_cb' {aka 'void (*)(uv_work_s*, int)'} [-Wcast-function-type]
, reinterpret_cast<uv_after_work_cb>(AsyncExecuteComplete)
^
../src/serialport.cpp: In function 'Nan::NAN_METHOD_RETURN_TYPE Open(Nan::NAN_METHOD_ARGS_TYPE)':
../src/serialport.cpp:78:69: warning: cast between incompatible function types from 'void (*)(uv_work_t*)' {aka 'void (*)(uv_work_s*)'} to 'uv_after_work_cb' {aka 'void (*)(uv_work_s*, int)'} [-Wcast-function-type]
uv_queue_work(uv_default_loop(), req, EIO_Open, (uv_after_work_cb)EIO_AfterOpen);
^~~~~~~~~~~~~
../src/serialport.cpp: In function 'Nan::NAN_METHOD_RETURN_TYPE Update(Nan::NAN_METHOD_ARGS_TYPE)':
../src/serialport.cpp:135:71: warning: cast between incompatible function types from 'void (*)(uv_work_t*)' {aka 'void (*)(uv_work_s*)'} to 'uv_after_work_cb' {aka 'void (*)(uv_work_s*, int)'} [-Wcast-function-type]
uv_queue_work(uv_default_loop(), req, EIO_Update, (uv_after_work_cb)EIO_AfterUpdate);
^~~~~~~~~~~~~~~
../src/serialport.cpp: In function 'Nan::NAN_METHOD_RETURN_TYPE Close(Nan::NAN_METHOD_ARGS_TYPE)':
../src/serialport.cpp:175:70: warning: cast between incompatible function types from 'void (*)(uv_work_t*)' {aka 'void (*)(uv_work_s*)'} to 'uv_after_work_cb' {aka 'void (*)(uv_work_s*, int)'} [-Wcast-function-type]
uv_queue_work(uv_default_loop(), req, EIO_Close, (uv_after_work_cb)EIO_AfterClose);
^~~~~~~~~~~~~~
../src/serialport.cpp: In function 'Nan::NAN_METHOD_RETURN_TYPE Flush(Nan::NAN_METHOD_ARGS_TYPE)':
../src/serialport.cpp:215:70: warning: cast between incompatible function types from 'void (*)(uv_work_t*)' {aka 'void (*)(uv_work_s*)'} to 'uv_after_work_cb' {aka 'void (*)(uv_work_s*, int)'} [-Wcast-function-type]
uv_queue_work(uv_default_loop(), req, EIO_Flush, (uv_after_work_cb)EIO_AfterFlush);
^~~~~~~~~~~~~~
../src/serialport.cpp: In function 'Nan::NAN_METHOD_RETURN_TYPE Set(Nan::NAN_METHOD_ARGS_TYPE)':
../src/serialport.cpp:270:68: warning: cast between incompatible function types from 'void (*)(uv_work_t*)' {aka 'void (*)(uv_work_s*)'} to 'uv_after_work_cb' {aka 'void (*)(uv_work_s*, int)'} [-Wcast-function-type]
uv_queue_work(uv_default_loop(), req, EIO_Set, (uv_after_work_cb)EIO_AfterSet);
^~~~~~~~~~~~
../src/serialport.cpp: In function 'Nan::NAN_METHOD_RETURN_TYPE Get(Nan::NAN_METHOD_ARGS_TYPE)':
../src/serialport.cpp:314:68: warning: cast between incompatible function types from 'void (*)(uv_work_t*)' {aka 'void (*)(uv_work_s*)'} to 'uv_after_work_cb' {aka 'void (*)(uv_work_s*, int)'} [-Wcast-function-type]
uv_queue_work(uv_default_loop(), req, EIO_Get, (uv_after_work_cb)EIO_AfterGet);
^~~~~~~~~~~~
../src/serialport.cpp: In function 'void EIO_AfterGet(uv_work_t*)':
../src/serialport.cpp:329:96: warning: 'bool v8::Object::Set(v8::Local<v8::Value>, v8::Local<v8::Value>)' is deprecated: Use maybe version [-Wdeprecated-declarations]
results->Set(Nan::New<v8::String>("cts").ToLocalChecked(), Nan::New<v8::Boolean>(data->cts));
^
In file included from /home/alarm/.cache/node-gyp/12.11.1/include/node/v8-internal.h:14,
from /home/alarm/.cache/node-gyp/12.11.1/include/node/v8.h:25,
from /home/alarm/.cache/node-gyp/12.11.1/include/node/node.h:63,
from ../../../nan/nan.h:54,
from ../src/./serialport.h:6,
from ../src/serialport.cpp:1:
/home/alarm/.cache/node-gyp/12.11.1/include/node/v8.h:3403:22: note: declared here
bool Set(Local<Value> key, Local<Value> value));
^~~
/home/alarm/.cache/node-gyp/12.11.1/include/node/v8config.h:311:3: note: in definition of macro 'V8_DEPRECATED'
declarator __attribute__((deprecated(message)))
^~~~~~~~~~
../src/serialport.cpp:330:96: warning: 'bool v8::Object::Set(v8::Local<v8::Value>, v8::Local<v8::Value>)' is deprecated: Use maybe version [-Wdeprecated-declarations]
results->Set(Nan::New<v8::String>("dsr").ToLocalChecked(), Nan::New<v8::Boolean>(data->dsr));
^
In file included from /home/alarm/.cache/node-gyp/12.11.1/include/node/v8-internal.h:14,
from /home/alarm/.cache/node-gyp/12.11.1/include/node/v8.h:25,
from /home/alarm/.cache/node-gyp/12.11.1/include/node/node.h:63,
from ../../../nan/nan.h:54,
from ../src/./serialport.h:6,
from ../src/serialport.cpp:1:
/home/alarm/.cache/node-gyp/12.11.1/include/node/v8.h:3403:22: note: declared here
bool Set(Local<Value> key, Local<Value> value));
^~~
/home/alarm/.cache/node-gyp/12.11.1/include/node/v8config.h:311:3: note: in definition of macro 'V8_DEPRECATED'
declarator __attribute__((deprecated(message)))
^~~~~~~~~~
../src/serialport.cpp:331:96: warning: 'bool v8::Object::Set(v8::Local<v8::Value>, v8::Local<v8::Value>)' is deprecated: Use maybe version [-Wdeprecated-declarations]
results->Set(Nan::New<v8::String>("dcd").ToLocalChecked(), Nan::New<v8::Boolean>(data->dcd));
^
In file included from /home/alarm/.cache/node-gyp/12.11.1/include/node/v8-internal.h:14,
from /home/alarm/.cache/node-gyp/12.11.1/include/node/v8.h:25,
from /home/alarm/.cache/node-gyp/12.11.1/include/node/node.h:63,
from ../../../nan/nan.h:54,
from ../src/./serialport.h:6,
from ../src/serialport.cpp:1:
/home/alarm/.cache/node-gyp/12.11.1/include/node/v8.h:3403:22: note: declared here
bool Set(Local<Value> key, Local<Value> value));
^~~
/home/alarm/.cache/node-gyp/12.11.1/include/node/v8config.h:311:3: note: in definition of macro 'V8_DEPRECATED'
declarator __attribute__((deprecated(message)))
^~~~~~~~~~
../src/serialport.cpp: In function 'Nan::NAN_METHOD_RETURN_TYPE GetBaudRate(Nan::NAN_METHOD_ARGS_TYPE)':
../src/serialport.cpp:363:76: warning: cast between incompatible function types from 'void (*)(uv_work_t*)' {aka 'void (*)(uv_work_s*)'} to 'uv_after_work_cb' {aka 'void (*)(uv_work_s*, int)'} [-Wcast-function-type]
uv_queue_work(uv_default_loop(), req, EIO_GetBaudRate, (uv_after_work_cb)EIO_AfterGetBaudRate);
^~~~~~~~~~~~~~~~~~~~
../src/serialport.cpp: In function 'void EIO_AfterGetBaudRate(uv_work_t*)':
../src/serialport.cpp:378:106: warning: 'bool v8::Object::Set(v8::Local<v8::Value>, v8::Local<v8::Value>)' is deprecated: Use maybe version [-Wdeprecated-declarations]
results->Set(Nan::New<v8::String>("baudRate").ToLocalChecked(), Nan::New<v8::Integer>(data->baudRate));
^
In file included from /home/alarm/.cache/node-gyp/12.11.1/include/node/v8-internal.h:14,
from /home/alarm/.cache/node-gyp/12.11.1/include/node/v8.h:25,
from /home/alarm/.cache/node-gyp/12.11.1/include/node/node.h:63,
from ../../../nan/nan.h:54,
from ../src/./serialport.h:6,
from ../src/serialport.cpp:1:
/home/alarm/.cache/node-gyp/12.11.1/include/node/v8.h:3403:22: note: declared here
bool Set(Local<Value> key, Local<Value> value));
^~~
/home/alarm/.cache/node-gyp/12.11.1/include/node/v8config.h:311:3: note: in definition of macro 'V8_DEPRECATED'
declarator __attribute__((deprecated(message)))
^~~~~~~~~~
../src/serialport.cpp: In function 'Nan::NAN_METHOD_RETURN_TYPE Drain(Nan::NAN_METHOD_ARGS_TYPE)':
../src/serialport.cpp:409:70: warning: cast between incompatible function types from 'void (*)(uv_work_t*)' {aka 'void (*)(uv_work_s*)'} to 'uv_after_work_cb' {aka 'void (*)(uv_work_s*, int)'} [-Wcast-function-type]
uv_queue_work(uv_default_loop(), req, EIO_Drain, (uv_after_work_cb)EIO_AfterDrain);
^~~~~~~~~~~~~~
../src/serialport.cpp: At global scope:
../src/serialport.cpp:430:28: warning: unnecessary parentheses in declaration of 'ToParityEnum' [-Wparentheses]
SerialPortParity NAN_INLINE(ToParityEnum(const v8::Local<v8::String>& v8str)) {
^
../src/serialport.cpp:449:30: warning: unnecessary parentheses in declaration of 'ToStopBitEnum' [-Wparentheses]
SerialPortStopBits NAN_INLINE(ToStopBitEnum(double stopBits)) {
^
In file included from ../../../nan/nan.h:54,
from ../src/./serialport.h:6,
from ../src/serialport.cpp:1:
/home/alarm/.cache/node-gyp/12.11.1/include/node/node.h:560:43: warning: cast between incompatible function types from 'void (*)(Nan::ADDON_REGISTER_FUNCTION_ARGS_TYPE)' {aka 'void (*)(v8::Local<v8::Object>)'} to 'node::addon_register_func' {aka 'void (*)(v8::Local<v8::Object>, v8::Local<v8::Value>, void*)'} [-Wcast-function-type]
(node::addon_register_func) (regfunc), \
^
/home/alarm/.cache/node-gyp/12.11.1/include/node/node.h:594:3: note: in expansion of macro 'NODE_MODULE_X'
NODE_MODULE_X(modname, regfunc, NULL, 0) // NOLINT (readability/null_usage)
^~~~~~~~~~~~~
../src/serialport.cpp:483:1: note: in expansion of macro 'NODE_MODULE'
NODE_MODULE(serialport, init);
^~~~~~~~~~~
In file included from /home/alarm/.cache/node-gyp/12.11.1/include/node/node.h:63,
from ../../../nan/nan.h:54,
from ../src/./serialport.h:6,
from ../src/serialport.cpp:1:
/home/alarm/.cache/node-gyp/12.11.1/include/node/v8.h: In instantiation of 'void v8::PersistentBase<T>::SetWeak(P*, typename v8::WeakCallbackInfo<P>::Callback, v8::WeakCallbackType) [with P = node::ObjectWrap; T = v8::Object; typename v8::WeakCallbackInfo<P>::Callback = void (*)(const v8::WeakCallbackInfo<node::ObjectWrap>&)]':
/home/alarm/.cache/node-gyp/12.11.1/include/node/node_object_wrap.h:84:78: required from here
/home/alarm/.cache/node-gyp/12.11.1/include/node/v8.h:10004:16: warning: cast between incompatible function types from 'v8::WeakCallbackInfo<node::ObjectWrap>::Callback' {aka 'void (*)(const v8::WeakCallbackInfo<node::ObjectWrap>&)'} to 'Callback' {aka 'void (*)(const v8::WeakCallbackInfo<void>&)'} [-Wcast-function-type]
reinterpret_cast<Callback>(callback), type);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/alarm/.cache/node-gyp/12.11.1/include/node/v8.h: In instantiation of 'void v8::PersistentBase<T>::SetWeak(P*, typename v8::WeakCallbackInfo<P>::Callback, v8::WeakCallbackType) [with P = Nan::ObjectWrap; T = v8::Object; typename v8::WeakCallbackInfo<P>::Callback = void (*)(const v8::WeakCallbackInfo<Nan::ObjectWrap>&)]':
../../../nan/nan_object_wrap.h:65:61: required from here
/home/alarm/.cache/node-gyp/12.11.1/include/node/v8.h:10004:16: warning: cast between incompatible function types from 'v8::WeakCallbackInfo<Nan::ObjectWrap>::Callback' {aka 'void (*)(const v8::WeakCallbackInfo<Nan::ObjectWrap>&)'} to 'Callback' {aka 'void (*)(const v8::WeakCallbackInfo<void>&)'} [-Wcast-function-type]
CXX(target) Release/obj.target/bindings/src/serialport_unix.o
In file included from ../src/serialport.h:6,
from ../src/serialport_unix.cpp:2:
../../../nan/nan.h: In function 'void Nan::AsyncQueueWorker(Nan::AsyncWorker*)':
../../../nan/nan.h:2298:62: warning: cast between incompatible function types from 'void (*)(uv_work_t*)' {aka 'void (*)(uv_work_s*)'} to 'uv_after_work_cb' {aka 'void (*)(uv_work_s*, int)'} [-Wcast-function-type]
, reinterpret_cast<uv_after_work_cb>(AsyncExecuteComplete)
^
In file included from /home/alarm/.cache/node-gyp/12.11.1/include/node/node.h:63,
from ../../../nan/nan.h:54,
from ../src/serialport.h:6,
from ../src/serialport_unix.cpp:2:
/home/alarm/.cache/node-gyp/12.11.1/include/node/v8.h: In instantiation of 'void v8::PersistentBase<T>::SetWeak(P*, typename v8::WeakCallbackInfo<P>::Callback, v8::WeakCallbackType) [with P = node::ObjectWrap; T = v8::Object; typename v8::WeakCallbackInfo<P>::Callback = void (*)(const v8::WeakCallbackInfo<node::ObjectWrap>&)]':
/home/alarm/.cache/node-gyp/12.11.1/include/node/node_object_wrap.h:84:78: required from here
/home/alarm/.cache/node-gyp/12.11.1/include/node/v8.h:10004:16: warning: cast between incompatible function types from 'v8::WeakCallbackInfo<node::ObjectWrap>::Callback' {aka 'void (*)(const v8::WeakCallbackInfo<node::ObjectWrap>&)'} to 'Callback' {aka 'void (*)(const v8::WeakCallbackInfo<void>&)'} [-Wcast-function-type]
reinterpret_cast<Callback>(callback), type);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/alarm/.cache/node-gyp/12.11.1/include/node/v8.h: In instantiation of 'void v8::PersistentBase<T>::SetWeak(P*, typename v8::WeakCallbackInfo<P>::Callback, v8::WeakCallbackType) [with P = Nan::ObjectWrap; T = v8::Object; typename v8::WeakCallbackInfo<P>::Callback = void (*)(const v8::WeakCallbackInfo<Nan::ObjectWrap>&)]':
../../../nan/nan_object_wrap.h:65:61: required from here
/home/alarm/.cache/node-gyp/12.11.1/include/node/v8.h:10004:16: warning: cast between incompatible function types from 'v8::WeakCallbackInfo<Nan::ObjectWrap>::Callback' {aka 'void (*)(const v8::WeakCallbackInfo<Nan::ObjectWrap>&)'} to 'Callback' {aka 'void (*)(const v8::WeakCallbackInfo<void>&)'} [-Wcast-function-type]
../src/serialport_unix.cpp: In function 'int setup(int, OpenBaton*)':
../src/serialport_unix.cpp:176:60: warning: '%s' directive output may be truncated writing up to 1023 bytes into a region of size 1005 [-Wformat-truncation=]
snprintf(data->errorString, sizeof(data->errorString), "Error %s Cannot open %s", strerror(errno), data->path);
^~~~~~~~~~~~~~~~~~~~~~~~~
../src/serialport_unix.cpp:176:13: note: 'snprintf' output 20 or more bytes (assuming 1043) into a destination of size 1024
snprintf(data->errorString, sizeof(data->errorString), "Error %s Cannot open %s", strerror(errno), data->path);
~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/serialport_unix.cpp: In function 'void EIO_Open(uv_work_t*)':
../src/serialport_unix.cpp:86:60: warning: '%s' directive output may be truncated writing up to 1023 bytes into a region of size 1003 [-Wformat-truncation=]
snprintf(data->errorString, sizeof(data->errorString), "Error: %s, cannot open %s", strerror(errno), data->path);
^~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/serialport_unix.cpp:86:13: note: 'snprintf' output 22 or more bytes (assuming 1045) into a destination of size 1024
snprintf(data->errorString, sizeof(data->errorString), "Error: %s, cannot open %s", strerror(errno), data->path);
~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CXX(target) Release/obj.target/bindings/src/poller.o
In file included from ../src/poller.cpp:1:
../../../nan/nan.h: In function 'void Nan::AsyncQueueWorker(Nan::AsyncWorker*)':
../../../nan/nan.h:2298:62: warning: cast between incompatible function types from 'void (*)(uv_work_t*)' {aka 'void (*)(uv_work_s*)'} to 'uv_after_work_cb' {aka 'void (*)(uv_work_s*, int)'} [-Wcast-function-type]
, reinterpret_cast<uv_after_work_cb>(AsyncExecuteComplete)
^
In file included from /home/alarm/.cache/node-gyp/12.11.1/include/node/node.h:63,
from ../../../nan/nan.h:54,
from ../src/poller.cpp:1:
/home/alarm/.cache/node-gyp/12.11.1/include/node/v8.h: In instantiation of 'void v8::PersistentBase<T>::SetWeak(P*, typename v8::WeakCallbackInfo<P>::Callback, v8::WeakCallbackType) [with P = node::ObjectWrap; T = v8::Object; typename v8::WeakCallbackInfo<P>::Callback = void (*)(const v8::WeakCallbackInfo<node::ObjectWrap>&)]':
/home/alarm/.cache/node-gyp/12.11.1/include/node/node_object_wrap.h:84:78: required from here
/home/alarm/.cache/node-gyp/12.11.1/include/node/v8.h:10004:16: warning: cast between incompatible function types from 'v8::WeakCallbackInfo<node::ObjectWrap>::Callback' {aka 'void (*)(const v8::WeakCallbackInfo<node::ObjectWrap>&)'} to 'Callback' {aka 'void (*)(const v8::WeakCallbackInfo<void>&)'} [-Wcast-function-type]
reinterpret_cast<Callback>(callback), type);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/alarm/.cache/node-gyp/12.11.1/include/node/v8.h: In instantiation of 'void v8::PersistentBase<T>::SetWeak(P*, typename v8::WeakCallbackInfo<P>::Callback, v8::WeakCallbackType) [with P = Nan::ObjectWrap; T = v8::Object; typename v8::WeakCallbackInfo<P>::Callback = void (*)(const v8::WeakCallbackInfo<Nan::ObjectWrap>&)]':
../../../nan/nan_object_wrap.h:65:61: required from here
/home/alarm/.cache/node-gyp/12.11.1/include/node/v8.h:10004:16: warning: cast between incompatible function types from 'v8::WeakCallbackInfo<Nan::ObjectWrap>::Callback' {aka 'void (*)(const v8::WeakCallbackInfo<Nan::ObjectWrap>&)'} to 'Callback' {aka 'void (*)(const v8::WeakCallbackInfo<void>&)'} [-Wcast-function-type]
CXX(target) Release/obj.target/bindings/src/serialport_linux.o
SOLINK_MODULE(target) Release/obj.target/bindings.node
COPY Release/bindings.node
make: Leaving directory '/home/alarm/.npm-packages/lib/node_modules/raspi-io/node_modules/@serialport/bindings/build'
> raspi-i2c@6.2.3 postinstall /home/alarm/.npm-packages/lib/node_modules/raspi-io/node_modules/raspi-i2c
> echo "Enabling I2C at boot time, you may be asked for your password" && sudo env "PATH=$PATH" script/enable_i2c.js
Enabling I2C at boot time, you may be asked for your password
[sudo] password for alarm:
Checking if I2C is enabled at boot time
I2C is already enabled at boot time
+ raspi-io@10.0.4
added 89 packages from 70 contributors in 131.405s
Yay, I'm glad it worked! On an unrelated note, hopefully someday node-serialport will fix those build warnings.
When trying to install
raspi-io
I get an error regardingraspi-peripheral
wanting arm instead of arm64.I've read about people managing to use raspi-io on a RPi4 which AFAIK is 64 bit too, how can I install it without having this issue?