Closed
Description
Original issue: ntex-rs/ntex#168
I tried to upgrade my project to new versions of crates from ntex ecosystem and getting this during the build (tried dev/release and lto on/off) in rust 1.67.0 1.66.1 and 1.65.0:
Cargo.toml:
[profile.dev]
lto = "off"
uname -a
Linux workstation 6.0.17-300.fc37.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Jan 4 15:58:35 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
rustc --version --verbose
rustc 1.67.0 (fc594f156 2023-01-24)
binary: rustc
commit-hash: fc594f15669680fa70d255faec3ca3fb507c3405
commit-date: 2023-01-24
host: x86_64-unknown-linux-gnu
release: 1.67.0
LLVM version: 15.0.6
RUST_BACKTRACE=1 cargo build
...
= note: /usr/bin/ld: /home/andrey/PROJECTS/mqtt-proxy/target/debug/deps/mqtt_proxy-50505dd9d683691b.4mlovlv0amp3wbkb.rcgu.o: in function `mqtt_proxy::mqtt::server::run_internal::{{closure}}':
/home/andrey/PROJECTS/ENAPTER/RUST/mqtt-proxy/src/mqtt/server.rs:407: undefined reference to `ntex::server::builder::ServerBuilder::bind'
/usr/bin/ld: /home/andrey/PROJECTS/mqtt-proxy/src/mqtt/server.rs:437: undefined reference to `ntex::server::builder::ServerBuilder::bind'
/usr/bin/ld: /home/andrey/PROJECTS/mqtt-proxy/target/debug/deps/mqtt_proxy-50505dd9d683691b: hidden symbol `_ZN4ntex6server7builder13ServerBuilder4bind17h11f83fcdff21e860E' isn't defined
/usr/bin/ld: final link failed: bad value
collect2: error: ld returned 1 exit status
rustc --version --verbose
rustc 1.66.1 (90743e729 2023-01-10)
binary: rustc
commit-hash: 90743e7298aca107ddaa0c202a4d3604e29bfeb6
commit-date: 2023-01-10
host: x86_64-unknown-linux-gnu
release: 1.66.1
LLVM version: 15.0.2
RUST_BACKTRACE=1 cargo build
...
= note: /usr/bin/ld: /home/andrey/PROJECTS/mqtt-proxy/target/debug/deps/mqtt_proxy-8e95ce83ad692d11.36165ln4drfwzbwp.rcgu.o: in function `ntex_mqtt::v3::dispatcher::factory::{{closure}}':
/home/andrey/.cargo/registry/src/github.com-1ecc6299db9ec823/ntex-mqtt-0.10.0/src/v3/dispatcher.rs:45: undefined reference to `core::future::from_generator'
/usr/bin/ld: /home/andrey/PROJECTS/mqtt-proxy/target/debug/deps/mqtt_proxy-8e95ce83ad692d11.36165ln4drfwzbwp.rcgu.o: in function `ntex_mqtt::v3::dispatcher::factory::{{closure}}':
/home/andrey/.cargo/registry/src/github.com-1ecc6299db9ec823/ntex-mqtt-0.10.0/src/v3/dispatcher.rs:45: undefined reference to `core::future::from_generator'
/usr/bin/ld: /home/andrey/PROJECTS/mqtt-proxy/target/debug/deps/mqtt_proxy-8e95ce83ad692d11: hidden symbol `_ZN4core6future14from_generator17h41325a862bdd1022E' isn't defined
/usr/bin/ld: final link failed: bad value
collect2: error: ld returned 1 exit status
rustc --version --verbose
rustc 1.65.0 (897e37553 2022-11-02)
binary: rustc
commit-hash: 897e37553bba8b42751c67658967889d11ecd120
commit-date: 2022-11-02
host: x86_64-unknown-linux-gnu
release: 1.65.0
LLVM version: 15.0.0
RUST_BACKTRACE=1 cargo build
...
= note: /usr/bin/ld: /home/andrey/PROJECTS/mqtt-proxy/target/debug/deps/mqtt_proxy-63921c4d21993a93.1v857ri3nn1m6ced.rcgu.o: in function `ntex_mqtt::v3::dispatcher::factory::{{closure}}':
/home/andrey/.cargo/registry/src/github.com-1ecc6299db9ec823/ntex-mqtt-0.10.0/src/v3/dispatcher.rs:45: undefined reference to `core::future::from_generator'
/usr/bin/ld: /home/andrey/PROJECTS/mqtt-proxy/target/debug/deps/mqtt_proxy-63921c4d21993a93.1v857ri3nn1m6ced.rcgu.o: in function `ntex_mqtt::v3::dispatcher::factory::{{closure}}':
/home/andrey/.cargo/registry/src/github.com-1ecc6299db9ec823/ntex-mqtt-0.10.0/src/v3/dispatcher.rs:45: undefined reference to `core::future::from_generator'
/usr/bin/ld: /home/andrey/PROJECTS/mqtt-proxy/target/debug/deps/mqtt_proxy-63921c4d21993a93: hidden symbol `_ZN4core6future14from_generator17hbc6ad46c704acbb0E' isn't defined
/usr/bin/ld: final link failed: bad value
collect2: error: ld returned 1 exit status
Any help is welcome :)