I’ve started from https://github.com/resin-io-projects/resin-node-red to deploy a node-red via resin. Works great!
So I started adding some node-red plugins that I use and that’s working fine too! (kudos for that)
Then comes “node-dht-contrib-rcswitch2” https://flows.nodered.org/node/node-red-contrib-rcswitch2 which depends on the rcswitch-pi library https://github.com/r10r/rcswitch-pi . I see that there’s an alpine pkg for wiringpi. So I try to introduce the following :
RUN apk add --no-cache make gcc g++ python wiringpi && \
JOBS=MAX npm install -g node-red-contrib-rcswitch2 --production --silent && \
apk del make gcc g++ python wiringpi && \
npm cache clean --force && rm -rf /tmp/*
This fails in the following way :
[main] make: Entering directory '/usr/local/lib/node_modules/node-red-contrib-rcswitch2/node_modules/rcswitch/build'
[main] CXX(target) Release/obj.target/rcswitch/src/rcswitch.o
[main] CXX(target) Release/obj.target/rcswitch/src/RCSwitchNode.o
[main] CXX(target) Release/obj.target/rcswitch/externals/rcswitch-pi/RCSwitch.o
[main] In file included from ../externals/rcswitch-pi/RCSwitch.cpp:27:0:
[main] ../externals/rcswitch-pi/RCSwitch.h:32:26: fatal error: wiringPi.h: No such file or directory
[main] #include <wiringPi.h>
[main] ^
[main] compilation terminated.
[main]
[main] make: *** [rcswitch.target.mk:96: Release/obj.target/rcswitch/externals/rcswitch-pi/RCSwitch.o] Error 1
[main] make: *** Waiting for unfinished jobs....
[main]
[main] In file included from ../src/RCSwitchNode.h:6:0,
[main] from ../src/rcswitch.cpp:2:
[main] ../src/../externals/rcswitch-pi/RCSwitch.h:32:26: fatal error: wiringPi.h: No such file or directory
[main] #include <wiringPi.h>
[main] ^
[main] compilation terminated.
[main]
[main] In file included from ../src/RCSwitchNode.h:6:0,
[main] from ../src/RCSwitchNode.cpp:1:
[main] ../src/../externals/rcswitch-pi/RCSwitch.h:32:26: fatal error: wiringPi.h: No such file or directory
[main] #include <wiringPi.h>
[main] ^
[main] compilation terminated.
[main]
[main] make: *** [rcswitch.target.mk:96: Release/obj.target/rcswitch/src/rcswitch.o] Error 1
[main]
[main] make: *** [rcswitch.target.mk:96: Release/obj.target/rcswitch/src/RCSwitchNode.o] Error 1
[main]
[main] make: Leaving directory '/usr/local/lib/node_modules/node-red-contrib-rcswitch2/node_modules/rcswitch/build'
There doesn’t seem to be a wiringpi-dev in alpine. I’m not familiar with alpine, Is there some way of installing the development headers like one would do with a -dev package in debian ?