-
Notifications
You must be signed in to change notification settings - Fork 506
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
nan 2.0.0 fails to build against node 0.10.x #394
Comments
Use a supported version of Node 0.10 then. The current one is at 0.10.40. |
Ok. I was misled by the documentation, see https://v8docs.nodesource.com/node-0.10/d2/db3/classv8_1_1_string.html, which doesn't show the option. But indeed I see the REPLACE_INVALID_UTF8 patch was applied in 0.10.29 and onwards. |
@rvagg why u no account for floating patches in the generated docs? https://v8docs.nodesource.com/node-0.10/d4/da0/v8_8h_source.html#l01079 |
As a followup: This should no longer be a problem. |
There appear to be constellations where this is still an issue, for example, with g++ 4.6.3 (yes, this is old) and node v0.10.29. Is this to be expected?
|
No, you cannot have 0.10.29, since it should have `REPLACE_INVALID_UTF8". Build from source against the bundled V8 and try again. |
It can happen if you have a node binary from your distro vendor that doesn't carry the REPLACE_INVALID_UTF8 patch, e.g. because it's linked against a shared libv8. In that case you're pretty much out of luck, you're going to have to use an official binary. |
Yes, that's it. The node binary is from the distro vendor and doesn't carry the REPLACE_INVALID_UTF8 patch. v8.h has the following: enum WriteOptions {
NO_OPTIONS = 0,
HINT_MANY_WRITES_EXPECTED = 1,
NO_NULL_TERMINATION = 2,
PRESERVE_ASCII_NULL = 4
}; rather that this: enum WriteOptions {
NO_OPTIONS = 0,
HINT_MANY_WRITES_EXPECTED = 1,
NO_NULL_TERMINATION = 2,
PRESERVE_ONE_BYTE_NULL = 4,
// Used by WriteUtf8 to replace orphan surrogate code units with the
// unicode replacement character. Needs to be set to guarantee valid UTF-8
// output.
REPLACE_INVALID_UTF8 = 8
}; Thank you very much for the information. |
I can suggest https://github.com/nodesource/distributions |
Excellent suggestion 👍 I just installed v0.10.40 from NodeSource and everything is working as expected. Thanks again.
|
`v8::String::REPLACE_INVALID_UTF8` was added in node.js v0.10.29. Check the version macros to see if it's available. Fixes: nodejs/nan#394 Fixes: nodejs/nan#396 PR-URL: nodejs/nan#399 Reviewed-By: Benjamin Byholm <bbyholm@abo.fi>
nan 2.0.0 fails to build against node 0.10.x
Reason for this is the usage of v8::String::REPLACE_INVALID_UTF8 in nan.h.
REPLACE_INVALID_UTF8 is not supported in node 0.10
E.g. when building sleep 3.0.0
Apart from upgrading to node 0.12.x any ideas on how to resolve this?
The text was updated successfully, but these errors were encountered: