Skip to content

Issues with Ubuntu docker image #2

@TylerLeonhardt

Description

@TylerLeonhardt

Hi there,

Not sure if this is possible but I attempted to install this in an ubuntu docker container on macOS.

I received the following error:

# ls
    Dockerfile  LICENSE  README.md	app.js	node_modules  package-lock.json  package.json
# clear
# npm install blync
npm info it worked if it ends with ok
npm info using npm@5.0.3
npm info using node@v8.1.2
npm http fetch GET 200 https://registry.npmjs.org/blync 37ms (from cache)
npm http fetch GET 200 https://registry.npmjs.org/node-hid 8ms (from cache)
npm info lifecycle blync@1.0.0~preinstall: blync@1.0.0
npm info lifecycle node-hid@0.3.2~preinstall: node-hid@0.3.2

> node-hid@0.3.2 preinstall /usr/mtn/app/node_modules/node-hid
> sh get-hidapi.sh

Cloning into 'hidapi'...
remote: Counting objects: 2006, done.
remote: Total 2006 (delta 0), reused 0 (delta 0), pack-reused 2006
Receiving objects: 100% (2006/2006), 2.72 MiB | 0 bytes/s, done.  Receiving objects: 100% (2006/2006)
Resolving deltas: 100% (1174/1174), done.       Resolving deltas:   0% (0/1174)
Checking connectivity... done.
npm info linkStuff blync@1.0.0
npm info linkStuff node-hid@0.3.2
npm info lifecycle blync@1.0.0~install: blync@1.0.0
npm info lifecycle node-hid@0.3.2~install: node-hid@0.3.2

> node-hid@0.3.2 install /usr/mtn/app/node_modules/node-hid
> sh install.sh

gyp info it worked if it ends with ok
gyp info using node-gyp@3.6.2
gyp info using node@8.1.2 | linux | x64
gyp info spawn /usr/bin/python2
gyp info spawn args [ '/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'make',
gyp info spawn args   '-I',
gyp info spawn args   '/usr/mtn/app/node_modules/node-hid/build/config.gypi',
    gyp info spawn args   '-I',
       gyp info spawn args   '/usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
   gyp info spawn args   '/root/.node-gyp/8.1.2/include/node/common.gypi',
    gyp info spawn args   '-Dlibrary=shared_library',
     gyp info spawn args   '-Dvisibility=default',
  gyp info spawn args   '-Dnode_root_dir=/root/.node-gyp/8.1.2',
gyp info spawn args   '-Dnode_gyp_dir=/usr/local/lib/node_modules/npm/node_modules/node-gyp',
       gyp info spawn args   '-Dnode_lib_file=/root/.node-gyp/8.1.2/<(target_arch)/node.lib',
     gyp info spawn args   '-Dmodule_root_dir=/usr/mtn/app/node_modules/node-hid',
  gyp info spawn args   '-Dnode_engine=v8',
   gyp info spawn args   '--depth=.',
       gyp info spawn args   '--no-parallel',
     gyp info spawn args   '--generator-output',
gyp info spawn args   'build',
      gyp info spawn args   '-Goutput_dir=.' ]
      make: Entering directory '/usr/mtn/app/node_modules/node-hid/build'
 gyp info spawn make
      gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
  CC(target) Release/obj.target/hidapi/hidapi/libusb/hid.o
  ../hidapi/libusb/hid.c: In function 'hid_read_timeout':
 ../hidapi/libusb/hid.c:1078:6: warning: variable 'bytes_read' might be clobbered by 'longjmp' or 'vfork' [-Wclobbered]
   int bytes_read = -1;
     ^
AR(target) Release/obj.target/hidapi.a
COPY Release/hidapi.a
       CXX(target) Release/obj.target/HID/src/HID.o
   ../src/HID.cc: In member function 'virtual v8::Handle<v8::Value> JSException::asV8Exception() const':
  ../src/HID.cc:50:71: error: 'New' is not a member of 'v8::String'
      virtual Handle<Value> asV8Exception() const { return ThrowException(String::New(message().c_str())); }
   ^
      ../src/HID.cc:50:101: error: 'ThrowException' was not declared in this scope
     virtual Handle<Value> asV8Exception() const { return ThrowException(String::New(message().c_str())); }
  ^
   ../src/HID.cc: At global scope:
  ../src/HID.cc:58:1: error: expected class-name before '{' token
  {
    ^
     ../src/HID.cc:61:38: error: 'Arguments' does not name a type
      static Handle<Value> devices(const Arguments& args);
^
 ../src/HID.cc:76:34: error: 'Arguments' does not name a type
static Handle<Value> New(const Arguments& args);
    ^
     ../src/HID.cc:77:35: error: 'Arguments' does not name a type
    static Handle<Value> read(const Arguments& args);
^
 ../src/HID.cc:78:36: error: 'Arguments' does not name a type
  static Handle<Value> write(const Arguments& args);
^
 ../src/HID.cc:79:36: error: 'Arguments' does not name a type
static Handle<Value> close(const Arguments& args);
      ^
 ../src/HID.cc:80:45: error: 'Arguments' does not name a type
static Handle<Value> setNonBlocking(const Arguments& args);
^
 ../src/HID.cc:81:47: error: 'Arguments' does not name a type
static Handle<Value> getFeatureReport(const Arguments& args);
      ^
       ../src/HID.cc:83:48: error: 'Arguments' does not name a type
      static Handle<Value> sendFeatureReport(const Arguments& args);
    ^
       ../src/HID.cc:86:25: error: 'uv_work_t' has not been declared
       static void recvAsync(uv_work_t* req);
      ^
       ../src/HID.cc:87:29: error: 'uv_work_t' has not been declared
       static void recvAsyncDone(uv_work_t* req);
^
 ../src/HID.cc:177:16: error: variable or field 'recvAsync' declared void
  HID::recvAsync(uv_work_t* req)
^
 ../src/HID.cc:177:16: error: 'uv_work_t' was not declared in this scope
  ../src/HID.cc:177:27: error: 'req' was not declared in this scope
    HID::recvAsync(uv_work_t* req)
     ^
      In file included from ../src/HID.cc:30:0:
       /root/.node-gyp/8.1.2/include/node/v8.h: In instantiation of 'static void v8::NonCopyablePersistentTraits<T>::Uncompilable() [with O = v8::Object; T = v8::Object]':
     /root/.node-gyp/8.1.2/include/node/v8.h:613:17:   required from 'static void v8::NonCopyablePersistentTraits<T>::Copy(const v8::Persistent<S, M>&, v8::NonCopyablePersistentTraits<T>::NonCopyablePersistent*) [with S = v8::Object; M = v8::NonCopyablePersistentTraits<v8::Object>; T = v8::Object; v8::NonCopyablePersistentTraits<T>::NonCopyablePersistent = v8::Persistent<v8::Object>]'
       /root/.node-gyp/8.1.2/include/node/v8.h:8724:21:   required from 'void v8::Persistent<T, M>::Copy(const v8::Persistent<S, M>&) [with S = v8::Object; M2 = v8::NonCopyablePersistentTraits<v8::Object>; T = v8::Object; M = v8::NonCopyablePersistentTraits<v8::Object>]'
 /root/.node-gyp/8.1.2/include/node/v8.h:679:14:   required from 'v8::Persistent<T, M>::Persistent(const v8::Persistent<T, M>&) [with T = v8::Object; M = v8::NonCopyablePersistentTraits<v8::Object>]'
 ../src/HID.cc:94:17:   required from here
  /root/.node-gyp/8.1.2/include/node/v8.h:159:37: error: cannot convert 'v8::Primitive*' to 'v8::Object* volatile' in assignment
     *(static_cast<T* volatile*>(0)) = static_cast<S*>(0);      \
^
 /root/.node-gyp/8.1.2/include/node/v8.h:617:5: note: in expansion of macro 'TYPE_CHECK'
     TYPE_CHECK(O, Primitive);
   ^
    /root/.node-gyp/8.1.2/include/node/v8.h: In instantiation of 'static void v8::NonCopyablePersistentTraits<T>::Uncompilable() [with O = v8::Object; T = v8::Function]':
    /root/.node-gyp/8.1.2/include/node/v8.h:613:17:   required from 'static void v8::NonCopyablePersistentTraits<T>::Copy(const v8::Persistent<S, M>&, v8::NonCopyablePersistentTraits<T>::NonCopyablePersistent*) [with S = v8::Function; M = v8::NonCopyablePersistentTraits<v8::Function>; T = v8::Function; v8::NonCopyablePersistentTraits<T>::NonCopyablePersistent = v8::Persistent<v8::Function>]'
      /root/.node-gyp/8.1.2/include/node/v8.h:8724:21:   required from 'void v8::Persistent<T, M>::Copy(const v8::Persistent<S, M>&) [with S = v8::Function; M2 = v8::NonCopyablePersistentTraits<v8::Function>; T = v8::Function; M = v8::NonCopyablePersistentTraits<v8::Function>]'
/root/.node-gyp/8.1.2/include/node/v8.h:679:14:   required from 'v8::Persistent<T, M>::Persistent(const v8::Persistent<T, M>&) [with T = v8::Function; M = v8::NonCopyablePersistentTraits<v8::Function>]'
    ../src/HID.cc:94:17:   required from here
     /root/.node-gyp/8.1.2/include/node/v8.h:159:37: error: cannot convert 'v8::Primitive*' to 'v8::Object* volatile' in assignment
*(static_cast<T* volatile*>(0)) = static_cast<S*>(0);      \
 ^
    /root/.node-gyp/8.1.2/include/node/v8.h:617:5: note: in expansion of macro 'TYPE_CHECK'
TYPE_CHECK(O, Primitive);
      ^
       ../src/HID.cc: In member function 'virtual v8::Handle<v8::Value> JSException::asV8Exception() const':
      ../src/HID.cc:50:104: warning: control reaches end of non-void function [-Wreturn-type]
virtual Handle<Value> asV8Exception() const { return ThrowException(String::New(message().c_str())); }
      ^
 HID.target.mk:104: recipe for target 'Release/obj.target/HID/src/HID.o' failed
       make: *** [Release/obj.target/HID/src/HID.o] Error 1
   make: Leaving directory '/usr/mtn/app/node_modules/node-hid/build'
       gyp ERR! build error
    gyp ERR! stack Error: `make` failed with exit code: 2
 gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:258:23)
      gyp ERR! stack     at emitTwo (events.js:125:13)
gyp ERR! stack     at ChildProcess.emit (events.js:213:7)
 gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:197:12)
     gyp ERR! System Linux 4.9.30-moby
      gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "build" "install"
    gyp ERR! cwd /usr/mtn/app/node_modules/node-hid
   gyp ERR! node -v v8.1.2
  gyp ERR! node-gyp -v v3.6.2
     gyp ERR! not ok
     npm info lifecycle node-hid@0.3.2~install: Failed to exec install script
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-hid@0.3.2 install: `sh install.sh`
npm ERR! Exit status 1
      npm ERR!
       npm ERR! Failed at the node-hid@0.3.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!     /root/.npm/_logs/2017-06-22T05_55_55_590Z-debug.log
    #

Let me know what you think.

I appreciate any assistance!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions