Skip to content
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

PrimeOS build issue #1905

Closed
apiel opened this issue Jul 31, 2019 · 5 comments
Closed

PrimeOS build issue #1905

apiel opened this issue Jul 31, 2019 · 5 comments
Labels

Comments

@apiel
Copy link

apiel commented Jul 31, 2019

Summary of Problem

  • I am trying to install serialport on primeOS (android for x86)
  • I am getting 12 warnings and 9 errors generated.
  • I try to find a way to compile it without errors.

Code to Reproduce the Issue

npm install serialport --build-from-source

output:


> serialport@6.2.2 install /data/data/com.termux/files/home/mhb-js/node_modules/zigbee-service/node_modules/serialport
> prebuild-install || node-gyp rebuild

make: Entering directory '/data/data/com.termux/files/home/mhb-js/node_modules/zigbee-service/node_modules/serialport/build'
  CXX(target) Release/obj.target/serialport/src/serialport.o
../src/serialport.cpp:41:39: error: no matching member function for call to 'ToString'
  v8::String::Utf8Value path(info[0]->ToString());
                             ~~~~~~~~~^~~~~~~~
/data/data/com.termux/files/home/.node-gyp/12.4.0/include/node/v8.h:2528:44: note: candidate function not viable: requires single argument 'context',
      but no arguments were provided
  V8_WARN_UNUSED_RESULT MaybeLocal<String> ToString(
                                           ^
/data/data/com.termux/files/home/.node-gyp/12.4.0/include/node/v8.h:2544:35: note: candidate function not viable: requires single argument 'isolate',
      but no arguments were provided
                    Local<String> ToString(Isolate* isolate) const);
                                  ^
../src/serialport.cpp:48:44: error: no matching member function for call to 'ToObject'
  v8::Local<v8::Object> options = info[1]->ToObject();
                                  ~~~~~~~~~^~~~~~~~
/data/data/com.termux/files/home/.node-gyp/12.4.0/include/node/v8.h:2532:44: note: candidate function not viable: requires single argument 'context',
      but no arguments were provided
  V8_WARN_UNUSED_RESULT MaybeLocal<Object> ToObject(
                                           ^
/data/data/com.termux/files/home/.node-gyp/12.4.0/include/node/v8.h:2546:35: note: candidate function not viable: requires single argument 'isolate',
      but no arguments were provided
                    Local<Object> ToObject(Isolate* isolate) const);
                                  ^
../src/serialport.cpp:95:18: warning: 'Call' is deprecated [-Wdeprecated-declarations]
  data->callback.Call(2, argv);
                 ^
../../../../nan/nan.h:1739:3: note: 'Call' has been explicitly marked deprecated here
  NAN_DEPRECATED inline v8::Local<v8::Value>
  ^
../../../../nan/nan.h:104:40: note: expanded from macro 'NAN_DEPRECATED'
# define NAN_DEPRECATED __attribute__((deprecated))
                                       ^
../src/serialport.cpp:113:44: error: no matching member function for call to 'ToObject'
  v8::Local<v8::Object> options = info[1]->ToObject();
                                  ~~~~~~~~~^~~~~~~~
/data/data/com.termux/files/home/.node-gyp/12.4.0/include/node/v8.h:2532:44: note: candidate function not viable: requires single argument 'context',
      but no arguments were provided
  V8_WARN_UNUSED_RESULT MaybeLocal<Object> ToObject(
                                           ^
/data/data/com.termux/files/home/.node-gyp/12.4.0/include/node/v8.h:2546:35: note: candidate function not viable: requires single argument 'isolate',
      but no arguments were provided
                    Local<Object> ToObject(Isolate* isolate) const);
                                  ^
../src/serialport.cpp:150:18: warning: 'Call' is deprecated [-Wdeprecated-declarations]
  data->callback.Call(1, argv);
                 ^
../../../../nan/nan.h:1739:3: note: 'Call' has been explicitly marked deprecated here
  NAN_DEPRECATED inline v8::Local<v8::Value>
  ^
../../../../nan/nan.h:104:40: note: expanded from macro 'NAN_DEPRECATED'
# define NAN_DEPRECATED __attribute__((deprecated))
                                       ^
../src/serialport.cpp:188:18: warning: 'Call' is deprecated [-Wdeprecated-declarations]
  data->callback.Call(1, argv);
                 ^
../../../../nan/nan.h:1739:3: note: 'Call' has been explicitly marked deprecated here
  NAN_DEPRECATED inline v8::Local<v8::Value>
  ^
../../../../nan/nan.h:104:40: note: expanded from macro 'NAN_DEPRECATED'
# define NAN_DEPRECATED __attribute__((deprecated))
                                       ^
../src/serialport.cpp:231:18: warning: 'Call' is deprecated [-Wdeprecated-declarations]
  data->callback.Call(1, argv);
                 ^
../../../../nan/nan.h:1739:3: note: 'Call' has been explicitly marked deprecated here
  NAN_DEPRECATED inline v8::Local<v8::Value>
  ^
../../../../nan/nan.h:104:40: note: expanded from macro 'NAN_DEPRECATED'
# define NAN_DEPRECATED __attribute__((deprecated))
                                       ^
../src/serialport.cpp:250:44: error: no matching member function for call to 'ToObject'
  v8::Local<v8::Object> options = info[1]->ToObject();
                                  ~~~~~~~~~^~~~~~~~
/data/data/com.termux/files/home/.node-gyp/12.4.0/include/node/v8.h:2532:44: note: candidate function not viable: requires single argument 'context',
      but no arguments were provided
  V8_WARN_UNUSED_RESULT MaybeLocal<Object> ToObject(
                                           ^
/data/data/com.termux/files/home/.node-gyp/12.4.0/include/node/v8.h:2546:35: note: candidate function not viable: requires single argument 'isolate',
      but no arguments were provided
                    Local<Object> ToObject(Isolate* isolate) const);
                                  ^
../src/serialport.cpp:285:18: warning: 'Call' is deprecated [-Wdeprecated-declarations]
  data->callback.Call(1, argv);
                 ^
../../../../nan/nan.h:1739:3: note: 'Call' has been explicitly marked deprecated here
  NAN_DEPRECATED inline v8::Local<v8::Value>
  ^
../../../../nan/nan.h:104:40: note: expanded from macro 'NAN_DEPRECATED'
# define NAN_DEPRECATED __attribute__((deprecated))
                                       ^
../src/serialport.cpp:329:14: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
    results->Set(Nan::New<v8::String>("cts").ToLocalChecked(), Nan::New<v8::Boolean>(data->cts));
             ^
/data/data/com.termux/files/home/.node-gyp/12.4.0/include/node/v8.h:3358:3: note: 'Set' has been explicitly marked deprecated here
  V8_DEPRECATE_SOON("Use maybe version",
  ^
/data/data/com.termux/files/home/.node-gyp/12.4.0/include/node/v8config.h:322:29: note: expanded from macro 'V8_DEPRECATE_SOON'
  declarator __attribute__((deprecated(message)))
                            ^
../src/serialport.cpp:330:14: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
    results->Set(Nan::New<v8::String>("dsr").ToLocalChecked(), Nan::New<v8::Boolean>(data->dsr));
             ^
/data/data/com.termux/files/home/.node-gyp/12.4.0/include/node/v8.h:3358:3: note: 'Set' has been explicitly marked deprecated here
  V8_DEPRECATE_SOON("Use maybe version",
  ^
/data/data/com.termux/files/home/.node-gyp/12.4.0/include/node/v8config.h:322:29: note: expanded from macro 'V8_DEPRECATE_SOON'
  declarator __attribute__((deprecated(message)))
                            ^
../src/serialport.cpp:331:14: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
    results->Set(Nan::New<v8::String>("dcd").ToLocalChecked(), Nan::New<v8::Boolean>(data->dcd));
             ^
/data/data/com.termux/files/home/.node-gyp/12.4.0/include/node/v8.h:3358:3: note: 'Set' has been explicitly marked deprecated here
  V8_DEPRECATE_SOON("Use maybe version",
  ^
/data/data/com.termux/files/home/.node-gyp/12.4.0/include/node/v8config.h:322:29: note: expanded from macro 'V8_DEPRECATE_SOON'
  declarator __attribute__((deprecated(message)))
                            ^
../src/serialport.cpp:336:18: warning: 'Call' is deprecated [-Wdeprecated-declarations]
  data->callback.Call(2, argv);
                 ^
../../../../nan/nan.h:1739:3: note: 'Call' has been explicitly marked deprecated here
  NAN_DEPRECATED inline v8::Local<v8::Value>
  ^
../../../../nan/nan.h:104:40: note: expanded from macro 'NAN_DEPRECATED'
# define NAN_DEPRECATED __attribute__((deprecated))
                                       ^
../src/serialport.cpp:378:14: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
    results->Set(Nan::New<v8::String>("baudRate").ToLocalChecked(), Nan::New<v8::Integer>(data->baudRate));
             ^
/data/data/com.termux/files/home/.node-gyp/12.4.0/include/node/v8.h:3358:3: note: 'Set' has been explicitly marked deprecated here
  V8_DEPRECATE_SOON("Use maybe version",
  ^
/data/data/com.termux/files/home/.node-gyp/12.4.0/include/node/v8config.h:322:29: note: expanded from macro 'V8_DEPRECATE_SOON'
  declarator __attribute__((deprecated(message)))
                            ^
../src/serialport.cpp:383:18: warning: 'Call' is deprecated [-Wdeprecated-declarations]
  data->callback.Call(2, argv);
                 ^
../../../../nan/nan.h:1739:3: note: 'Call' has been explicitly marked deprecated here
  NAN_DEPRECATED inline v8::Local<v8::Value>
  ^
../../../../nan/nan.h:104:40: note: expanded from macro 'NAN_DEPRECATED'
# define NAN_DEPRECATED __attribute__((deprecated))
                                       ^
../src/serialport.cpp:424:18: warning: 'Call' is deprecated [-Wdeprecated-declarations]
  data->callback.Call(1, argv);
                 ^
../../../../nan/nan.h:1739:3: note: 'Call' has been explicitly marked deprecated here
  NAN_DEPRECATED inline v8::Local<v8::Value>
  ^
../../../../nan/nan.h:104:40: note: expanded from macro 'NAN_DEPRECATED'
# define NAN_DEPRECATED __attribute__((deprecated))
                                       ^
../src/serialport.cpp:460:8: error: variable has incomplete type 'void'
  void init(v8::Handle<v8::Object> target) {
       ^
../src/serialport.cpp:460:34: error: expected '(' for function-style cast or type construction
  void init(v8::Handle<v8::Object> target) {
                       ~~~~~~~~~~^
../src/serialport.cpp:460:17: error: no member named 'Handle' in namespace 'v8'
  void init(v8::Handle<v8::Object> target) {
            ~~~~^
../src/serialport.cpp:460:36: error: use of undeclared identifier 'target'
  void init(v8::Handle<v8::Object> target) {
                                   ^
../src/serialport.cpp:460:43: error: expected ';' after top level declarator
  void init(v8::Handle<v8::Object> target) {
                                          ^
                                          ;
12 warnings and 9 errors generated.
make: *** [serialport.target.mk:107: Release/obj.target/serialport/src/serialport.o] Error 1
make: Leaving directory '/data/data/com.termux/files/home/mhb-js/node_modules/zigbee-service/node_modules/serialport/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/data/data/com.termux/files/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack     at ChildProcess.emit (events.js:200:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gyp ERR! System Linux 4.19.27-primeos
gyp ERR! command "/data/data/com.termux/files/usr/bin/node" "/data/data/com.termux/files/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /data/data/com.termux/files/home/mhb-js/node_modules/zigbee-service/node_modules/serialport
gyp ERR! node -v v12.4.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok 
npm WARN retry-axios@0.3.2 requires a peer of axios@* but none is installed. You must install peer dependencies yourself.
npm WARN mhb-js@1.0.0 No description
npm WARN mhb-js@1.0.0 No repository field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! serialport@6.2.2 install: `prebuild-install || node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the serialport@6.2.2 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /data/data/com.termux/files/home/.npm/_logs/2019-07-31T19_52_06_346Z-debug.log

(I installed python2 and build-essential)

Versions, Operating System and Hardware

  • serialport@6.2.2
  • Node.js v12.4.0
  • Linux / Android x86 --> primeOS
  • Beelink BT3 Pro Mini PC Intel Atom x5-Z8350 Processor
@foxxyz
Copy link

foxxyz commented Aug 6, 2019

Having the same issue on MacOS 10.14.6. Any ideas?

serialport@6.2.2
Node.js v12.7.0
3.1 Ghz Intel Core i7

@HipsterBrown
Copy link
Contributor

@foxxyz @apiel Can you try using an older version of Node.js to compile serialport? v10.16.2 is the latest LTS version. Node.js v12 has some breaking changes for native dependencies that we're still working through.

@foxxyz
Copy link

foxxyz commented Aug 12, 2019

Thanks @HipsterBrown! Good to know.

Just tried with Node v10.16.2 (MacOS 10.14.6) and serialport@6.2.2 compiles fine.

Is there any issue or board that we can track for the ongoing status on Nodev12 support?

@HipsterBrown
Copy link
Contributor

@foxxyz Are you able to use the latest version of serialport? That compiles against Node v12 successfully.

@foxxyz
Copy link

foxxyz commented Aug 14, 2019

I would, but this is occurring via a dependency in dmx which is still pinned to 6.0.4.

I will open an issue with them to update also.

@lock lock bot locked as resolved and limited conversation to collaborators Feb 28, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Development

No branches or pull requests

4 participants