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

Serialport 6.1.0 won't install or build on Rpi3 #1495

Closed
rjbaat opened this issue Feb 20, 2018 · 9 comments
Closed

Serialport 6.1.0 won't install or build on Rpi3 #1495

rjbaat opened this issue Feb 20, 2018 · 9 comments
Labels

Comments

@rjbaat
Copy link

rjbaat commented Feb 20, 2018

  • SerialPort Version: 6.1.0
  • Operating System and Hardware Platform: Resin.io Rpi3

Summary of Problem

When i install node-red-contrib-modbus and or node-red-node-serialport. I get the error that dependency serialport 6.1.0 has no prebuild version. But it also won't build.

[34m[Build]   [39m make: Leaving directory '/usr/local/lib/node_modules/node-red-contrib-modbus/node_modules/node-modbus/node_modules/serialport/build'
[34m[Build]   [39m [91mprebuild-install[0m[91m [0m[91minfo[0m[91m begin Prebuild-install version 2.5.1
[34m[Build]   [39m [0m[91mprebuild-install info[0m[91m looking for local prebuild @[0m[91m prebuilds/serialport-v6.1.0-node-v59-linuxmusl-arm.tar.gz
[34m[Build]   [39m [0m[91mprebuild-install info[0m[91m looking for cached prebuild @[0m[91m /root/.npm/_prebuilds/https-github.com-node-serialport-node-serialport-releases-download-v6.1.0-serialport-v6.1.0-node-v59-linuxmusl-arm.tar.gz
[34m[Build]   [39m [0m[91mprebuild-install http [0m[91mrequest[0m[91m GET https://github.com/node-serialport/node-serialport/releases/download/v6.1.0/serialport-v6.1.0-node-v59-linuxmusl-arm.tar.gz
[34m[Build]   [39m [0m[91mprebuild-install http [0m[91m404 https://github.com/node-serialport/node-serialport/releases/download/v6.1.0/serialport-v6.1.0-node-v59-linuxmusl-arm.tar.gz
[34m[Build]   [39m [0m[91mprebuild-install WARN [0m[91minstall[0m[91m No prebuilt binaries found (target=9.4.0 runtime=node arch=arm platform=linux)
[34m[Build]   [39m [0mmake: Entering directory '/usr/local/lib/node_modules/node-red-contrib-modbus/node_modules/serialport/build'
[34m[Build]   [39m   CXX(target) Release/obj.target/serialport/src/serialport.o
[34m[Build]   [39m   CXX(target) Release/obj.target/serialport/src/serialport_unix.o
[34m[Build]   [39m   CXX(target) Release/obj.target/serialport/src/poller.o
[34m[Build]   [39m   CXX(target) Release/obj.target/serialport/src/serialport_linux.o
[34m[Build]   [39m [91m../src/serialport_linux.cpp: In function 'int linuxSetCustomBaudRate(int, unsigned int)':
[34m[Build]   [39m ../src/serialport_linux.cpp:10:18: error: 'TCGETS2' was not declared in this scope
[34m[Build]   [39m      if(ioctl(fd, TCGETS2, &t)) {
[34m[Build]   [39m                   ^~~~~~~
[34m[Build]   [39m [0m[91m../src/serialport_linux.cpp:18:18: error: 'TCSETS2' was not declared in this scope
[34m[Build]   [39m      if(ioctl(fd, TCSETS2, &t)) {
[34m[Build]   [39m                   ^~~~~~~
[34m[Build]   [39m [0m[91m../src/serialport_linux.cpp: In function 'int linuxGetSystemBaudRate(int, int*)':
[34m[Build]   [39m ../src/serialport_linux.cpp:29:16: error: 'TCGETS2' was not declared in this scope
[34m[Build]   [39m    if(ioctl(fd, TCGETS2, &t)) {
[34m[Build]   [39m                 ^~~~~~~
[34m[Build]   [39m [0m[91mmake: *** [serialport.target.mk:96: Release/obj.target/serialport/src/serialport_linux.o] Error 1
[34m[Build]   [39m make: *** Waiting for unfinished jobs....
[34m[Build]   [39m [0mmake: Leaving directory '/usr/local/lib/node_modules/node-red-contrib-modbus/node_modules/serialport/build'

When i manually install npm serialport 6.0.5. it will build and install on the Rpi3 on Resin.io. But due to the dependency in the 2 nodes mentioned before it will try to install 6.1.0 also after 6.0.5 is installed.

[34m[Build]   [39m /usr/local/bin/serialport-list -> /usr/local/lib/node_modules/serialport/bin/list.js
[34m[Build]   [39m /usr/local/bin/serialport-repl -> /usr/local/lib/node_modules/serialport/bin/repl.js
[34m[Build]   [39m /usr/local/bin/serialport-term -> /usr/local/lib/node_modules/serialport/bin/terminal.js
[34m[Build]   [39m [91mprebuild-install[0m[91m [0m[91minfo [0m[91mbegin[0m[91m Prebuild-install version 2.5.1
[34m[Build]   [39m [0m[91mprebuild-install info [0m[91mlooking for local prebuild @ prebuilds/serialport-v6.0.5-node-v59-linuxmusl-arm.tar.gz
[34m[Build]   [39m [0m[91mprebuild-install info [0m[91mlooking for cached prebuild @ /root/.npm/_prebuilds/https-github.com-node-serialport-node-serialport-releases-download-v6.0.5-serialport-v6.0.5-node-v59-linuxmusl-arm.tar.gz
[34m[Build]   [39m [0m[91mprebuild-install http [0m[91mrequest[0m[91m GET https://github.com/node-serialport/node-serialport/releases/download/v6.0.5/serialport-v6.0.5-node-v59-linuxmusl-arm.tar.gz
[34m[Build]   [39m [0m[91mprebuild-install http [0m[91m404 https://github.com/node-serialport/node-serialport/releases/download/v6.0.5/serialport-v6.0.5-node-v59-linuxmusl-arm.tar.gz
[34m[Build]   [39m [0m[91mprebuild-install WARN install[0m[91m No prebuilt binaries found (target=9.4.0 runtime=node arch=arm platform=linux)
[34m[Build]   [39m [0mmake: Entering directory '/usr/local/lib/node_modules/serialport/build'
[34m[Build]   [39m   CXX(target) Release/obj.target/serialport/src/serialport.o
[34m[Build]   [39m   CXX(target) Release/obj.target/serialport/src/serialport_unix.o
[34m[Build]   [39m   CXX(target) Release/obj.target/serialport/src/poller.o
[34m[Build]   [39m   SOLINK_MODULE(target) Release/obj.target/serialport.node
[34m[Build]   [39m   COPY Release/serialport.node
[34m[Build]   [39m make: Leaving directory '/usr/local/lib/node_modules/serialport/build'
[34m[Build]   [39m + [email protected]
[34m[Build]   [39m added 180 packages in 13.65s

Steps and Code to Reproduce the Issue

Install node-red-node-serialport and/or node-red-contrib-modbus on Rpi3 with Resin.io docker file:

# base-image for node on any machine using a template variable,
# see more about dockerfile templates here:http://docs.resin.io/pages/deployment/docker-templates
# Note the node:slim image doesn't have node-gyp
FROM resin/%%RESIN_MACHINE_NAME%%-alpine-node:9-slim

### Defines our working directory in container
RUN mkdir -p /usr/src/app/
WORKDIR /usr/src/app

### This will copy all files in our root to the working  directory in the container
COPY ./app ./

### Install node modules, including i2c-bus without carrying all the deps in the layers
RUN apk add --no-cache make gcc g++ python && \
  JOBS=MAX npm install -g node-red node-red-contrib-resinio --production --silent && \
  JOBS=MAX npm install -g node-red-contrib-modbus --production --silent && \
  JOBS=MAX npm install -g node-red-node-serialport --production --silent && \
  apk del make gcc g++ python && \
  npm cache clean --force && rm -rf /tmp/*

### server.js will run when container starts up on the device
CMD ["bash", "/usr/src/app/start.sh"]

@chrismoorhouse
Copy link

I am seeing similar issues with node-red-contrib-modbus. I am using alpine slim with node v8.9.4

@chrismoorhouse
Copy link

chrismoorhouse commented Feb 20, 2018

This is a copy of #1487 which has been fixed but not yet made a release
This issue can be closed

@rjbaat
Copy link
Author

rjbaat commented Feb 21, 2018

Oke thnx.
Is there an estimation when the fix will be released?

@piechade
Copy link

Why you are using the pre-release version?

@chrismoorhouse
Copy link

@piechade it is included in a Node-RED library by someone else. We did not choose the version

@reconbot
Copy link
Member

Serialport 6.1.1 is out which should fix this. I see node-red has 6.0.5 as it's version, I have no idea why 6.1.0 would have installed.

@reconbot
Copy link
Member

Do let me know if this works for you.

@rjbaat
Copy link
Author

rjbaat commented Feb 28, 2018

The developer of the Node Red module had 6.1.0 included. I asked him to downgrade to the stable version of 6.0.5 and that works. So i hope the node red module is staying on stable release from now on and then it should work fine.

@reconbot
Copy link
Member

reconbot commented Feb 28, 2018 via email

@lock lock bot locked as resolved and limited conversation to collaborators Jan 30, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Development

No branches or pull requests

4 participants