ibmtjbot / tjbot

IBM TJBot
https://ibmtjbot.github.io
Apache License 2.0
481 stars 282 forks source link

Errors building conversation.js - fibers.cc and v8.h #55

Closed gnumoreno closed 7 years ago

gnumoreno commented 7 years ago

When building the conversation:

pi@raspberrypi:~/tjbot/recipes/conversation $ npm install

> fibers@1.0.15 install /home/pi/tjbot/recipes/conversation/node_modules/fibers
> node build.js || nodejs build.js

make: Entering directory '/home/pi/tjbot/recipes/conversation/node_modules/fibers/build'
  CXX(target) Release/obj.target/fibers/src/fibers.o
../src/fibers.cc: In function ‘v8::Handle<v8::String> uni::NewLatin1String(v8::Isolate*, const char*)’:
../src/fibers.cc:122:64: warning: ‘static v8::Local<v8::String> v8::String::NewFromOneByte(v8::Isolate*, const uint8_t*, v8::String::NewStringType, int)’ is deprecated (declared at /home/pi/.node-gyp/6.11.1/include/node/v8.h:2332): Use maybe version [-Wdeprecated-declarations]
   return String::NewFromOneByte(isolate, (const uint8_t*)string);
                                                                ^
../src/fibers.cc: In function ‘v8::Handle<v8::String> uni::NewLatin1Symbol(v8::Isolate*, const char*)’:
../src/fibers.cc:126:64: warning: ‘static v8::Local<v8::String> v8::String::NewFromOneByte(v8::Isolate*, const uint8_t*, v8::String::NewStringType, int)’ is deprecated (declared at /home/pi/.node-gyp/6.11.1/include/node/v8.h:2332): Use maybe version [-Wdeprecated-declarations]
   return String::NewFromOneByte(isolate, (const uint8_t*)string);
                                                                ^
../src/fibers.cc: In static member function ‘static uni::FunctionType Fiber::New(const Arguments&)’:
../src/fibers.cc:433:99: warning: ‘v8::Local<v8::Object> v8::Function::NewInstance(int, v8::Local<v8::Value>*) const’ is deprecated (declared at /home/pi/.node-gyp/6.11.1/include/node/v8.h:3271): Use maybe version [-Wdeprecated-declarations]
     return uni::Return(uni::Deref(Isolate::GetCurrent(), tmpl)->GetFunction()->NewInstance(1, argv), args);
                                                                                                   ^
../src/fibers.cc: In static member function ‘static void Fiber::RunFiber(void**)’:
../src/fibers.cc:621:14: warning: ‘v8::TryCatch::TryCatch()’ is deprecated (declared at /home/pi/.node-gyp/6.11.1/include/node/v8.h:6773): Use isolate version [-Wdeprecated-declarations]
     TryCatch try_catch;
              ^
../src/fibers.cc: In static member function ‘static void Fiber::SetPoolSize(v8::Local<v8::String>, v8::Local<v8::Value>, const SetterCallbackInfo&)’:
../src/fibers.cc:741:43: warning: ‘v8::Local<v8::Number> v8::Value::ToNumber() const’ is deprecated (declared at /home/pi/.node-gyp/6.11.1/include/node/v8.h:8173): Use maybe version [-Wdeprecated-declarations]
    Coroutine::pool_size = value->ToNumber()->Value();
                                           ^
../src/fibers.cc: In static member function ‘static void Fiber::Init(v8::Handle<v8::Object>)’:
../src/fibers.cc:793:72: warning: ‘bool v8::Object::SetAccessor(v8::Local<v8::String>, v8::AccessorGetterCallback, v8::AccessorSetterCallback, v8::Local<v8::Value>, v8::AccessControl, v8::PropertyAttribute)’ is deprecated (declared at /home/pi/.node-gyp/6.11.1/include/node/v8.h:2743): Use maybe version [-Wdeprecated-declarations]
    fn->SetAccessor(uni::NewLatin1Symbol(isolate, "current"), GetCurrent);
                                                                        ^
../src/fibers.cc:794:87: warning: ‘bool v8::Object::SetAccessor(v8::Local<v8::String>, v8::AccessorGetterCallback, v8::AccessorSetterCallback, v8::Local<v8::Value>, v8::AccessControl, v8::PropertyAttribute)’ is deprecated (declared at /home/pi/.node-gyp/6.11.1/include/node/v8.h:2743): Use maybe version [-Wdeprecated-declarations]
    fn->SetAccessor(uni::NewLatin1Symbol(isolate, "poolSize"), GetPoolSize, SetPoolSize);
                                                                                       ^
../src/fibers.cc:795:84: warning: ‘bool v8::Object::SetAccessor(v8::Local<v8::String>, v8::AccessorGetterCallback, v8::AccessorSetterCallback, v8::Local<v8::Value>, v8::AccessControl, v8::PropertyAttribute)’ is deprecated (declared at /home/pi/.node-gyp/6.11.1/include/node/v8.h:2743): Use maybe version [-Wdeprecated-declarations]
    fn->SetAccessor(uni::NewLatin1Symbol(isolate, "fibersCreated"), GetFibersCreated);
                                                                                    ^
../src/fibers.cc: In instantiation of ‘void uni::MakeWeak(v8::Isolate*, v8::Persistent<S>&, P*) [with void (* F)(void*) = Fiber::WeakCallback; T = v8::Object; P = void]’:
../src/fibers.cc:351:60:   required from here
../src/fibers.cc:43:3: warning: ‘void v8::PersistentBase<T>::SetWeak(P*, typename v8::WeakCallbackData<T, P>::Callback) [with P = void; T = v8::Object; typename v8::WeakCallbackData<T, P>::Callback = void (*)(const v8::WeakCallbackData<v8::Object, void>&)]’ is deprecated (declared at /home/pi/.node-gyp/6.11.1/include/node/v8.h:7649): use WeakCallbackInfo version [-Wdeprecated-declarations]
   handle.SetWeak(val, WeakCallbackShim<F>);
   ^
In file included from /home/pi/.node-gyp/6.11.1/include/node/node.h:42:0,
                 from ../src/coroutine.h:1,
                 from ../src/fibers.cc:1:
/home/pi/.node-gyp/6.11.1/include/node/v8.h: In instantiation of ‘void v8::PersistentBase<T>::SetWeak(P*, typename v8::WeakCallbackData<T, P>::Callback) [with P = void; T = v8::Object; typename v8::WeakCallbackData<T, P>::Callback = void (*)(const v8::WeakCallbackData<v8::Object, void>&)]’:
../src/fibers.cc:43:3:   required from ‘void uni::MakeWeak(v8::Isolate*, v8::Persistent<S>&, P*) [with void (* F)(void*) = Fiber::WeakCallback; T = v8::Object; P = void]’
../src/fibers.cc:351:60:   required from here
/home/pi/.node-gyp/6.11.1/include/node/v8.h:7652:10: warning: ‘void v8::PersistentBase<T>::SetWeak(P*, typename v8::WeakCallbackData<S, P>::Callback) [with S = v8::Object; P = void; T = v8::Object; typename v8::WeakCallbackData<S, P>::Callback = void (*)(const v8::WeakCallbackData<v8::Object, void>&)]’ is deprecated (declared at /home/pi/.node-gyp/6.11.1/include/node/v8.h:7637): use WeakCallbackInfo version [-Wdeprecated-declarations]
   SetWeak<T, P>(parameter, callback);
          ^
  CXX(target) Release/obj.target/fibers/src/coroutine.o
  CC(target) Release/obj.target/fibers/src/libcoro/coro.o
  SOLINK_MODULE(target) Release/obj.target/fibers.node
  COPY Release/fibers.node
make: Leaving directory '/home/pi/tjbot/recipes/conversation/node_modules/fibers/build'
Installed in `/home/pi/tjbot/recipes/conversation/node_modules/fibers/bin/linux-arm-48/fibers.node`

> pigpio@0.4.0 install /home/pi/tjbot/recipes/conversation/node_modules/pigpio
> node-gyp rebuild

make: Entering directory '/home/pi/tjbot/recipes/conversation/node_modules/pigpio/build'
  CXX(target) Release/obj.target/pigpio/src/pigpio.o
  SOLINK_MODULE(target) Release/obj.target/pigpio.node
  COPY Release/pigpio.node
