-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
State of nodejs 4.0 support - ie NOT supported until this closed #578
Comments
Node.js@ARM with OpenEmbedded (Yocto, Ångstrom) is ready for this. I'm maintaining Node.js layer for OE at https://github.com/imyller/meta-nodejs |
@imyller can you comment on what was needed and thus what might be deficient on beaglebone and pi? |
Well, I do not know the exact status of Rasbian or other pre-built distributions, but with OE everything in the distribution for the target device is compiled from source; including build system toolchains. OE is a build system - not a binary distribution. The latest Yocto 1.8 includes gcc 4.9 and Node.js can be cross-compiled without any issues. Only thing needed are proper cross-compilation flags and configs (like meta-nodejs build scripts provides). I've been running Node.js and io.js builds from 0.10 all the way to latest 4.0. Personally I'm running them with Beaglebone (ARM7) and x86_64. I would say Upgrading native bindings to NAN v2 does not break builds with earlier Node.js or io.js releases so it should be harmless upgrade. |
Use case example: Only reason current embeded hardware product we are maintaining is holding on to io.js 2.5.0 is due to fact that We'll upgrade to Node.js 4.0 once Also, we are NOT |
Adding to the list: nodejs/node#2798. |
Hmm, I don't understand what this means.
The current "Release" distributions for the Raspberry Pi and the BeagleBone Black ship with gcc/g++ 4.6. For the Raspberry Pi this isn't a problem as Raspbian (Debian Wheezy) ships with an optional gcc/g++ 4.8 that can be installed as described here. Note that it's possible to have both 4.6 and 4.8 installed at the same time and switch between versions as required. For the BeagleBone Black things are a little different. It's variant of Debian Wheezy doesn't ship the optional gcc/g++ 4.8 compilers. There are however Debian Jessie "testing" distributions available here. The testing distributions come with gcc/g++ 4.9.
I, personally, don't like the idea of gcc/g++ 4.8 being automatically installed. Instructions on how to do it yourself sounds like a better idea to me. In what scenario would it be necessary to "select the 1.x branch of serialport"? I don't think this will even be possible. If Node.js 4 is being used, and gcc/g++ 4.8 isn't available, it won't be possible to select the 1.x branch of serialport. |
Why node-serialport has to worry about what compiler is available to which platform? This is about NAN. The bindings made with NAN v2 compiles (to my knowledge) on both newer and older gcc and Node.js. Same might not apply to Node.js or v8 itself, but that isn't a node-serialport issue. So why not just jump to NAN v2 and let users play your what node.js or compiler combination they have. Correct me if I'm wrong, but using NAN v2 does not break backwards compatibility; with compilers or with Node.js versions. It just offers capability to use node-serialport with Node.js 4+ for those who are otherwise able to do so. |
It doesn't actually have to worry about what compiler is available to which platform if it doesn't want to. I might be wrong, but this discussion is more about moving everyone forward towards Node.js 4+ without leaving too many of them behind.
Correct.
I can imagine this happening in the not too distant future.
There's nothing to correct here :) |
Just want to chime in to say thanks @jacobrosenthal for specifying that node-serialport compiles in iojs v2.5.0. It installs no problem in node 0.12.x but failed for me in node 4 and iojs 3.3.x. I was not sure what was going on until I saw this thread. |
Would this also be related to issue #579 ? |
Add shim for devices with serial connection
This makes me sad. I have a bunch of examples for node-serialport and I want to be able to upgrade node (and I know students new to node will start with the standard install), but until this is working with the current version, they're all useless. I don't have a windows machine (working in OSX), but I can set one up. If you have end-user tests for people to run that'd help, please post them and I'll give them a try. |
What about this makes you sad? People are actively working on confirmations to ensure a smooth transition. There is nothing sad-making about that. Pitching in is appreciated, but editorializing isn't constructive—agreed? |
Agreed. Sorry, didn't mean to be editorializing. If there's a list of tests to be run, let me know and I'll try if I've got the resources to run them. |
@tigoe glad to have your help: https://github.com/voodootikigod/node-serialport/tree/master/arduinoTest |
Looks like the examples I usually use for testing. I haven't got a lot to add as it failed at the same place for me: all working great until I upgraded from node 0.11.x to 4.1.1, when I get more or less the same compile errors as others have: (FWIW, OSX 10.10.5 (14F27), node v4.1.1. Serial ports working fine with Arduino 1.6.5, Coolterm, screen, etc)
and goes on from there. Doesn't look like anything new or surprising, but if so, let me know and I'll pull the full log. Looks like it's just confirmation that it's related to NAN. I have some pre-compiled installations of serialport (I tend to install it locally per project rather than globally), which fail as follows:
I saw the note above that you're looking for windows testers, which I'm not, but I've got a win7 machine sitting around that's never had node on it before, so it'd be a virgin install. It's an old netbook though, maybe 4 years old. That useful at all? Can see if we've got anything around here running win8, too. |
@tigoe it looks like you did an There are currently two pull requests for Node.js 4 support, #566 and #571. #566 can be installed with #571 can be installed with You could try either or both of them and report your findings. |
@cpustar can you provide more information about what doesn't work? Is it the install that doesn't work? If so, what is the output of the install process? Or are there problems at runtime? |
Not sure if this will be of any help but I'm running Windows 10 64-bit, Node 4.1.1, Visual Studio 2015 Community and Visual Studio 2013 Community. My initial attempt to install with the ghostoy fork failed with the following error: error MSB8020: The builds tools for v140 (Platform Toolset = 'v140') cannot be found. This was solved by setting the msbuild path: After this, the install went smoothly (there were a number of warnings during build, mainly to do with type casting causing truncation) and I had no problems using serialport in node afterwards. |
Chris thought he had assigned all publish privileges and I attempted to Note we went with major as at least one platform (pi under wheezy) will be On Mon, Oct 12, 2015 at 8:09 PM, Olivier Louvignes <notifications@github.com
|
I have -- On October 12, 2015 at 2:27:32 PM, Jacob Rosenthal (notifications@github.com) wrote: Chris thought he had assigned all publish privileges and I attempted to Note we went with major as at least one platform (pi under wheezy) will be On Mon, Oct 12, 2015 at 8:09 PM, Olivier Louvignes <notifications@github.com
|
haha, very nice
|
amazing work to everyone who got this over the line!! 🚀 |
Thank you, everyone! You're all awesome. ⭐ |
All works here, using node 4.1.1, OSX 10.11, and all my examples work. Yay! Thanks everyone for the hard work. |
It didn't like it on my Pi (node v4.2.1)
|
Fail to compile serialPort@v2.0.0 on windows with Node 4.1.1 , I get a bunch errors similar to @alexcroox . |
As far as I can see node-serialport 2.0.0 has proper native binding and is using Nan as intended. This means that any build environment capable of compiling Node.js binary, will be able to compile the node-serialport native library for it. With this logic, it can be reasoned that fault is not with the node-serialport package. Node.js 4.x just needs newer build tools. Using pre-built Node.js binaries, you will be able to run Node.js itself, but that does not guarantee that you've got proper build environment for compiling anything against its headers. I'd recommend you check availability of some basic build tool versions:
If any of these minimum versions are not met, you are not likely to succeed building native modules against Node.js 4.x headers or compiling Node.js runtime itself. |
@imyller Indeed, I only get visual studio 2012 installed which doesn't meet the building requirements |
@alexcroox It looks like Raspbian Wheezy is installed on the Pi. If so, this should help: https://github.com/fivdi/onoff/wiki/Node.js-v4-and-native-addons |
Built using these instructions and everything is working great thank you :) http://andyfelong.com/2015/09/node-js-v4-1-0-on-raspberry-pi-2/ |
Hi, I'm new at this but i'm trying to get pass to the proccess of "building serialport" to use it with johnny-five. I keep getting this error and tried everything. Installed python 2.7, set the env. variable. I have Visual Studio 2013, etc. Error log:
Please help, any advice would be appreciated. Thanks in advance! |
Hi there. I see that you have Windows 10 (System Windows_NT 10.0.10240) but are still Three things that I can think of, that I have had to do on my system:
Hope this helps. Michael On Mon, Oct 19, 2015 at 2:12 AM, andresg747 notifications@github.com
|
I've just tried serialport@2.0.1 with node 4.2.1 and I'm still seeing the same symptom as my previous comment (#578 (comment)) |
Here's my latest, trying this on Windows 10: I tried under Windows 10. At first I tried using the GitHub Shell that comes with the GitHub GUI client for Windows. I couldn’t ever get it to build there, so I closed that and just opened Windows PowerShell. In powershell, I changed into a directory for a project I was working on (https://github.com/vanevery/p5.serialport), and did this:
Some warnings popped up, but it compiled OK. Then I ran the server script for that project (it's a serial-to-websocket server for p5.js):
And opened the echo2 example in PR#15 of p5.serialport. I had loaded up echo.ino.ino on the Arduino already. Changed the portName appropriately (COM4 for me) and ran it. It crashed after about 18, 19 reads pretty consistently. Then I loaded up my own node serial examples (https://github.com/tigoe/NodeExamples). Installed like so:
Note: no msds_ver flag. It worked fine, after the same warnings as above. Ran SerialIn.js with analogReadSerial example from Arduino Examples -> Basics folder. Converted Arduino output to binary (using .write()) and tried it with SerialInBinary as well. In both cases, the script stopped running after 400-600 bytes received. No idea why yet, but I can repeat it pretty consistently with the steps above. |
Closing this as it was merged for 2.0.0. Looks like mainly whats left is windows issues, which well track on separate issues |
@jacobrosenthal I also got this working in the end, following the same advice as @alexcroox. This was on an nvm-installed node 4.2.2 on the RPI2 (Raspbian GNU/Linux 7 (wheezy)) Steps taken: https://gist.github.com/torgeir/89ec54bbc6cf80d8bff4 |
For anyone wondering, I can confirm that git://github.com/ghostoy/node-serialport.git#nan1to2 is working swimmingly on 4.2.2 installed via nvm on a BeagleBoneBlack RevC with a fresh headless install of Debian 8.2 (Jessie). for anyone reading this on a minimal install remember to Well done and thank you. log for posterity:
|
Doesnt look like nan2.x will be a breaking change and still supports all node versions we support, ie this will not be a major release
#566 is the PR we're working on. It appears to be generated by one of the following migration scripts update_to_nan_v2.0.x.sh 1to2.js
If youd like to get ahead of us and use node4, or speed up the process npm install "git://github.com/ghostoy/node-serialport.git#nan1to2" and report your findings here
Weve got two windows issues that need reproduction and fixing:
with this test
with this test
Im contacting Chris about publishing and especially around all the changes to the travis file which also seems to be involved in publishing.
In my mind we merge a travis update so we can see whats up, then cherry pick or merge those PRs.
But let me reiterate, were not going to be able to support nan2 (and thus node 4) until we get some windows testers and feedback
Long term we're working on CI'ing this problem away (see nodejs/hardware#13 ) but we're not there yet.
The text was updated successfully, but these errors were encountered: