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

Failed to build in node v14 #132

Open
utsushiiro opened this issue May 31, 2020 · 3 comments
Open

Failed to build in node v14 #132

utsushiiro opened this issue May 31, 2020 · 3 comments

Comments

@utsushiiro
Copy link

Failed to build in the following environment.

item version
OS macOS Mojave(10.14.6)
node.js v14.3.0

The error message is:

$ V=~/dtrace-provider-rebuild npm rebuild dtrace-provider

> [email protected] install /Users/utsushiiro/sandbox/node_modules/dtrace-provider
> node-gyp rebuild || node suppress-error.js

  LD_LIBRARY_PATH=/Users/utsushiiro/sandbox/node_modules/dtrace-provider/build/Release/lib.host:/Users/utsushiiro/sandbox/node_modules/dtrace-provider/build/Release/lib.target:$LD_LIBRARY_PATH; export LD_LIBRARY_PATH; cd ../.; bash build.sh
+ buildUSDT
+ [[ -z '' ]]
+ [[ -z /Users/utsushiiro/dtrace-provider-rebuild ]]
+ unset MAKEFLAGS
++ node -e 'console.log(process.arch === '\''x64'\'' ? '\''x86_64'\'' : '\''i386'\'')'
+ export ARCH=x86_64
+ ARCH=x86_64
+ echo 'Building libusdt for x86_64'
Building libusdt for x86_64
+ [[ -z '' ]]
++ which gmake
+ MAKE=
+ [[ -z '' ]]
+ MAKE=make
+ make -C libusdt clean all
rm -f *.gch
rm -f *.o
rm -f libusdt.a
rm -f test_usdt
rm -f test_usdt32
rm -f test_usdt64
rm -f test_mem_usage
gcc -O2 -Wall -arch x86_64   -c -o usdt.o usdt.c
gcc -O2 -Wall -arch x86_64   -c -o usdt_dof_file.o usdt_dof_file.c
gcc -arch x86_64 -o usdt_tracepoints.o -c usdt_tracepoints_x86_64.s
gcc -O2 -Wall -arch x86_64   -c -o usdt_probe.o usdt_probe.c
gcc -O2 -Wall -arch x86_64   -c -o usdt_dof.o usdt_dof.c
gcc -O2 -Wall -arch x86_64   -c -o usdt_dof_sections.o usdt_dof_sections.c
rm -f libusdt.a
ar cru libusdt.a usdt.o usdt_dof_file.o usdt_tracepoints.o usdt_probe.o usdt_dof.o usdt_dof_sections.o
ranlib libusdt.a
+ LIBUSDT_STATUS=0
+ [[ 0 -ne 0 ]]
+ buildNDTP
+ [[ -z '' ]]
+ [[ -z /Users/utsushiiro/dtrace-provider-rebuild ]]
+ node-gyp rebuild -C src
  c++ '-DNODE_GYP_MODULE_NAME=DTraceProviderBindings' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-DV8_DEPRECATION_WARNINGS' '-DV8_IMMINENT_DEPRECATION_WARNINGS' '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DOPENSSL_NO_PINSHARED' '-DOPENSSL_THREADS' '-DBUILDING_NODE_EXTENSION' -I/Users/utsushiiro/Library/Caches/node-gyp/14.3.0/include/node -I/Users/utsushiiro/Library/Caches/node-gyp/14.3.0/src -I/Users/utsushiiro/Library/Caches/node-gyp/14.3.0/deps/openssl/config -I/Users/utsushiiro/Library/Caches/node-gyp/14.3.0/deps/openssl/openssl/include -I/Users/utsushiiro/Library/Caches/node-gyp/14.3.0/deps/uv/include -I/Users/utsushiiro/Library/Caches/node-gyp/14.3.0/deps/zlib -I/Users/utsushiiro/Library/Caches/node-gyp/14.3.0/deps/v8/include -I../../libusdt -I../../../nan  -O3 -gdwarf-2 -mmacosx-version-min=10.13 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -std=gnu++1y -stdlib=libc++ -fno-rtti -fno-exceptions -fno-strict-aliasing -MMD -MF ./Release/.deps/Release/obj.target/DTraceProviderBindings/dtrace_provider.o.d.raw   -c -o Release/obj.target/DTraceProviderBindings/dtrace_provider.o ../dtrace_provider.cc
../dtrace_provider.cc:35:13: error: no matching member function for call to 'Set'
    target->Set(Nan::New<String>("DTraceProvider").ToLocalChecked(), Nan::GetFunction(t).ToLocalChecked());
    ~~~~~~~~^~~
/Users/utsushiiro/Library/Caches/node-gyp/14.3.0/include/node/v8.h:3639:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
                                    ^
/Users/utsushiiro/Library/Caches/node-gyp/14.3.0/include/node/v8.h:3642:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
                                    ^
../dtrace_provider.cc:94:10: error: no matching member function for call to 'Set'
    obj->Set(Nan::To<v8::String>(info[0]).ToLocalChecked(), pd);
    ~~~~~^~~
/Users/utsushiiro/Library/Caches/node-gyp/14.3.0/include/node/v8.h:3639:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
                                    ^
/Users/utsushiiro/Library/Caches/node-gyp/14.3.0/include/node/v8.h:3642:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
                                    ^
2 errors generated.
make[1]: *** [Release/obj.target/DTraceProviderBindings/dtrace_provider.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/Users/utsushiiro/.nodenv/versions/14.3.0/lib/node_modules/npm/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 Darwin 18.7.0
gyp ERR! command "/Users/utsushiiro/.nodenv/versions/14.3.0/bin/node" "/Users/utsushiiro/.nodenv/versions/14.3.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "-C" "src"
gyp ERR! cwd /Users/utsushiiro/sandbox/node_modules/dtrace-provider/src
gyp ERR! node -v v14.3.0
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
+ NODE_GYP_STATUS=1
+ [[ 1 -ne 0 ]]
+ fail 1
+ [[ -z '' ]]
+ [[ -z /Users/utsushiiro/dtrace-provider-rebuild ]]
+ [[ '' == \h\a\r\d ]]
+ exit 0
  touch Release/obj.target/ndtp.stamp
[email protected] /Users/utsushiiro/sandbox/node_modules/dtrace-provider

This library seems to use deprecated functionality in node v12 and these have been removed in v14.
The deprecated warning messages in node v12 is:

c++ '-DNODE_GYP_MODULE_NAME=DTraceProviderBindings' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-DV8_DEPRECATION_WARNINGS' '-DV8_IMMINENT_DEPRECATION_WARNINGS' '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DOPENSSL_NO_PINSHARED' '-DOPENSSL_THREADS' '-DBUILDING_NODE_EXTENSION' -I/Users/utsushiiro/Library/Caches/node-gyp/12.16.3/include/node -I/Users/utsushiiro/Library/Caches/node-gyp/12.16.3/src -I/Users/utsushiiro/Library/Caches/node-gyp/12.16.3/deps/openssl/config -I/Users/utsushiiro/Library/Caches/node-gyp/12.16.3/deps/openssl/openssl/include -I/Users/utsushiiro/Library/Caches/node-gyp/12.16.3/deps/uv/include -I/Users/utsushiiro/Library/Caches/node-gyp/12.16.3/deps/zlib -I/Users/utsushiiro/Library/Caches/node-gyp/12.16.3/deps/v8/include -I../../libusdt -I../../../nan  -Os -gdwarf-2 -mmacosx-version-min=10.10 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -std=gnu++1y -stdlib=libc++ -fno-rtti -fno-exceptions -fno-strict-aliasing -MMD -MF ./Release/.deps/Release/obj.target/DTraceProviderBindings/dtrace_provider.o.d.raw   -c -o Release/obj.target/DTraceProviderBindings/dtrace_provider.o ../dtrace_provider.cc
../dtrace_provider.cc:35:13: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
    target->Set(Nan::New<String>("DTraceProvider").ToLocalChecked(), Nan::GetFunction(t).ToLocalChecked());
            ^
/Users/utsushiiro/Library/Caches/node-gyp/12.16.3/include/node/v8.h:3498:3: note: 'Set' has been explicitly marked deprecated here
  V8_DEPRECATED("Use maybe version",
  ^
/Users/utsushiiro/Library/Caches/node-gyp/12.16.3/include/node/v8config.h:328:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
../dtrace_provider.cc:94:10: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
    obj->Set(Nan::To<v8::String>(info[0]).ToLocalChecked(), pd);
         ^
/Users/utsushiiro/Library/Caches/node-gyp/12.16.3/include/node/v8.h:3498:3: note: 'Set' has been explicitly marked deprecated here
  V8_DEPRECATED("Use maybe version",
  ^
/Users/utsushiiro/Library/Caches/node-gyp/12.16.3/include/node/v8config.h:328:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
2 warnings generated.
  c++ '-DNODE_GYP_MODULE_NAME=DTraceProviderBindings' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-DV8_DEPRECATION_WARNINGS' '-DV8_IMMINENT_DEPRECATION_WARNINGS' '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DOPENSSL_NO_PINSHARED' '-DOPENSSL_THREADS' '-DBUILDING_NODE_EXTENSION' -I/Users/utsushiiro/Library/Caches/node-gyp/12.16.3/include/node -I/Users/utsushiiro/Library/Caches/node-gyp/12.16.3/src -I/Users/utsushiiro/Library/Caches/node-gyp/12.16.3/deps/openssl/config -I/Users/utsushiiro/Library/Caches/node-gyp/12.16.3/deps/openssl/openssl/include -I/Users/utsushiiro/Library/Caches/node-gyp/12.16.3/deps/uv/include -I/Users/utsushiiro/Library/Caches/node-gyp/12.16.3/deps/zlib -I/Users/utsushiiro/Library/Caches/node-gyp/12.16.3/deps/v8/include -I../../libusdt -I../../../nan  -Os -gdwarf-2 -mmacosx-version-min=10.10 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -std=gnu++1y -stdlib=libc++ -fno-rtti -fno-exceptions -fno-strict-aliasing -MMD -MF ./Release/.deps/Release/obj.target/DTraceProviderBindings/dtrace_probe.o.d.raw   -c -o Release/obj.target/DTraceProviderBindings/dtrace_probe.o ../dtrace_probe.cc
../dtrace_probe.cc:31:13: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
    target->Set(Nan::New<String>("DTraceProbe").ToLocalChecked(), Nan::GetFunction(t).ToLocalChecked());
            ^
/Users/utsushiiro/Library/Caches/node-gyp/12.16.3/include/node/v8.h:3498:3: note: 'Set' has been explicitly marked deprecated here
  V8_DEPRECATED("Use maybe version",
  ^
/Users/utsushiiro/Library/Caches/node-gyp/12.16.3/include/node/v8config.h:328:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
../dtrace_probe.cc:96:54: warning: 'Get' is deprecated: Use maybe version [-Wdeprecated-declarations]
      argv[i] = this->arguments[i]->ArgumentValue(a->Get(i));
                                                     ^
/Users/utsushiiro/Library/Caches/node-gyp/12.16.3/include/node/v8.h:3557:3: note: 'Get' has been explicitly marked deprecated here
  V8_DEPRECATED("Use maybe version", Local<Value> Get(uint32_t index));
  ^
/Users/utsushiiro/Library/Caches/node-gyp/12.16.3/include/node/v8config.h:328:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
2 warnings generated.
  c++ '-DNODE_GYP_MODULE_NAME=DTraceProviderBindings' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-DV8_DEPRECATION_WARNINGS' '-DV8_IMMINENT_DEPRECATION_WARNINGS' '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DOPENSSL_NO_PINSHARED' '-DOPENSSL_THREADS' '-DBUILDING_NODE_EXTENSION' -I/Users/utsushiiro/Library/Caches/node-gyp/12.16.3/include/node -I/Users/utsushiiro/Library/Caches/node-gyp/12.16.3/src -I/Users/utsushiiro/Library/Caches/node-gyp/12.16.3/deps/openssl/config -I/Users/utsushiiro/Library/Caches/node-gyp/12.16.3/deps/openssl/openssl/include -I/Users/utsushiiro/Library/Caches/node-gyp/12.16.3/deps/uv/include -I/Users/utsushiiro/Library/Caches/node-gyp/12.16.3/deps/zlib -I/Users/utsushiiro/Library/Caches/node-gyp/12.16.3/deps/v8/include -I../../libusdt -I../../../nan  -Os -gdwarf-2 -mmacosx-version-min=10.10 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -std=gnu++1y -stdlib=libc++ -fno-rtti -fno-exceptions -fno-strict-aliasing -MMD -MF ./Release/.deps/Release/obj.target/DTraceProviderBindings/dtrace_argument.o.d.raw   -c -o Release/obj.target/DTraceProviderBindings/dtrace_argument.o ../dtrace_argument.cc
../dtrace_argument.cc:55:60: warning: 'Get' is deprecated: Use maybe version [-Wdeprecated-declarations]
    v8::Local<Object> l_JSON = Nan::To<v8::Object>(global->Get(json)).ToLocalChecked();
                                                           ^
/Users/utsushiiro/Library/Caches/node-gyp/12.16.3/include/node/v8.h:3553:3: note: 'Get' has been explicitly marked deprecated here
  V8_DEPRECATED("Use maybe version", Local<Value> Get(Local<Value> key));
  ^
/Users/utsushiiro/Library/Caches/node-gyp/12.16.3/include/node/v8config.h:328:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
../dtrace_argument.cc:57:43: warning: 'Get' is deprecated: Use maybe version [-Wdeprecated-declarations]
      = v8::Local<Function>::Cast(l_JSON->Get(Nan::New<String>("stringify").ToLocalChecked()));
                                          ^
/Users/utsushiiro/Library/Caches/node-gyp/12.16.3/include/node/v8.h:3553:3: note: 'Get' has been explicitly marked deprecated here
  V8_DEPRECATED("Use maybe version", Local<Value> Get(Local<Value> key));
  ^
/Users/utsushiiro/Library/Caches/node-gyp/12.16.3/include/node/v8config.h:328:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
@rkesters
Copy link

I'm having the same issue

@rkesters
Copy link

Issue was resolved by update npm to version 7.7.0 , node version is 14.16.0

@ozgeneral
Copy link

fwiw for future googlers, I ran into a similar failure and ended up here, and issue ended up being about stackvis being outdated which depends on dtrace-provider. electron-builder was trying to build that and causing a failure with very similar stacktrace

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants