Closed colinbes closed 8 years ago
Let's check to see if the version of Node.js v0.10.38 that's being used contains the required UTF8 patch. Edit v8.h
which is likely to be located at /usr/include/node/v8.h
on a standard Debian distro for the BeagleBone. Then search for the `WriteOptions' enum.
If WriteOptions
has the following 5 options, then required patch is present and everything should actually work:
enum WriteOptions {
NO_OPTIONS = 0,
HINT_MANY_WRITES_EXPECTED = 1,
NO_NULL_TERMINATION = 2,
PRESERVE_ASCII_NULL = 4,
REPLACE_INVALID_UTF8 = 0 // there may be an 8 here
};
If WriteOptions has the following 4 options, then the required patch is not there:
enum WriteOptions {
NO_OPTIONS = 0,
HINT_MANY_WRITES_EXPECTED = 1,
NO_NULL_TERMINATION = 2,
PRESERVE_ASCII_NULL = 4,
};
If REPLACE_INVALID_UTF8 = 0
is missing, add it, and then check to see if i2c-bus can be installed.
Just to be sure, again confirmed node --version
shows v0.10.38
On my beaglebone, the v8.h file is at /usr/include/nodejs/deps/v8/include
and doesn't have the REPLACE_INVALID_UTF8 entry in it.
enum WriteOptions {
NO_OPTIONS = 0,
HINT_MANY_WRITES_EXPECTED = 1,
NO_NULL_TERMINATION = 2,
PRESERVE_ASCII_NULL = 4
};
Adding REPLACE_INVALID_UTF8 = 0
to WriteOptions allows i2c-bus to be installed.
Thanks for help. Sad it takes a patch to v8.h file as it's not ideal having non-standard release installed in machine, but it's a way forward.
~C
Just want to confirm it should be REPLACE_INVALID_UTF8 = 0 and not REPLACE_INVALID_UTF8 = 8?
On May 25, 2016, at 11:44 AM, Brian Cooke notifications@github.com wrote:
Let's check to see if the version of Node.js v0.10.38 that's being used contains the required UTF8 patch. Edit v8.h which is likely to be located at /usr/include/node/v8.h on a standard Debian distro for the BeagleBone. Then search for the `WriteOptions' enum.
If WriteOptions has the following 5 options, then required patch is present and everything should actually work:
enum WriteOptions { NO_OPTIONS = 0, HINT_MANY_WRITES_EXPECTED = 1, NO_NULL_TERMINATION = 2, PRESERVE_ASCII_NULL = 4, REPLACE_INVALID_UTF8 = 0 // there may be an 8 here }; If WriteOptions has the following 4 options, then the required patch is not there:
enum WriteOptions { NO_OPTIONS = 0, HINT_MANY_WRITES_EXPECTED = 1, NO_NULL_TERMINATION = 2, PRESERVE_ASCII_NULL = 4, }; If REPLACE_INVALID_UTF8 = 0 is missing, add it, and then check to see if i2c-bus can be installed.
— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub https://github.com/fivdi/i2c-bus/issues/21#issuecomment-221631679
Yes, it a Debian unstable patch: https://sources.debian.net/src/libv8-3.14/3.14.5.8-10/debian/patches/nodejsREPLACE_INVALID_UTF8.patch/
It's a workaround that's disputed: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=797545
The version of Node.js on your BeagleBone is broken. If you can't upgrade to a non-broken version this is the only solution that I'm aware of.
Broken node.js was not expected as its untouched
Thanks again
Sent via mobile
On May 25, 2016, at 12:24 PM, Brian Cooke notifications@github.com wrote:
Yes, it a Debian unstable patch: https://sources.debian.net/src/libv8-3.14/3.14.5.8-10/debian/patches/nodejsREPLACE_INVALID_UTF8.patch/
It's a workaround that's disputed: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=797545
The version of Node.js on your BeagleBone is broken. If you can't upgrade to a non-broken version this is the only solution that I'm aware of.
— You are receiving this because you modified the open/close state. Reply to this email directly or view it on GitHub
I am attempting to install i2c-bus on beaglebone black with nodejs v0.10.38 installed. At this stage, I am not able to update nodejs due to product life-cycle.
When running npm install i2c-bus I get the error (as stated in readme) even though nodejs should be working solution.
Note that I am running node v0.10.38 which is stated should work.