zenoh icon indicating copy to clipboard operation
zenoh copied to clipboard

[Bug] Homebrew installation of Zenoh 0.10.0 invalid plugin path

Open AngusWaller opened this issue 1 year ago • 3 comments

Describe the bug

After installing Zenoh using Homebrew per the MacOS instructions here it is not possible to run Zenoh via the command zenohd

Error Message: thread 'main' panicked at 'Plugin load failure: Library file 'libzenoh_plugin_rest.dylib' not found at commons/zenoh-util/src/std_only/lib_loader.rs:135.', zenohd/src/main.rs:97:21

Workaround: Use the plugin-search-dir command arg zenohd --plugin-search-dir /opt/homebrew/lib/

To reproduce

  1. download Zenoh
  2. run zenoh

System info

  • MacOS Ventura
  • Apple M1 Pro
  • zenohd v0.10.0-rc built with rustc 1.72.0 (2023-08-23)

AngusWaller avatar Oct 25 '23 04:10 AngusWaller

The cause of the failure is that homebrew on apple silicon by default installs binaries in /opt/homebrew/bin and libraries in /opt/homebrew/lib (Where homebrew on intel was installing in /usr/local/bin and /usl/local/lib). zenohd by default does not look into /opt/homebrew/lib and so does not find the plugins libs.

Proposal: zenohd currently looks for plugins in zenohd executable directory (as well as in a predefined list of directories). We could also make it look into <path_to_zenohd>/../lib.

OlivierHecart avatar Nov 09 '23 13:11 OlivierHecart

Until we properly fix this. A quick workaround is to point zenohd to /opt/homebrew/lib/:

zenohd --plugin-search-dir /opt/homebrew/lib

OlivierHecart avatar Nov 09 '23 14:11 OlivierHecart

I just tried with 0.11.0-rc3 and I couldn't reproduce. Is this still an issue for you @AngusWaller ?

diogomatsubara avatar May 13 '24 18:05 diogomatsubara