node-hackrf
node-hackrf copied to clipboard
node-gyp v8 deprecated build error on install
Hi,
Nice project here but quite old now.
I got a V8 deprecated error:
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | darwin | x64
gyp info find Python using Python version 2.7.16 found at "/System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python"
gyp info spawn /System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python
gyp info spawn args [
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 '/Users/7s4r/Projects/radiocar/node_modules/hackrf/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 '/Users/7s4r/Library/Caches/node-gyp/12.19.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=/Users/7s4r/Library/Caches/node-gyp/12.19.0',
gyp info spawn args '-Dnode_gyp_dir=/usr/local/lib/node_modules/npm/node_modules/node-gyp',
gyp info spawn args '-Dnode_lib_file=/Users/7s4r/Library/Caches/node-gyp/12.19.0/<(target_arch)/node.lib',
gyp info spawn args '-Dmodule_root_dir=/Users/7s4r/Projects/radiocar/node_modules/hackrf',
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' ]
CC(target) Release/obj.target/libusb/deps/libusb/libusb/core.o
../deps/libusb/libusb/core.c:2241:35: warning: comparison of integers of different signs: 'int' and 'unsigned long' [-Wsign-compare]
if (header_len < 0 || header_len >= sizeof(buf)) {
~~~~~~~~~~ ^ ~~~~~~~~~~~
../deps/libusb/libusb/core.c:2250:44: warning: comparison of integers of different signs: 'int' and 'unsigned long' [-Wsign-compare]
if (text_len < 0 || text_len + header_len >= sizeof(buf)) {
~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~
2 warnings generated.
CC(target) Release/obj.target/libusb/deps/libusb/libusb/descriptor.o
CC(target) Release/obj.target/libusb/deps/libusb/libusb/hotplug.o
CC(target) Release/obj.target/libusb/deps/libusb/libusb/io.o
CC(target) Release/obj.target/libusb/deps/libusb/libusb/strerror.o
CC(target) Release/obj.target/libusb/deps/libusb/libusb/sync.o
CC(target) Release/obj.target/libusb/deps/libusb/libusb/os/poll_posix.o
CC(target) Release/obj.target/libusb/deps/libusb/libusb/os/threads_posix.o
CC(target) Release/obj.target/libusb/deps/libusb/libusb/os/darwin_usb.o
../deps/libusb/libusb/os/darwin_usb.c:344:3: warning: 'objc_registerThreadWithCollector' is deprecated: it does nothing. Define OBJC_SILENCE_GC_DEPRECATIONS=1 to temporarily silence this diagnostic. [-Wdeprecated-declarations]
objc_registerThreadWithCollector();
^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/objc/objc-auto.h:243:1: note: 'objc_registerThreadWithCollector' has been explicitly marked deprecated here
OBJC_GC_DEPRECATED("it does nothing")
^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/objc/objc-auto.h:45:55: note: expanded from macro 'OBJC_GC_DEPRECATED'
# define OBJC_GC_DEPRECATED(message) __attribute__((deprecated(message ". Define OBJC_SILENCE_GC_DEPRECATIONS=1 to temporarily silence this diagnostic.")))
^
../deps/libusb/libusb/os/darwin_usb.c:1281:27: warning: expression which evaluates to zero treated as a null pointer constant of type 'IOUSBInterfaceInterface550 **' (aka 'struct IOUSBInterfaceStruct550 **') [-Wnon-literal-null-conversion]
cInterface->interface = IO_OBJECT_NULL;
^~~~~~~~~~~~~~
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/IOKit.framework/Headers/IOTypes.h:167:25: note: expanded from macro 'IO_OBJECT_NULL'
#define IO_OBJECT_NULL ((io_object_t) 0)
^~~~~~~~~~~~~~~~~
2 warnings generated.
LIBTOOL-STATIC Release/usb.a
CC(target) Release/obj.target/libhackrf/src/hackrf.o
../src/hackrf.c:922:47: warning: implicit conversion from enumeration type 'transceiver_mode_t' to different enumeration type 'hackrf_transceiver_mode' [-Wenum-conversion]
result = hackrf_set_transceiver_mode(device, TRANSCEIVER_MODE_CPLD_UPDATE);
~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
LIBTOOL-STATIC Release/hackrf.a
CXX(target) Release/obj.target/hackrf/src/bindings.o
../src/bindings.cc:9:36: error: too few arguments to function call, single argument 'context' was not specified
int index = info[0]->Uint32Value();
~~~~~~~~~~~~~~~~~~~~ ^
/Users/7s4r/Library/Caches/node-gyp/12.19.0/include/node/v8.h:2707:3: note: 'Uint32Value' declared here
V8_WARN_UNUSED_RESULT Maybe<uint32_t> Uint32Value(
^
/Users/7s4r/Library/Caches/node-gyp/12.19.0/include/node/v8config.h:368:31: note: expanded from macro 'V8_WARN_UNUSED_RESULT'
#define V8_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
^
../src/bindings.cc:30:13: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
device->Set(Nan::New("boardId").ToLocalChecked(), Nan::New(list->usb_board_ids[i]));
^
/Users/7s4r/Library/Caches/node-gyp/12.19.0/include/node/v8.h:3498:3: note: 'Set' has been explicitly marked deprecated here
V8_DEPRECATED("Use maybe version",
^
/Users/7s4r/Library/Caches/node-gyp/12.19.0/include/node/v8config.h:328:29: note: expanded from macro 'V8_DEPRECATED'
declarator __attribute__((deprecated(message)))
^
../src/bindings.cc:31:13: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
device->Set(Nan::New("usbIndex").ToLocalChecked(), Nan::New(list->usb_device_index[i]));
^
/Users/7s4r/Library/Caches/node-gyp/12.19.0/include/node/v8.h:3498:3: note: 'Set' has been explicitly marked deprecated here
V8_DEPRECATED("Use maybe version",
^
/Users/7s4r/Library/Caches/node-gyp/12.19.0/include/node/v8config.h:328:29: note: expanded from macro 'V8_DEPRECATED'
declarator __attribute__((deprecated(message)))
^
../src/bindings.cc:35:13: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
device->Set(Nan::New("serialNumber").ToLocalChecked(), serialNumber);
^
/Users/7s4r/Library/Caches/node-gyp/12.19.0/include/node/v8.h:3498:3: note: 'Set' has been explicitly marked deprecated here
V8_DEPRECATED("Use maybe version",
^
/Users/7s4r/Library/Caches/node-gyp/12.19.0/include/node/v8config.h:328:29: note: expanded from macro 'V8_DEPRECATED'
declarator __attribute__((deprecated(message)))
^
../src/bindings.cc:37:14: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
devices->Set(i, device);
^
/Users/7s4r/Library/Caches/node-gyp/12.19.0/include/node/v8.h:3507:3: note: 'Set' has been explicitly marked deprecated here
V8_DEPRECATED("Use maybe version",
^
/Users/7s4r/Library/Caches/node-gyp/12.19.0/include/node/v8config.h:328:29: note: expanded from macro 'V8_DEPRECATED'
declarator __attribute__((deprecated(message)))
^
../src/bindings.cc:45:14: error: no template named 'Handle'
void InitAll(Handle<Object> exports) {
^
4 warnings and 2 errors generated.
make: *** [Release/obj.target/hackrf/src/bindings.o] Error 1
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:194:23)
gyp ERR! stack at ChildProcess.emit (events.js:314:20)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
gyp ERR! System Darwin 19.6.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/7s4r/Projects/radiocar/node_modules/hackrf
gyp ERR! node -v v12.19.0
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
Environment
- Version of this library used: 3.1.3
- Version of the platform or framework used: Node.js v12.19.0
- Other relevant versions (language, server software, OS, browser): MacOS Catalina 10.15.6
- Other modules/plugins/libraries that might be involved: node-gyp@^5.1.0
This pull request seems to fix it. Can you merge it?