erickt / rust-zmq

Rust zeromq bindings.
Apache License 2.0
886 stars 189 forks source link

Vendor Feature removed for version 10? #366

Closed bkolligs closed 1 year ago

bkolligs commented 1 year ago

Hello, I am trying to build ZMQ as a static dependency using the instructions provided here, which are leftover from rust-zmq = "0.9.2". However, I am also interested in using the WebSocket support of a newer version of ZMQ 4.3.*. However I get the error "protocol not supported" when using the vendor flag like so:

thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Protocol not supported', src/main.rs:46:6

My cargo dependencies looks like this:

[dependencies]
zmq = {version = "0.9.2", features = ["vendored"]}

It seems that the binary doesn't link dynamically to ZMQ anymore though, but the version is wrong:

$ ldd target/debug/rust-program
    linux-vdso.so.1 (0x00007ffe582c5000)
    libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f7d5824d000)
    libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f7d58232000)
    libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f7d5820f000)
    libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f7d580c0000)
    libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f7d580ba000)
    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f7d57ec6000)
    /lib64/ld-linux-x86-64.so.2 (0x00007f7d58adc000)

If I try this I get a compiler error saying that the feature doesn't exist:

[dependencies]
zmq = {version = "0.10.0", features = ["vendored"]}
bkolligs commented 1 year ago

Seems like "0.10.0" is building a static lib by default.