rmculpepper / iracket

Jupyter kernel for Racket
BSD 3-Clause "New" or "Revised" License
95 stars 14 forks source link

libzmq-5 not found on Apple M1 silicon #20

Open rebcabin opened 1 year ago

rebcabin commented 1 year ago

It seems that iracket is searching for zeromq-5, but the current tagged release is for Apple M1 (and possibly everything else) is 4.3.4. In any event, the kernel won't start after I did

raco pkg install iracket
raco iracket install
jupyter lab build

These commands appear to succeed, though I did get a warning about libzmg-5.dylib on the initial raco pkg iracket install command. I could not copy the text nor reproduce the error after installing iracket again via the sequence:

raco pkg remove iracket
raco pkg install iracket

jupyter lab fails as follows once I pick the iracket kernel and attempt to evaluate a cell containing #lang iracket/lang:

[I 2023-02-22 12:35:26.790 ServerApp] AsyncIOLoopKernelRestarter: restarting kernel (5/5), new random ports
Kernel starting.
zmq-socket: could not find libzmq library
  error: "ffi-lib: could not load foreign library\n  path: libzmq.5.dylib\n  system error: dlopen(libzmq.5.dylib, 0x0006): tried: 'libzmq.5.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OSlibzmq.5.dylib' (no such file), '/usr/lib/libzmq.5.dylib' (no such file, not in dyld cache), 'libzmq.5.dylib' (no such file), '/usr/lib/libzmq.5.dylib' (no such file, not in dyld cache)"
  context...:
   /Applications/Racket v8.8/collects/racket/contract/private/arrow-val-first.rkt:555:3
   /Users/brian/Library/Racket/8.8/pkgs/iracket/private/jupyter.rkt:324:2: serve
   /Users/brian/Library/Racket/8.8/pkgs/iracket/private/jupyter.rkt:321:0: call-with-services
   /Users/brian/Library/Racket/8.8/pkgs/iracket/iracket.rkt:12:0: start-kernel
   body of (submod "/Users/brian/Library/Racket/8.8/pkgs/iracket/iracket.rkt" main)

https://github.com/zeromq/libzmq/tags

jonshao commented 1 year ago

I'm not knowledgable but this seems to be an issue with the zmq bindings dependency: https://github.com/rmculpepper/racket-zeromq/issues/6

I got my kernel to work by symlinking /Applications/Racket v8.9/lib/libzmq.5.dylib to /opt/homebrew/Cellar/zeromq/4.3.4/lib/libzmq.5.dylib.