Skip to content

ARM version not detected for 32-bit arm versions #89

@paulober

Description

@paulober

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".

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions