-
Notifications
You must be signed in to change notification settings - Fork 40
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
Does not build on Node.js 4.2.0 (LTS) (OS X) #13
Comments
I decided to dust off my C++ and see if I could be helpful. I added Nan as a dependency (it abstracts Node and V8 APIs: https://www.npmjs.com/package/nan) and used that in the places where the build was breaking. I made some naive assumptions to get it to build, so it probably doesn't actually work, but building was one step! I'll try tomorrow to see if I can get the tests to run and everything, and then if you're okay with adding Nan as a dependency, I can create a PR for you. In the meantime, here's the commit where I got everything building on Node 4.2 (and still builds on Node 0.12.7): |
I'm not into nan. for the long haul. I have it building for v4; just didn't commit and publish. Am branching the code for v12 and v4. |
Cool, thanks for the update! |
Nan limits experimenting with the latest change in v8 and there are some cool things they keep adding The incompatible change is node::Buffer initialization on the native side going through a check |
I pushed and published. I did this with nodejs v4.1.1 while building v4.2.1. Now this project builds with v4.2.1 yet during runtime with hdf5-1.8.15-patch1 I see a bug and am looking for it |
Also the mac I have to use is at work and I'm getting the network admin to put nodejs v4.2.1 on it to test ad create prebuilt packages |
is returning a true for an object that is not a node::Buffer. Investigating further... |
HasInstance 1 Have to study this some more; definitely different between v4.1.1 and 4.2.1. Haven't tested 4.2.0 |
Ah! When I do var buffer=new Buffer(5*8, "binary");
buffer.type=H5Type.H5T_NATIVE_DOUBLE;
buffer.writeDoubleLE(1.0, 0);
buffer.writeDoubleLE(2.0, 8);
buffer.writeDoubleLE(3.0, 16);
buffer.writeDoubleLE(4.0, 24);
buffer.writeDoubleLE(5.0, 32);
console.dir("Buffer name "+buffer.constructor.name); it says it's a Buffer; but the same object on the native side will say Uint8Array and also satisfy the HasInstance regardless if constructed by Buffer or Uint8Array. v4.2.1 has the change; v4.1.1 doesn't; building and testing v4.2.0... v4.2.0 has the issue. I don't know why they change the constructor name going from javascript to native side; going to try to join a discussion on this. |
Yeah 4.2.0 is when they upgraded the v8 engine. It was the thing that held up the LTS blessing. Interesting find. I will follow the node discussion as well. Thanks all for all your hard work! |
ugh. unhappy with their take on it. Buffer=Uint8Array now limits size to int and this is the size of all h5 dataset dimensions multiplied together. It also is back to dealing with the Externalize which is a one time thing and breaks the multiple use of a buffer and passes memory cleanup to native. Have to think and study. Been wanting to look at streaming which will move multiple buffers along. One of my design principles is avoid copying things and the Externalize just to get to the data causes a single use per buffer/object |
in the case of binaryjs streaming all the way to a browser page, native streaming of chunks/sections was on my list to tackle. As a step I had implemented regions access of a dataset; foreseeing numerous applications won't want to send a terabyte to the browser anyway. need to move on from 4.1.x because of other broken things such as Buffer.concat |
Currently making Uint8Array work on the native side for Buffer and be as interchangeable at this point as possible. Hope your dataset size is within the size limit on Uint8Array. Then going to develop streams |
Node.js has just cut its first LTS release, version 4.2.0. I'd dive in to try to offer up a PR, but I've never worked with Node's native bindings stuff so I really don't have much to offer. Here's some info about my environment:
Note that this works fine when I switch back to Node 0.12.7. I haven't tried on any Linux variants yet, nor Windows.
From what I can tell, it looks like the new version of V8 is throwing a wrench into the works? Here's what appears to be the relevant bits of the build (please let me know if more info would be helpful, I'll be glad to provide as much as I can):
The text was updated successfully, but these errors were encountered: