lsongdev / lsongdev/node-bluetooth

Can't install on Ubuntu 18.0.4

Open
#51 1 comment 10 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
205
Forks
56
PR merge metrics
No merged PRs in 30d

Description

Hello, module can't install on ubuntu. Here the trace :

sudo node-gyp configure build
gyp info it worked if it ends with ok
gyp info using node-gyp@7.0.0
gyp info using node@14.4.0 | linux | x64
gyp info find Python using Python version 3.6.9 found at "/usr/bin/python3"
gyp info spawn /usr/bin/python3
gyp info spawn args [
gyp info spawn args '/usr/lib/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 '/home/fennia/restaurants/node_modules/node-bluetooth/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/usr/lib/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/home/fennia/.cache/node-gyp/14.4.0/include/node/common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=/home/fennia/.cache/node-gyp/14.4.0',
gyp info spawn args '-Dnode_gyp_dir=/usr/lib/node_modules/node-gyp',
gyp info spawn args '-Dnode_lib_file=/home/fennia/.cache/node-gyp/14.4.0/<(target_arch)/node.lib',
gyp info spawn args '-Dmodule_root_dir=/home/fennia/restaurants/node_modules/node-bluetooth',
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=.'
gyp info spawn args ]
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
make: Entering directory '/home/fennia/restaurants/node_modules/node-bluetooth/build'
CXX(target) Release/obj.target/BluetoothSerialPort/src/linux/BluetoothSerialPort.o
../src/linux/BluetoothSerialPort.cc:28:14: error: variable or field ‘InitAll’ declared void
void InitAll(Handle exports) {
^~~~~~
../src/linux/BluetoothSerialPort.cc:28:14: error: ‘Handle’ was not declared in this scope
../src/linux/BluetoothSerialPort.cc:28:14: note: suggested alternative: ‘rand_r’
void InitAll(Handle exports) {
^~~~~~
rand_r
../src/linux/BluetoothSerialPort.cc:28:27: error: expected primary-expression before ‘>’ token
void InitAll(Handle exports) {
^
../src/linux/BluetoothSerialPort.cc:28:29: error: ‘exports’ was not declared in this scope
void InitAll(Handle exports) {
^~~~~~~
In file included from ../src/linux/BluetoothSerialPort.cc:13:0:
../src/linux/BluetoothSerialPort.cc:36:34: error: ‘InitAll’ was not declared in this scope
NODE_MODULE(BluetoothSerialPort, InitAll)
^
/home/fennia/.cache/node-gyp/14.4.0/include/node/node.h:729:36: note: in definition of macro ‘NODE_MODULE_X’
(node::addon_register_func) (regfunc),
^~~~~~~
../src/linux/BluetoothSerialPort.cc:36:1: note: in expansion of macro ‘NODE_MODULE’
NODE_MODULE(BluetoothSerialPort, InitAll)
^~~~~~~~~~~
BluetoothSerialPort.target.mk:117: recipe for target 'Release/obj.target/BluetoothSerialPort/src/linux/BluetoothSerialPort.o' failed
make: *** [Release/obj.target/BluetoothSerialPort/src/linux/BluetoothSerialPort.o] Error 1
make: Leaving directory '/home/fennia/restaurants/node_modules/node-bluetooth/build'
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/lib/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack at ChildProcess.emit (events.js:315:20)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:276:12)
gyp ERR! System Linux 4.15.0-65-generic
gyp ERR! command "/usr/bin/node" "/usr/bin/node-gyp" "configure" "build"
gyp ERR! cwd /home/fennia/restaurants/node_modules/node-bluetooth
gyp ERR! node -v v14.4.0
gyp ERR! node-gyp -v v7.0.0
gyp ERR! not ok

Can somebody help ??
Thanks.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with src/linux/BluetoothSerialPort.cc and binding.gyp, then reproduce sudo node-gyp configure build on Ubuntu 18.04 with Node 14.4.0. Investigate the reported Handle and InitAll compilation errors; done means the module builds successfully under the reported environment.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, linux, node.js, ubuntu
Domain
build-system, embedded-iot, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.