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

Errors even when the module installs #102

Open
Pajn opened this issue Aug 8, 2017 · 1 comment
Open

Errors even when the module installs #102

Pajn opened this issue Aug 8, 2017 · 1 comment

Comments

@Pajn
Copy link

Pajn commented Aug 8, 2017

I get this error:

    console.error node_modules/dtrace-provider/dtrace-provider.js:36
      { Error: Cannot find module './build/Release/DTraceProviderBindings' from 'dtrace-provider.js'
          at Resolver.resolveModule (/Users/user/project/node_modules/jest-resolve/build/index.js:179:17)
          at Resolver._getVirtualMockPath (/Users/user/project/node_modules/jest-resolve/build/index.js:296:23)
          at Resolver._getAbsolutPath (/Users/user/project/node_modules/jest-resolve/build/index.js:279:10)
          at Resolver.getModuleID (/Users/user/project/node_modules/jest-resolve/build/index.js:252:31)
          at Runtime._shouldMock (/Users/user/project/node_modules/jest-runtime/build/index.js:574:37)
          at Runtime.requireModuleOrMock (/Users/user/project/node_modules/jest-runtime/build/index.js:402:14)
          at Object.<anonymous> (/Users/user/project/node_modules/dtrace-provider/dtrace-provider.js:18:23)
          at Runtime._execModule (/Users/user/project/node_modules/jest-runtime/build/index.js:513:13)
          at Runtime.requireModule (/Users/user/project/node_modules/jest-runtime/build/index.js:329:14)
          at Runtime.requireModuleOrMock (/Users/user/project/node_modules/jest-runtime/build/index.js:405:19) code: 'MODULE_NOT_FOUND' 

Even though the compilation succeeds

> [email protected] install /Users/user/project/node_modules/dtrace-provider
> node scripts/install.js

  LD_LIBRARY_PATH=/Users/user/project/node_modules/dtrace-provider/build/Release/lib.host:/Users/user/project/node_modules/dtrace-provider/build/Release/lib.target:$LD_LIBRARY_PATH; export LD_LIBRARY_PATH; cd ../.; sh libusdt-build.sh
Building libusdt for x86_64
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
  touch Release/obj.target/libusdt.stamp
Release/obj.target/libusdt.stamp Stats {
  dev: 16777220,
  mode: 33188,
  nlink: 1,
  uid: 501,
  gid: 20,
  rdev: 0,
  blksize: 4096,
  ino: 9657142,
  size: 0,
  blocks: 0,
  atimeMs: 1502178036000,
  mtimeMs: 1502178036000,
  ctimeMs: 1502178036000,
  birthtimeMs: 1502178036000,
  atime: 2017-08-08T07:40:36.000Z,
  mtime: 2017-08-08T07:40:36.000Z,
  ctime: 2017-08-08T07:40:36.000Z,
  birthtime: 2017-08-08T07:40:36.000Z }
  c++ '-DNODE_GYP_MODULE_NAME=DTraceProviderBindings' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DBUILDING_NODE_EXTENSION' -I/Users/rasmus/.node-gyp/8.2.1/include/node -I/Users/rasmus/.node-gyp/8.2.1/src -I/Users/rasmus/.node-gyp/8.2.1/deps/uv/include -I/Users/rasmus/.node-gyp/8.2.1/deps/v8/include -I../libusdt -I../../nan  -Os -gdwarf-2 -mmacosx-version-min=10.7 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -std=gnu++0x -stdlib=libc++ -fno-rtti -fno-exceptions -fno-threadsafe-statics -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:89:35: warning: 'NewInstance' is deprecated [-Wdeprecated-declarations]
    v8::Local<Object> pd = klass->NewInstance();
                                  ^
/Users/rasmus/.node-gyp/8.2.1/include/node/v8.h:3674:52: note: 'NewInstance' has been explicitly marked deprecated here
  V8_DEPRECATED("Use maybe version", Local<Object> NewInstance() const);
                                                   ^
1 warning generated.
./Release/.deps/Release/obj.target/DTraceProviderBindings/dtrace_provider.o.d.raw Stats {
  dev: 16777220,
  mode: 33188,
  nlink: 1,
  uid: 501,
  gid: 20,
  rdev: 0,
  blksize: 4096,
  ino: 9657147,
  size: 1372,
  blocks: 8,
  atimeMs: 1502178037000,
  mtimeMs: 1502178037000,
  ctimeMs: 1502178037000,
  birthtimeMs: 1502178036000,
  atime: 2017-08-08T07:40:37.000Z,
  mtime: 2017-08-08T07:40:37.000Z,
  ctime: 2017-08-08T07:40:37.000Z,
  birthtime: 2017-08-08T07:40:36.000Z }
  c++ '-DNODE_GYP_MODULE_NAME=DTraceProviderBindings' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DBUILDING_NODE_EXTENSION' -I/Users/rasmus/.node-gyp/8.2.1/include/node -I/Users/rasmus/.node-gyp/8.2.1/src -I/Users/rasmus/.node-gyp/8.2.1/deps/uv/include -I/Users/rasmus/.node-gyp/8.2.1/deps/v8/include -I../libusdt -I../../nan  -Os -gdwarf-2 -mmacosx-version-min=10.7 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -std=gnu++0x -stdlib=libc++ -fno-rtti -fno-exceptions -fno-threadsafe-statics -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
./Release/.deps/Release/obj.target/DTraceProviderBindings/dtrace_probe.o.d.raw Stats {
  dev: 16777220,
  mode: 33188,
  nlink: 1,
  uid: 501,
  gid: 20,
  rdev: 0,
  blksize: 4096,
  ino: 9657150,
  size: 1366,
  blocks: 8,
  atimeMs: 1502178037000,
  mtimeMs: 1502178037000,
  ctimeMs: 1502178037000,
  birthtimeMs: 1502178037000,
  atime: 2017-08-08T07:40:37.000Z,
  mtime: 2017-08-08T07:40:37.000Z,
  ctime: 2017-08-08T07:40:37.000Z,
  birthtime: 2017-08-08T07:40:37.000Z }
  c++ '-DNODE_GYP_MODULE_NAME=DTraceProviderBindings' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DBUILDING_NODE_EXTENSION' -I/Users/rasmus/.node-gyp/8.2.1/include/node -I/Users/rasmus/.node-gyp/8.2.1/src -I/Users/rasmus/.node-gyp/8.2.1/deps/uv/include -I/Users/rasmus/.node-gyp/8.2.1/deps/v8/include -I../libusdt -I../../nan  -Os -gdwarf-2 -mmacosx-version-min=10.7 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -std=gnu++0x -stdlib=libc++ -fno-rtti -fno-exceptions -fno-threadsafe-statics -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
./Release/.deps/Release/obj.target/DTraceProviderBindings/dtrace_argument.o.d.raw Stats {
  dev: 16777220,
  mode: 33188,
  nlink: 1,
  uid: 501,
  gid: 20,
  rdev: 0,
  blksize: 4096,
  ino: 9657153,
  size: 1372,
  blocks: 8,
  atimeMs: 1502178038000,
  mtimeMs: 1502178038000,
  ctimeMs: 1502178038000,
  birthtimeMs: 1502178038000,
  atime: 2017-08-08T07:40:38.000Z,
  mtime: 2017-08-08T07:40:38.000Z,
  ctime: 2017-08-08T07:40:38.000Z,
  birthtime: 2017-08-08T07:40:38.000Z }
  c++ -bundle -undefined dynamic_lookup -Wl,-no_pie -Wl,-search_paths_first -mmacosx-version-min=10.7 -arch x86_64 -L./Release -stdlib=libc++  -o Release/DTraceProviderBindings.node Release/obj.target/DTraceProviderBindings/dtrace_provider.o Release/obj.target/DTraceProviderBindings/dtrace_probe.o Release/obj.target/DTraceProviderBindings/dtrace_argument.o -L/Users/user/project/node_modules/dtrace-provider/libusdt -l usdt
ld: warning: object file (/Users/user/project/node_modules/dtrace-provider/libusdt/libusdt.a(usdt.o)) was built for newer OSX version (10.12) than being linked (10.7)
ld: warning: object file (/Users/user/project/node_modules/dtrace-provider/libusdt/libusdt.a(usdt_dof_file.o)) was built for newer OSX version (10.12) than being linked (10.7)
ld: warning: object file (/Users/user/project/node_modules/dtrace-provider/libusdt/libusdt.a(usdt_dof_sections.o)) was built for newer OSX version (10.12) than being linked (10.7)
ld: warning: object file (/Users/user/project/node_modules/dtrace-provider/libusdt/libusdt.a(usdt_dof.o)) was built for newer OSX version (10.12) than being linked (10.7)
ld: warning: object file (/Users/user/project/node_modules/dtrace-provider/libusdt/libusdt.a(usdt_probe.o)) was built for newer OSX version (10.12) than being linked (10.7)
ld: warning: object file (/Users/user/project/node_modules/dtrace-provider/libusdt/libusdt.a(usdt_tracepoints.o)) was built for newer OSX version (10.12) than being linked (10.7)
[email protected] /Users/user/project/node_modules/dtrace-provider

With yarn I even get three sets of errors.

I'm using

❯ node --version
v8.2.1

❯ npm --version
5.3.0

❯ yarn --version
0.27.5

and OSX 10.12.6

@sotoer
Copy link

sotoer commented Aug 11, 2017

👍

Breaking here

var binding = require('./build/' + builds[i] + '/DTraceProviderBindings');

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

2 participants