eclipse-zenoh / zenoh-c

C API for Zenoh
http://zenoh.io
Other
79 stars 57 forks source link

[Bug] 1.0.0-pre.10 zenohc::session: Error opening session: Unsupported protocol: unixsock-stream. #738

Closed mangodan2003 closed 3 days ago

mangodan2003 commented 1 month ago

Describe the bug

zenoh 1.0.0-beta.4 understands the unixsock-stream prefix but the zenoh-c 1.0.0-pre.10 release built against it does not:

~/workspace/zenoh/zenoh-c/build $ ../target/release/examples/z_pub
Opening session...
2024-10-04T09:42:08.950349Z ERROR ThreadId(03) zenohc::session: Error opening session: Unsupported protocol: unixsock-stream. at /path/to/.cargo/git/checkouts/zenoh-cc237f2570fab813/8aaed41/io/zenoh-link/src/lib.rs:169.
Unable to open session!

The z_pub example has been modified to use zc_config_from_file which when pointed at the same config file which worked previously (and works for the the pure rust z_pub example) fails.

To reproduce

modify z_pub.c in the 1.0.0-pre.10 / release/1.0.0.10 branch to parse a config file which specifies an endpoint with unixsock-stream prefix.

System info

mangodan2003 commented 1 month ago

Having dug a bit the default features has changed from using what zenoh used to a new set defined in this project which excludes unix-sockstream

DenisBiryukov91 commented 1 month ago

yes, you can enable it by passing -DZENOHC_CARGO_FLAGS="--features=transport_unixsock-stream" to cmake.