make: Leaving directory '/home/pi/tjbot/recipes/conversation/node_modules/pigpio/build'

> rpi-ws281x-native@0.8.2 install /home/pi/tjbot/recipes/conversation/node_modules/rpi-ws281x-native
> node-gyp rebuild

make: Entering directory '/home/pi/tjbot/recipes/conversation/node_modules/rpi-ws281x-native/build'
  CC(target) Release/obj.target/rpi_libws2811/src/rpi_ws281x/ws2811.o
  CC(target) Release/obj.target/rpi_libws2811/src/rpi_ws281x/pwm.o
  CC(target) Release/obj.target/rpi_libws2811/src/rpi_ws281x/dma.o
  CC(target) Release/obj.target/rpi_libws2811/src/rpi_ws281x/mailbox.o
  CC(target) Release/obj.target/rpi_libws2811/src/rpi_ws281x/board_info.o
  AR(target) Release/obj.target/rpi_libws2811.a
  COPY Release/rpi_libws2811.a
  CXX(target) Release/obj.target/rpi_ws281x/src/rpi-ws281x.o
../src/rpi-ws281x.cc: In function ‘void init(const Nan::FunctionCallbackInfo<v8::Value>&)’:
../src/rpi-ws281x.cc:100:38: warning: ‘bool v8::Object::HasOwnProperty(v8::Local<v8::String>)’ is deprecated (declared at /home/pi/.node-gyp/6.11.1/include/node/v8.h:2878): Use maybe version [-Wdeprecated-declarations]
     if(config->HasOwnProperty(symFreq)) {
                                      ^
../src/rpi-ws281x.cc:104:40: warning: ‘bool v8::Object::HasOwnProperty(v8::Local<v8::String>)’ is deprecated (declared at /home/pi/.node-gyp/6.11.1/include/node/v8.h:2878): Use maybe version [-Wdeprecated-declarations]
     if(config->HasOwnProperty(symDmaNum)) {
                                        ^
../src/rpi-ws281x.cc:108:41: warning: ‘bool v8::Object::HasOwnProperty(v8::Local<v8::String>)’ is deprecated (declared at /home/pi/.node-gyp/6.11.1/include/node/v8.h:2878): Use maybe version [-Wdeprecated-declarations]
     if(config->HasOwnProperty(symGpioPin)) {
                                         ^
../src/rpi-ws281x.cc:112:40: warning: ‘bool v8::Object::HasOwnProperty(v8::Local<v8::String>)’ is deprecated (declared at /home/pi/.node-gyp/6.11.1/include/node/v8.h:2878): Use maybe version [-Wdeprecated-declarations]
     if(config->HasOwnProperty(symInvert)) {
                                        ^
../src/rpi-ws281x.cc:116:44: warning: ‘bool v8::Object::HasOwnProperty(v8::Local<v8::String>)’ is deprecated (declared at /home/pi/.node-gyp/6.11.1/include/node/v8.h:2878): Use maybe version [-Wdeprecated-declarations]
     if(config->HasOwnProperty(symBrightness)) {
                                            ^
  SOLINK_MODULE(target) Release/obj.target/rpi_ws281x.node
  COPY Release/rpi_ws281x.node
  COPY ../lib/binding/rpi_ws281x.node
  TOUCH Release/obj.target/action_after_build.stamp
make: Leaving directory '/home/pi/tjbot/recipes/conversation/node_modules/rpi-ws281x-native/build'

> sleep@5.1.1 install /home/pi/tjbot/recipes/conversation/node_modules/sleep
> node-gyp rebuild

make: Entering directory '/home/pi/tjbot/recipes/conversation/node_modules/sleep/build'
  CXX(target) Release/obj.target/node_sleep/sleep.o
  SOLINK_MODULE(target) Release/obj.target/node_sleep.node
  COPY Release/node_sleep.node
make: Leaving directory '/home/pi/tjbot/recipes/conversation/node_modules/sleep/build'

> websocket@1.0.24 install /home/pi/tjbot/recipes/conversation/node_modules/websocket
> (node-gyp rebuild 2> builderror.log) || (exit 0)

make: Entering directory '/home/pi/tjbot/recipes/conversation/node_modules/websocket/build'
  CXX(target) Release/obj.target/bufferutil/src/bufferutil.o
  SOLINK_MODULE(target) Release/obj.target/bufferutil.node
  COPY Release/bufferutil.node
  CXX(target) Release/obj.target/validation/src/validation.o
  SOLINK_MODULE(target) Release/obj.target/validation.node
  COPY Release/validation.node
make: Leaving directory '/home/pi/tjbot/recipes/conversation/node_modules/websocket/build'
conversation@0.0.1 /home/pi/tjbot/recipes/conversation
└─┬ tjbot@1.3.0 
  ├─┬ assert@1.4.1 
  │ └─┬ util@0.10.3 
  │   └── inherits@2.0.1 
  ├─┬ asyncawait@1.0.6 
  │ ├── bluebird@3.5.0 
  │ ├── fibers@1.0.15 
  │ └── lodash@3.10.1 
  ├── color-model@0.2.2 
  ├── colornames@1.1.1 
  ├── fifo@2.3.0 
  ├── mic@2.1.1 
  ├─┬ node-raspistill@0.0.11 
  │ ├─┬ image-type@3.0.0 
  │ │ └── file-type@4.4.0 
  │ └─┬ object.assign@4.0.4 
  │   ├─┬ define-properties@1.1.2 
  │   │ └── foreach@2.0.5 
  │   ├── function-bind@1.1.0 
  │   └── object-keys@1.0.11 
  ├─┬ object.pick@1.2.0 
  │ └─┬ isobject@2.1.0 
  │   └── isarray@1.0.0 
  ├─┬ pigpio@0.4.0 
  │ ├── bindings@1.2.1 
  │ └── nan@2.4.0 
  ├── rpi-ws281x-native@0.8.2 
  ├── semaphore@1.0.5 
  ├─┬ sleep@5.1.1 
  │ └── nan@2.6.2 
  ├── sound-player@1.0.6 
  ├─┬ temp@0.8.3 
  │ ├── os-tmpdir@1.0.2 
  │ └── rimraf@2.2.8 
  ├─┬ watson-developer-cloud@2.37.0 
  │ ├─┬ async@2.5.0 
  │ │ └── lodash@4.17.4 
  │ ├─┬ buffer-from@0.1.1 
  │ │ └─┬ is-array-buffer-x@1.3.0 
  │ │   ├─┬ has-to-string-tag-x@1.4.0 
  │ │   │ └── has-symbol-support-x@1.4.0 
  │ │   ├─┬ is-object-like-x@1.3.0 
  │ │   │ ├── is-function-x@1.4.0 
  │ │   │ └── is-primitive@2.0.0 
  │ │   └─┬ to-string-tag-x@1.4.0 
  │ │     ├── lodash.isnull@3.0.0 
  │ │     └── validate.io-undefined@1.0.3 
  │ ├── cookie@0.3.1 
  │ ├─┬ csv-stringify@1.0.4 
  │ │ └── lodash.get@4.4.2 
  │ ├── extend@3.0.1 
  │ ├── isstream@0.1.2 
  │ ├─┬ object.omit@2.0.1 
  │ │ ├─┬ for-own@0.1.5 
  │ │ │ └── for-in@1.0.2 
  │ │ └── is-extendable@0.1.1 
  │ ├─┬ request@2.81.0 
  │ │ ├── aws-sign2@0.6.0 
  │ │ ├── aws4@1.6.0 
  │ │ ├── caseless@0.12.0 
  │ │ ├─┬ combined-stream@1.0.5 
  │ │ │ └── delayed-stream@1.0.0 
  │ │ ├── forever-agent@0.6.1 
  │ │ ├─┬ form-data@2.1.4 
  │ │ │ └── asynckit@0.4.0 
  │ │ ├─┬ har-validator@4.2.1 
  │ │ │ ├─┬ ajv@4.11.8 
  │ │ │ │ ├── co@4.6.0 
  │ │ │ │ └─┬ json-stable-stringify@1.0.1 
  │ │ │ │   └── jsonify@0.0.0 
  │ │ │ └── har-schema@1.0.5 
  │ │ ├─┬ hawk@3.1.3 
  │ │ │ ├── boom@2.10.1 
  │ │ │ ├── cryptiles@2.0.5 
  │ │ │ ├── hoek@2.16.3 
  │ │ │ └── sntp@1.0.9 
  │ │ ├─┬ http-signature@1.1.1 
  │ │ │ ├── assert-plus@0.2.0 
  │ │ │ ├─┬ jsprim@1.4.0 
  │ │ │ │ ├── assert-plus@1.0.0 
  │ │ │ │ ├── extsprintf@1.0.2 
  │ │ │ │ ├── json-schema@0.2.3 
  │ │ │ │ └── verror@1.3.6 
  │ │ │ └─┬ sshpk@1.13.1 
  │ │ │   ├── asn1@0.2.3 
  │ │ │   ├── assert-plus@1.0.0 
  │ │ │   ├── bcrypt-pbkdf@1.0.1 
  │ │ │   ├─┬ dashdash@1.14.1 
  │ │ │   │ └── assert-plus@1.0.0 
  │ │ │   ├── ecc-jsbn@0.1.1 
  │ │ │   ├─┬ getpass@0.1.7 
  │ │ │   │ └── assert-plus@1.0.0 
  │ │ │   ├── jsbn@0.1.1 
  │ │ │   └── tweetnacl@0.14.5 
  │ │ ├── is-typedarray@1.0.0 
  │ │ ├── json-stringify-safe@5.0.1 
  │ │ ├─┬ mime-types@2.1.16 
  │ │ │ └── mime-db@1.29.0 
  │ │ ├── oauth-sign@0.8.2 
  │ │ ├── performance-now@0.2.0 
  │ │ ├── qs@6.4.0 
  │ │ ├── safe-buffer@5.1.1 
  │ │ ├── stringstream@0.0.5 
  │ │ ├─┬ tough-cookie@2.3.2 
  │ │ │ └── punycode@1.4.1 
  │ │ ├── tunnel-agent@0.6.0 
  │ │ └── uuid@3.1.0 
  │ ├─┬ solr-client@0.7.0 
  │ │ ├── duplexer@0.1.1 
  │ │ ├─┬ httperror@0.2.3 
  │ │ │ └── hnp@0.0.1 
  │ │ ├─┬ json-bigint@0.1.4 
  │ │ │ └── bignumber.js@1.1.1 
  │ │ └─┬ JSONStream@1.0.7 
  │ │   ├── jsonparse@1.3.1 
  │ │   └── through@2.3.8 
  │ ├── string@3.3.3 
  │ ├── vcap_services@0.3.4 
  │ └─┬ websocket@1.0.24 
  │   ├─┬ debug@2.6.8 
  │   │ └── ms@2.0.0 
  │   ├── typedarray-to-buffer@3.1.2 
  │   └── yaeti@0.0.6 
  └─┬ winston@2.3.1 
    ├── async@1.0.0 
    ├── colors@1.0.3 
    ├── cycle@1.0.3 
    ├── eyes@0.1.8 
    └── stack-trace@0.0.10 

After I'm done it recognizes the voice commands but does not reply.

pi@raspberrypi:~/tjbot/recipes/conversation $ sudo nodejs conversation.js 
verbose: TJBot initializing microphone
verbose: TJBot initializing conversation service
verbose: TJBot initializing speech_to_text service
verbose: TJBot initializing text_to_speech service
info: Hello from TJBot! My name is Watson.
verbose: TJBot library version v1.3.0
You can ask me to introduce myself or tell you a joke.
Try saying, "Watson, please introduce yourself" or "Watson, who are you?"
You can also say, "Watson, tell me a joke!"
verbose: TJBot initializing microphone
info: TJBot heard: tell me a joke 
info: TJBot heard: who are you 
info: TJBot heard: who 
info: TJBot heard: hello 
info: TJBot heard: are you there 
victordibia commented 7 years ago

You will need to say the bot's name ( Watson is the default) first. Instead of "tell me a joke" please try "Watson tell me a joke".

Also, the npm install command does execute successfully most of the messages above are more of build logs.

-V.

gnumoreno commented 7 years ago

Thank you, Victor! I appreciate the quick response and all the help @slack!