Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fails to install on Rasperry Pi 2 B #26

Closed
pow4all opened this issue Nov 1, 2022 · 2 comments
Closed

Fails to install on Rasperry Pi 2 B #26

pow4all opened this issue Nov 1, 2022 · 2 comments
Labels

Comments

@pow4all
Copy link

pow4all commented Nov 1, 2022

Hi!
I try to install a node-red package (see here). The install fails when installing spi-device with following error messages:

pi@xxx:~ $ npm install spi-device

> spi-device@3.1.2 install /home/pi/node_modules/spi-device
> node-gyp rebuild

make: Verzeichnis „/home/pi/node_modules/spi-device/build“ wird betreten
  CXX(target) Release/obj.target/spi/src/spi.o
cc1plus: error: unrecognized argument in option ‘-mfloat-abi=hard’
cc1plus: note: valid arguments to ‘-mfloat-abi=’ are:   softfp
cc1plus: error: unrecognized argument in option ‘-mfpu=vfp’
cc1plus: note: valid arguments to ‘-mfpu=’ are: auto crypto-neon-fp-armv8 fp-armv8 fpv4-sp-d16 fpv5-d16 fpv5-sp-d16  neon-fp-armv8 neon-fp16        neon-vfpv3 neon-vfpv4  vfp3 vfpv2 vfpv3 vfpv3-d16 vfpv3-d16-fp16 vfpv3-fp16 vfpv3xd vfpv3xd-fp16 vfpv4 vfpv4-d16; did you mean ‘vfp3’?
make: *** [spi.target.mk:119: Release/obj.target/spi/src/spi.o] Fehler 1
make: Verzeichnis „/home/pi/node_modules/spi-device/build“ wird verlassen
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:400:28)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:285:12)
gyp ERR! System Linux 5.10.103-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/node_modules/spi-device
gyp ERR! node -v v14.20.1
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
npm WARN enoent ENOENT: no such file or directory, open '/home/pi/package.json'
npm WARN pi No description
npm WARN pi No repository field.
npm WARN pi No README data
npm WARN pi No license field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! spi-device@3.1.2 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the spi-device@3.1.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/2022-11-01T06_06_06_482Z-debug.log

My harware is a Raspberry Pi 2 Model B Rev 1.1 with ARMv7 Processor rev 5 (v7l) with Rasbian 10 (buster).

Node version is v14.20.1

Is there any chance to fix this somehow?
Thanks!

@fivdi
Copy link
Owner

fivdi commented Nov 8, 2022

I can install spi-device without problems using Node.js v14.20.1 and node-gyp v5.1.0 on a Raspberry Pi 2 Model B Rev 1.1 with ARMv7 Processor rev 5 (v7l) with Rasbian 10 (buster).

Here is the output of npm install spi-device:

pi@raspberrypi:~/test $ npm install spi-device

> spi-device@3.1.2 install /home/pi/test/node_modules/spi-device
> node-gyp rebuild

make: Entering directory '/home/pi/test/node_modules/spi-device/build'
  CXX(target) Release/obj.target/spi/src/spi.o
  CXX(target) Release/obj.target/spi/src/spidevice.o
  CXX(target) Release/obj.target/spi/src/open.o
  CXX(target) Release/obj.target/spi/src/close.o
  CXX(target) Release/obj.target/spi/src/transfer.o
  CXX(target) Release/obj.target/spi/src/getoptions.o
  CXX(target) Release/obj.target/spi/src/setoptions.o
  SOLINK_MODULE(target) Release/obj.target/spi.node
  COPY Release/spi.node
make: Leaving directory '/home/pi/test/node_modules/spi-device/build'
npm WARN saveError ENOENT: no such file or directory, open '/home/pi/test/package.json'
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN enoent ENOENT: no such file or directory, open '/home/pi/test/package.json'
npm WARN test No description
npm WARN test No repository field.
npm WARN test No README data
npm WARN test No license field.

+ spi-device@3.1.2
added 4 packages from 9 contributors and audited 4 packages in 65.321s
found 0 vulnerabilities

pi@raspberrypi:~/test $ 

And here is the output of a few command showing the system setup:

pi@raspberrypi:~/test $ node --version
v14.20.1

