reinterpretcat / vrp

A Vehicle Routing Problem solver
https://reinterpretcat.github.io/vrp/
Apache License 2.0
348 stars 69 forks source link

1.10 Compile error #28

Closed dooley closed 3 years ago

dooley commented 3 years ago

FYI:

Got an error while trying to install v. 1.10 on a Ubuntu 20.04. LTS:

cargo --verbose install vrp-cli

Compiling vrp-core v1.10.0 Runningrustc --crate-name vrp_core --edition=2018 /home/username/.cargo/registry/src/github.com-1ecc6299db9ec823/vrp-core-1.10.0/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -Cembed-bitcode=no -C metadata=b2341bfc8b060633 -C extra-filename=-b2341bfc8b060633 --out-dir /tmp/cargo-installWE2m31/release/deps -L dependency=/tmp/cargo-installWE2m31/release/deps --extern hashbrown=/tmp/cargo-installWE2m31/release/deps/libhashbrown-02cde05fa3bef28d.rmeta --extern num_cpus=/tmp/cargo-installWE2m31/release/deps/libnum_cpus-7872687f52fab9da.rmeta --extern rand=/tmp/cargo-installWE2m31/release/deps/librand-743de0627dcf690c.rmeta --extern rayon=/tmp/cargo-installWE2m31/release/deps/librayon-8d6ec85410d72779.rmeta --cap-lints allow` error[E0658]: use of unstable library feature 'clamp' --> /home/frank/.cargo/registry/src/github.com-1ecc6299db9ec823/vrp-core-1.10.0/src/solver/population/rosomaxa.rs:264:103 264 1. / (1. + std::f64::consts::E.powf(-10. * (statistics.termination_estimate - 0.75))).clamp(0.1, 1.); ^^^^^
= note: see issue #44095 <https://github.com/rust-lang/rust/issues/44095> for more information

` Preverious versions did compile without any problems.

reinterpretcat commented 3 years ago

I guess you're using not the latest rust < 1.50.0. Maybe I should replace the usage of clamp from the library to support lower rust version. I haven't yet decided on how to manage lowest supported version vs new features I want to try.

dooley commented 3 years ago

Ah, got it. rustup update resolves the problem. Thanks!