WiringPi / WiringPi-Node

Node.js bindings to wiringPi
333 stars 94 forks source link

Got an error installing wiring-pi on alpine linux #78

Open deminngi opened 7 years ago

deminngi commented 7 years ago

I tried to use "npm install wiring-pi" got the following error as stated below: wiringPiSPI.c: In function 'wiringPiSPIDataRW': wiringPiSPI.c:89:35: error: '_IOC_SIZEBITS' undeclared (first use in this function) See http://lists.busybox.net/pipermail/buildroot/2016-June/163435.html

CHANGED wiringPiSPI.c
ADDING #include <asm/ioctl.h> 
BEFORE #include <sys/ioctl.h>

Keep in mind there is a wiringpi package under alpine linux installing gpio under /usr/bin! Yours goes into /usr/local/bin and according to PATH is called BEFORE the alpine linux installed one. https://pkgs.alpinelinux.org/package/edge/community/armhf/wiringpi

Please look also at node-gyp rebuild it produces a lot of deprecation messages! Saying ForceSet must be replaced ...

Here my stack:

alpine-linux: 3.6
channel: edge
node 6.10.3
npm 3.10.10