Closed sutyum closed 11 months ago
pip install finishes without error.
However, running the zenoh server shows the same error:
[2022-10-22T05:31:50Z ERROR zenohd] Plugin load failure: Library file 'libzplugin_rest.dylib' not found at commons/zenoh-util/src/lib_loader.rs:134.
Log:
zenohd -e tcp/localhost:7447 zenoh-python/git/master
[2022-10-22T05:31:50Z INFO zenohd] zenohd v0.6.0-beta.1 built with rustc 1.64.0 (a55dd71d5 2022-09-19)
[2022-10-22T05:31:50Z INFO zenohd] Initial conf: {"id":"B62C89D9990646B5A4725A1E23D7DD95","mode":"router","connect":{"endpoints":["tcp/localhost:7447"]},"listen":{"endpoints":["tcp/0.0.0.0:7447"]},"scouting":{"timeout":null,"delay":null,"multicast":{"enabled":true,"address":null,"interface":null,"autoconnect":null,"listen":null},"gossip":{"enabled":null,"autoconnect":null}},"timestamping":{"enabled":null,"drop_future_timestamp":null},"queries_default_timeout":null,"routing":{"peer":{"mode":null}},"aggregation":{"subscribers":[],"publishers":[]},"transport":{"unicast":{"accept_timeout":10000,"accept_pending":100,"max_sessions":1000,"max_links":1},"multicast":{"join_interval":2500,"max_sessions":1000},"qos":{"enabled":true},"link":{"tx":{"sequence_number_resolution":268435456,"lease":10000,"keep_alive":4,"batch_size":65535,"queue":{"size":{"control":1,"real_time":1,"interactive_high":1,"interactive_low":1,"data_high":2,"data":4,"data_low":4,"background":4},"backoff":100},"threads":3},"rx":{"buffer_size":65535,"max_message_size":1073741824},"tls":{"root_ca_certificate":null,"server_private_key":null,"server_certificate":null,"client_auth":null,"client_private_key":null,"client_certificate":null}},"shared_memory":{"enabled":true},"auth":{"usrpwd":{"user":null,"password":null,"dictionary_file":null},"pubkey":{"public_key_pem":null,"private_key_pem":null,"public_key_file":null,"private_key_file":null,"key_size":null,"known_keys_file":null}}},"adminspace":{"permissions":{"read":true,"write":false}},"plugins_search_dirs":[],"plugins":{"rest":{"http_port":"8000"}}}
[2022-10-22T05:31:50Z ERROR zenohd] Plugin load failure: Library file 'libzplugin_rest.dylib' not found at commons/zenoh-util/src/lib_loader.rs:134.
[2022-10-22T05:31:50Z INFO zenoh::net::runtime] Using PID: B62C89D9990646B5A4725A1E23D7DD95
[2022-10-22T05:31:50Z INFO zenoh::net::runtime::orchestrator] zenohd can be reached on tcp/192.168.10.198:7447
[2022-10-22T05:31:50Z INFO zenoh::net::runtime::orchestrator] zenohd listening scout messages on 224.0.0.224:7446
[2022-10-22T05:31:50Z INFO zenohd] Finished loading plugins
I've transferred the issue from zenoh-python to zenoh repository since it is related zenohd.
Describe the bug
Unable to install zenoh following the instructions provided in the documentation.
brew install zenoh zenoh-python/git/master ==> Downloading https://download.eclipse.org/zenoh/zenoh-c/0.6.0-beta.1/aarch64-apple-darwin/zenoh-c-0.6.0-beta.1-aarch64-apple-darwin.zip Already downloaded: /Users/satyamtiwary/Library/Caches/Homebrew/downloads/1bf23d15a9af56ca1af2bc3af4504ea5244504e8c6bbd9984ef8e1aeb04b2b5d--zenoh-c-0.6.0-beta.1-aarch64-apple-darwin.zip ==> Downloading https://download.eclipse.org/zenoh/zenoh/0.6.0-beta.1/aarch64-apple-darwin/zenoh-0.6.0-beta.1-aarch64-apple-darwin.zip Already downloaded: /Users/satyamtiwary/Library/Caches/Homebrew/downloads/c6dbe1f9f441cd1e9ed1aa7258bf8b04b5ff04b683de6a1478088de15c31509e--zenoh-0.6.0-beta.1-aarch64-apple-darwin.zip ==> Installing zenoh from eclipse-zenoh/zenoh ==> Installing dependencies for eclipse-zenoh/zenoh/zenoh: libzenohc ==> Installing eclipse-zenoh/zenoh/zenoh dependency: libzenohc Error: An exception occurred within a child process: Errno::ENOENT: No such file or directory - libzenohc.dylib
To reproduce
brew tap eclipse-zenoh/homebrew-zenoh
brew install zenoh
System info
- Platform: Mac OS Monterey (12.6)
- CPU: Apple Silicon M1 Max
This Problem is caused due to .dylib
names mismatch of zenoh-plugin-rest
and zenoh-plugin-storage
which in the formulas has been mentioned as zenoh-plugin-rest.rb "libzplugin_rest.dylib"
and zenoh-plugin-storages.rb "libzplugin_storage_manager.dylib"
respectively.
However the release files have the .dylib
named as "libzenoh_plugin_rest.dylib"
and "libzenoh_plugin_storage_manager.dylib"
And just by replacing the lines in the formulas with the actual .dylib
names in a Fork
Then following the below commands
brew tap shabbir-hasan/homebrew-zenoh
brew install zenoh
The installation went successfully as it should have been.
pip install finishes without error.
However, running the zenoh server shows the same error:
[2022-10-22T05:31:50Z ERROR zenohd] Plugin load failure: Library file 'libzplugin_rest.dylib' not found at commons/zenoh-util/src/lib_loader.rs:134.
Log:
zenohd -e tcp/localhost:7447 zenoh-python/git/master [2022-10-22T05:31:50Z INFO zenohd] zenohd v0.6.0-beta.1 built with rustc 1.64.0 (a55dd71d5 2022-09-19) [2022-10-22T05:31:50Z INFO zenohd] Initial conf: {"id":"B62C89D9990646B5A4725A1E23D7DD95","mode":"router","connect":{"endpoints":["tcp/localhost:7447"]},"listen":{"endpoints":["tcp/0.0.0.0:7447"]},"scouting":{"timeout":null,"delay":null,"multicast":{"enabled":true,"address":null,"interface":null,"autoconnect":null,"listen":null},"gossip":{"enabled":null,"autoconnect":null}},"timestamping":{"enabled":null,"drop_future_timestamp":null},"queries_default_timeout":null,"routing":{"peer":{"mode":null}},"aggregation":{"subscribers":[],"publishers":[]},"transport":{"unicast":{"accept_timeout":10000,"accept_pending":100,"max_sessions":1000,"max_links":1},"multicast":{"join_interval":2500,"max_sessions":1000},"qos":{"enabled":true},"link":{"tx":{"sequence_number_resolution":268435456,"lease":10000,"keep_alive":4,"batch_size":65535,"queue":{"size":{"control":1,"real_time":1,"interactive_high":1,"interactive_low":1,"data_high":2,"data":4,"data_low":4,"background":4},"backoff":100},"threads":3},"rx":{"buffer_size":65535,"max_message_size":1073741824},"tls":{"root_ca_certificate":null,"server_private_key":null,"server_certificate":null,"client_auth":null,"client_private_key":null,"client_certificate":null}},"shared_memory":{"enabled":true},"auth":{"usrpwd":{"user":null,"password":null,"dictionary_file":null},"pubkey":{"public_key_pem":null,"private_key_pem":null,"public_key_file":null,"private_key_file":null,"key_size":null,"known_keys_file":null}}},"adminspace":{"permissions":{"read":true,"write":false}},"plugins_search_dirs":[],"plugins":{"rest":{"http_port":"8000"}}} [2022-10-22T05:31:50Z ERROR zenohd] Plugin load failure: Library file 'libzplugin_rest.dylib' not found at commons/zenoh-util/src/lib_loader.rs:134. [2022-10-22T05:31:50Z INFO zenoh::net::runtime] Using PID: B62C89D9990646B5A4725A1E23D7DD95 [2022-10-22T05:31:50Z INFO zenoh::net::runtime::orchestrator] zenohd can be reached on tcp/192.168.10.198:7447 [2022-10-22T05:31:50Z INFO zenoh::net::runtime::orchestrator] zenohd listening scout messages on 224.0.0.224:7446 [2022-10-22T05:31:50Z INFO zenohd] Finished loading plugins
Even After having a successful installation of zenoh
with homebrew, the issue of missing libzenoh_plugin_rest.dylib
persisted.
After looking at the source code commons/zenoh-util/src/lib_loader.rs
came to realise that it looks for the .dylib
in the following locations "/usr/local/lib:/usr/lib:~/.zenoh/lib"
instead of homebrew default lib folder which is $HOMEBREW_PREFIX/lib
and in this folder homebrew link the .dylib
of the installed programs.
Since I am not an expert in writing hombrew formulas (hence couldn't made these changes in my fork), , After the successful installation I just did the following steps manually to get it working flawlessly.
mkdir -pv $HOME/.zenoh/lib
ln -s $HOMEBREW_PREFIX/Cellar/zenoh-plugin-rest/0.7.2-rc/lib/libzenoh_plugin_rest.dylib $HOME/.zenoh/lib/libzenoh_plugin_rest.dylib
ln -s $HOMEBREW_PREFIX/Cellar/zenoh-plugin-storages/0.7.2-rc/lib/libzenoh_plugin_storage_manager.dylib $HOME/.zenoh/lib/libzenoh_plugin_storage_manager.dylib
And then tested it with this command zenohd -e tcp/localhost:7447
, the output has showed that it has found the missing .dylib
and have successfully loaded it.
shabbirhasan on Shabbirs-MBP at ~ on ☁️
zenohd -e tcp/localhost:7447
[2023-07-01T15:25:46Z INFO zenohd] zenohd v0.7.0-rc-401-gb9103c3d built with rustc 1.70.0 (90c541806 2023-05-31)
[2023-07-01T15:25:46Z INFO zenohd] Initial conf: {"id":"db64ad2e7ab09905e27d35cbde29911a","mode":"router","connect":{"endpoints":["tcp/localhost:7447"]},"listen":{"endpoints":["tcp/[::]:7447"]},"scouting":{"timeout":null,"delay":null,"multicast":{"enabled":true,"address":null,"interface":null,"autoconnect":null,"listen":null},"gossip":{"enabled":null,"multihop":null,"autoconnect":null}},"timestamping":{"enabled":null,"drop_future_timestamp":null},"queries_default_timeout":null,"routing":{"router":{"peers_failover_brokering":null},"peer":{"mode":null}},"aggregation":{"subscribers":[],"publishers":[]},"transport":{"unicast":{"accept_timeout":10000,"accept_pending":100,"max_sessions":1000,"max_links":1},"multicast":{"join_interval":2500,"max_sessions":1000},"qos":{"enabled":true},"link":{"protocols":null,"tx":{"sequence_number_resolution":268435456,"lease":10000,"keep_alive":4,"batch_size":65535,"queue":{"size":{"control":1,"real_time":1,"interactive_high":1,"interactive_low":1,"data_high":2,"data":4,"data_low":4,"background":4},"backoff":100},"threads":3},"rx":{"buffer_size":65535,"max_message_size":1073741824},"tls":{"root_ca_certificate":null,"server_private_key":null,"server_certificate":null,"client_auth":null,"client_private_key":null,"client_certificate":null},"compression":{"enabled":false}},"shared_memory":{"enabled":false},"auth":{"usrpwd":{"user":null,"password":null,"dictionary_file":null},"pubkey":{"public_key_pem":null,"private_key_pem":null,"public_key_file":null,"private_key_file":null,"key_size":null,"known_keys_file":null}}},"adminspace":{"permissions":{"read":true,"write":false}},"plugins_search_dirs":[],"plugins":{"rest":{"http_port":"8000"}}}
[2023-07-01T15:25:47Z INFO zenoh::net::runtime] Using PID: db64ad2e7ab09905e27d35cbde29911a
[2023-07-01T15:25:47Z INFO zenoh::net::runtime::orchestrator] Zenoh can be reached at: tcp/[fe80::1]:7447
[2023-07-01T15:25:47Z INFO zenoh::net::runtime::orchestrator] Zenoh can be reached at: tcp/[fe80::748e:3dff:fea7:85c9]:7447
[2023-07-01T15:25:47Z INFO zenoh::net::runtime::orchestrator] Zenoh can be reached at: tcp/[fe80::748e:3dff:fea7:85c8]:7447
[2023-07-01T15:25:47Z INFO zenoh::net::runtime::orchestrator] Zenoh can be reached at: tcp/[fe80::748e:3dff:fea7:85c7]:7447
[2023-07-01T15:25:47Z INFO zenoh::net::runtime::orchestrator] Zenoh can be reached at: tcp/[fe80::7ce9:1eff:fea7:cce4]:7447
[2023-07-01T15:25:47Z INFO zenoh::net::runtime::orchestrator] Zenoh can be reached at: tcp/[fe80::1877:e300:5c8c:2c36]:7447
[2023-07-01T15:25:47Z INFO zenoh::net::runtime::orchestrator] Zenoh can be reached at: tcp/[fe80::101c:16ff:fec1:24ac]:7447
[2023-07-01T15:25:47Z INFO zenoh::net::runtime::orchestrator] Zenoh can be reached at: tcp/[fe80::101c:16ff:fec1:24ac]:7447
[2023-07-01T15:25:47Z INFO zenoh::net::runtime::orchestrator] Zenoh can be reached at: tcp/[fe80::df42:ccaf:6026:8fc8]:7447
[2023-07-01T15:25:47Z INFO zenoh::net::runtime::orchestrator] Zenoh can be reached at: tcp/[fe80::eeb2:26e0:9b7:8a43]:7447
[2023-07-01T15:25:47Z INFO zenoh::net::runtime::orchestrator] Zenoh can be reached at: tcp/[fe80::9e93:79d:8560:2d2c]:7447
[2023-07-01T15:25:47Z INFO zenoh::net::runtime::orchestrator] Zenoh can be reached at: tcp/[fe80::ce81:b1c:bd2c:69e]:7447
[2023-07-01T15:25:47Z INFO zenoh::net::runtime::orchestrator] Zenoh can be reached at: tcp/[fe80::ac79:ebad:505c:1f0f]:7447
[2023-07-01T15:25:47Z INFO zenoh::net::runtime::orchestrator] Zenoh can be reached at: tcp/[fe80::5fe9:15bc:b6ae:8bf6]:7447
[2023-07-01T15:25:47Z INFO zenoh::net::runtime::orchestrator] Zenoh can be reached at: tcp/[fe80::bd3e:3ae3:88c0:8139]:7447
[2023-07-01T15:25:47Z INFO zenoh::net::runtime::orchestrator] Zenoh can be reached at: tcp/172.26.76.90:7447
[2023-07-01T15:25:47Z INFO zenoh::net::runtime::orchestrator] zenohd listening scout messages on 224.0.0.224:7446
[2023-07-01T15:25:47Z INFO zenohd] Successfully started plugin rest from "/Users/shabbirhasan/.zenoh/lib/libzenoh_plugin_rest.dylib"
[2023-07-01T15:25:47Z INFO zenohd] Finished loading plugins
Hope this helps whoever is struggling with this issue. 🤝🙏
@OlivierHecart I believe this was fixed by https://github.com/eclipse-zenoh/homebrew-zenoh/commit/741308c831ddbcd85a4eaed97a687a70ff059a82. Can you confirm? Is the fix already available on homebrew?
Zenoh 0.10.0-rc installs on MacOS (14) with Apple silicon.
The bug with the .dylib searched in the wrong directory still exists. I also get the same error message.
Plugin load failure: Library file 'libzplugin_rest.dylib' not found
For the current 0.10.0-rc version I had to sym-link as postend by @shabbir-hasan
This fixes the problem for now, but will break with the next update.
@Mallets Would it be possible to add the sym-link to the brew install formula to prevent this problem altogether and ensure updates aren't breaking?
Describe the bug
Unable to install zenoh following the instructions provided in the documentation.
To reproduce
brew tap eclipse-zenoh/homebrew-zenoh
brew install zenoh
System info