chrisa / node-dtrace-provider

Native DTrace probes for node.js apps
Other
319 stars 70 forks source link

runtime err on startup: dyld: Symbol not found: _usdt_create_provider #118

Open thom-nic opened 6 years ago

thom-nic commented 6 years ago
$npm tst
....

dyld: lazy symbol binding failed: Symbol not found: _usdt_create_provider
  Referenced from: PROJECT/node_modules/bunyan/node_modules/dtrace-provider/build/Release/DTraceProviderBindings.node
  Expected in: flat namespace

dyld: Symbol not found: _usdt_create_provider
  Referenced from: PROJECT/node_modules/bunyan/node_modules/dtrace-provider/build/Release/DTraceProviderBindings.node
  Expected in: flat namespace

$ npm ls dtrace-provider
PROJECT
└─┬ snmpjs@0.1.8
  └─┬ bunyan@1.7.1
    └── dtrace-provider@0.6.0 

$ uname -a
Darwin HOSTNAME 17.5.0 Darwin Kernel Version 17.5.0 

$node --version
v8.9.3

High Sierra 10.13.4. This actually started breaking after I upgraded some packages that depend on node-pre-gyp. I've tried deleting node_modules and re-installing; builds fine. Most frustrating, I can't seem to exclude it with npm i --no-optional. I can only find one other reference to this issue at hexojs/hexo#2803 and they "fixed" it by forking bunyan and removing the dependency on dtrace-provider :(

timmywil commented 5 years ago

@thom-nic did you figure out a workaround?

hellerve commented 5 years ago

I can still reproduce this issue on OS X 10.14.1 and node v11.4.0. Are there any updates?

thom-nic commented 5 years ago

In the nicest way possible, I hate that any project that uses bunyan, pulls this in and always causes headaches. bunyan seems to insist that it's not an issue: https://github.com/trentm/node-bunyan/issues?utf8=%E2%9C%93&q=is%3Aissue+dtrace :(

I've resorted to rm -r node_modules/dtrace_provider. You could turn this into a postInstall script in your package.json. Sorry it's the best I've got :(

andrewgould commented 5 years ago

@thom-nic Do you have binutils installed via Homebrew? I was encountering the same problem as you (https://stackoverflow.com/questions/54014971/macos-dyld-symbol-not-found-usdt-create-provider) and managed to fix it by removing this package.

Nazgolze commented 3 years ago

I'm running into this issue as well on an M1 mac (yes it's bunyan @thom-nic haha). In my case, I think it's due to lack of ARM support.