-
-
Notifications
You must be signed in to change notification settings - Fork 51
Description
SerialPort Bindings Version
10.7.0
Node Version
16.15.0
Electron Version
19.0.12
Platform
Linux raspberrypi 5.15.61-v7l+ #1579 SMP Fri Aug 26 11:13:03 BST 2022 armv7l GNU/Linux
Architecture
ARM
Hardware or chipset of serialport
Etc
What steps will reproduce the bug?
Run a VSCode extension with serialport on a raspberry pi with the 32-bit Raspberry Pi OS.
What happens?
At runtime node-gyp-build gets "default" as the value for "armv". But actually the armv on a 32-bit Raspberry Pi 4b is 7. So the result is that it compares 6 and 7 (the two prebuild arm version) agains "default" which will of course fail! The reason for that is following line https://github.com/prebuild/node-gyp-build/blob/0078d7884dfeb0e708477b3e20bfc4f520c1e2f8/index.js#L16
var vars = (process.config && process.config.variables) || {}
.
.
.
var armv = process.env.ARM_VERSION || (arch === 'arm64' ? '8' : vars.arm_version) || ''What should have happened?
That the arm version is correctly detected so it can detect which prebuild is the right.
Additional information
You either have to set process.env.ARM_VERSION or ensure that process.config.variables.arm_version get overwritten to "default".