oven-sh / bun

Incredibly fast JavaScript runtime, bundler, test runner, and package manager – all in one
https://bun.sh
Other
73.42k stars 2.7k forks source link

bun: symbol lookup error: undefined symbol: uv_async_init #5019

Open gabrielbrunop opened 1 year ago

gabrielbrunop commented 1 year ago

What version of Bun is running?

1.0.0+822a00c4d508b54f650933a73ca5f4a3af9a7983

What platform is your computer?

Linux 6.2.0-32-generic x86_64 x86_64 (Ubuntu 22.04.3)

What steps can reproduce the bug?

First clone and initialize node-webrtc-examples:

$ git clone https://github.com/node-webrtc/node-webrtc-examples/
$ cd node-webrtc-examples
$ bun init
  1. Bun won't download the binaries for some reason. I built them from source, but a simple npm install will do it too
  2. Delete all subfolders in the examples folder except for ping-pong
  3. Remove the node-fetch require in the lib/client/index.js file
  4. Run it with bun run index.js
  5. Go to http://localhost:3000
  6. Try the ping pong example. It'll crash with the symbol lookup error

What is the expected behavior?

I can't get Node WebRTC to work on Bun. Initially when installing using bun add wrtc it wouldn't find the binaries (and for some reason they indeed weren't there), then I built it from source but it gives me this error:

bun: symbol lookup error: /home/gabriel/Desktop/dev/node-webrtc-examples/node_modules/wrtc/build/Release/wrtc.node: undefined symbol: uv_async_init

I know this is related to libuv and I've found the line of code that's giving this error in the Node WebRTC source, here.

What do you see instead?

bun: symbol lookup error: /home/gabriel/Desktop/dev/node-webrtc-examples/node_modules/wrtc/build/Release/wrtc.node: undefined symbol: uv_async_init

Additional information

No response

jviel-beta commented 6 months ago

@Electroid Any chance this will be addressed in the near term? I'm having the same issue with the node impl of ZeroMQ Thanks!