Compile failed
beef9999 opened this issue · 1 comments
beef9999 commented
= note: /root/monoio/target/debug/deps/libmonoio-df6acd1a9017fb23.rlib(monoio-df6acd1a9017fb23.2gvk0ew2p31vtlri.rcgu.o): In function `<T as monoio::driver::op::PollLegacy>::poll_legacy':
/root/monoio/monoio/src/driver/op.rs:82: undefined reference to `tokio-compat can only be enabled when legacy feature is enabled and iouring is not'
/root/monoio/target/debug/deps/libmonoio-df6acd1a9017fb23.rlib(monoio-df6acd1a9017fb23.8dwynx033sexvzl.rcgu.o): In function `<T as monoio::driver::op::PollLegacy>::poll_legacy':
/root/monoio/monoio/src/driver/op.rs:82: undefined reference to `tokio-compat can only be enabled when legacy feature is enabled and iouring is not'
collect2: error: ld returned 1 exit status
= note: some `extern` functions couldn't be found; some native libraries may need to be installed or have their path specified
= note: use the `-l` flag to specify native libraries to link
= note: use the `cargo:rustc-link-lib` directive to specify the native libraries to link with Cargo (see https://doc.rust-lang.org/cargo/reference/build-scripts.html#cargorustc-link-libkindname)
error: could not compile `tokio-io-compat` (bin "tokio-io-compat") due to previous error
CentOS 8
ihciah commented
应该是开启了所有 feature 导致的。
tokio-compat 这个 feature 是为了与 tokio 的 AsyncRead/AsyncWrite 兼容用的,但因为 IO 接口原因,只有在使用 legacy driver 时才能无缝兼容。请在开启 legacy 并且未开启 iouring 的情况下才开启 tokio-compat。