How do I bundle zeromq with an electron app?
Asked Answered
R

2

7

Introducing zmq into my Electron app has proved to be onerous:

01:33:03 {master %=} rgbkrk@puter ~/code/jupyter-sidecar$ electron .
dyld: lazy symbol binding failed: Symbol not found: __ZN2v89Signature3NewEPNS_7IsolateENS_6HandleINS_16FunctionTemplateEEEiPS5_
  Referenced from: /Users/rgbkrk/code/jupyter-sidecar/node_modules/zmq/build/Release/zmq.node
  Expected in: dynamic lookup

dyld: Symbol not found: __ZN2v89Signature3NewEPNS_7IsolateENS_6HandleINS_16FunctionTemplateEEEiPS5_
  Referenced from: /Users/rgbkrk/code/jupyter-sidecar/node_modules/zmq/build/Release/zmq.node
  Expected in: dynamic lookup

/usr/local/bin/electron: line 2: 46288 Trace/BPT trap: 5       "/usr/local/lib/node_modules/electron-prebuilt/dist/Electron.app/Contents/MacOS/Electron" "$@"

How should I be bundling zmq? All I did to get it setup as part of the environment is running npm install --save zmq.

Rodrickrodrigez answered 30/4, 2015 at 6:39 Comment(0)
C
1

You can use zeromq.js.

It has the same API as zmq but features prebuilt static binaries for Node and Electron. So there is no need for a proper C/C++ compiler toolchain:

npm install zeromq

For Electron specific instructions checkout https://github.com/zeromq/zeromq.js#rebuilding-for-electron.

Congregational answered 14/11, 2018 at 10:9 Comment(0)
P
0

You probably just need to copy libzmq.dylib into the same directory as the zmq.node folder

Perni answered 2/5, 2015 at 17:35 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.