pi@raspberrypi:~/test $ ~/opt/node-v14.20.1-linux-armv7l/lib/node_modules/npm/bin/node-gyp-bin/node-gyp --version
v5.1.0

pi@raspberrypi:~/test $ uname -a
Linux raspberrypi 5.10.17-v7+ #1403 SMP Mon Feb 22 11:29:51 GMT 2021 armv7l GNU/Linux

pi@raspberrypi:~/test $ cat /etc/os-release 
PRETTY_NAME="Raspbian GNU/Linux 10 (buster)"
NAME="Raspbian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"

pi@raspberrypi:~/test $ cat /sys/firmware/devicetree/base/model
Raspberry Pi 2 Model B Rev 1.1

pi@raspberrypi:~/test $ cat /proc/cpuinfo 
processor	: 0
model name	: ARMv7 Processor rev 5 (v7l)
BogoMIPS	: 38.40
Features	: half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm 
CPU implementer	: 0x41
CPU architecture: 7
CPU variant	: 0x0
CPU part	: 0xc07
CPU revision	: 5

processor	: 1
model name	: ARMv7 Processor rev 5 (v7l)
BogoMIPS	: 38.40
Features	: half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm 
CPU implementer	: 0x41
CPU architecture: 7
CPU variant	: 0x0
CPU part	: 0xc07
CPU revision	: 5

processor	: 2
model name	: ARMv7 Processor rev 5 (v7l)
BogoMIPS	: 38.40
Features	: half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm 
CPU implementer	: 0x41
CPU architecture: 7
CPU variant	: 0x0
CPU part	: 0xc07
CPU revision	: 5

processor	: 3
model name	: ARMv7 Processor rev 5 (v7l)
BogoMIPS	: 38.40
Features	: half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm 
CPU implementer	: 0x41
CPU architecture: 7
CPU variant	: 0x0
CPU part	: 0xc07
CPU revision	: 5

Hardware	: BCM2835
Revision	: a01041
Serial		: [Removed]
Model		: Raspberry Pi 2 Model B Rev 1.1
pi@raspberrypi:~/test $ 

Note that the Node.js v14.20.1 binaries that I used are from node-v14.20.1-linux-armv7l.tar.gz which can be found at https://nodejs.org/dist/v14.20.1/

I would imagine that the problems that you are having are related to your system setup.

@fivdi fivdi added the question label Nov 8, 2022
@fivdi
Copy link
Owner

fivdi commented Nov 11, 2022

@pow4all I upgraded to kernel 5.10.103-v7+ which is the kernel you're using and npm install spi-device still works:

pi@raspberrypi:~/test $ uname -a
Linux raspberrypi 5.10.103-v7+ #1529 SMP Tue Mar 8 12:21:37 GMT 2022 armv7l GNU/Linux
pi@raspberrypi:~/test $ node --version
v14.20.1
pi@raspberrypi:~/test $ npm install spi-device

> spi-device@3.1.2 install /home/pi/test/node_modules/spi-device
> node-gyp rebuild

make: Entering directory '/home/pi/test/node_modules/spi-device/build'
  CXX(target) Release/obj.target/spi/src/spi.o
  CXX(target) Release/obj.target/spi/src/spidevice.o
  CXX(target) Release/obj.target/spi/src/open.o
  CXX(target) Release/obj.target/spi/src/close.o
  CXX(target) Release/obj.target/spi/src/transfer.o
  CXX(target) Release/obj.target/spi/src/getoptions.o
  CXX(target) Release/obj.target/spi/src/setoptions.o
  SOLINK_MODULE(target) Release/obj.target/spi.node
  COPY Release/spi.node
make: Leaving directory '/home/pi/test/node_modules/spi-device/build'
npm WARN saveError ENOENT: no such file or directory, open '/home/pi/test/package.json'
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN enoent ENOENT: no such file or directory, open '/home/pi/test/package.json'
npm WARN test No description
npm WARN test No repository field.
npm WARN test No README data
npm WARN test No license field.

+ spi-device@3.1.2
added 4 packages from 9 contributors and audited 4 packages in 73.624s
found 0 vulnerabilities

pi@raspberrypi:~/test $ 

I'll go ahead and close this issue as it doesn't appear to be related to spi-device. As already mentioned above, I would imagine that the problems that you are having are related to your system setup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants