MitchelPaulin / Walleye

A chess engine written from scratch in Rust ♞
MIT License
121 stars 6 forks source link

can not compile v1.4.0 on Linux #9

Closed tissatussa closed 3 years ago

tissatussa commented 3 years ago

here is the terminal log :

$ cargo build --release --verbose
       Fresh cfg-if v1.0.0
       Fresh lazy_static v1.4.0
       Fresh unicode-width v0.1.9
       Fresh bitflags v1.3.2
       Fresh vec_map v0.8.2
       Fresh ansi_term v0.11.0
       Fresh strsim v0.8.0
       Fresh textwrap v0.11.0
       Fresh libc v0.2.103
       Fresh log v0.4.14
       Fresh atty v0.2.14
       Fresh thread-id v3.3.0
       Fresh colored v2.0.0
       Fresh clap v2.33.3
       Fresh simple-logging v2.0.2
   Compiling walleye v1.4.0 (/home/tissatussa/Compiled/Walleye_v1.4.0)
     Running `rustc --crate-name walleye --edition=2018 src/main.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type bin --emit=dep-info,link -C opt-level=3 -C lto -C codegen-units=1 -C metadata=c0314d45e350ab32 -C extra-filename=-c0314d45e350ab32 --out-dir /home/tissatussa/Compiled/Walleye_v1.4.0/target/release/deps -L dependency=/home/tissatussa/Compiled/Walleye_v1.4.0/target/release/deps --extern clap=/home/tissatussa/Compiled/Walleye_v1.4.0/target/release/deps/libclap-92b2ce1d83fefcb6.rlib --extern colored=/home/tissatussa/Compiled/Walleye_v1.4.0/target/release/deps/libcolored-af5d305c32b4ddbc.rlib --extern log=/home/tissatussa/Compiled/Walleye_v1.4.0/target/release/deps/liblog-f28a7c1eb8fddef7.rlib --extern simple_logging=/home/tissatussa/Compiled/Walleye_v1.4.0/target/release/deps/libsimple_logging-d9170c4c5c5a3ed5.rlib`
error[E0277]: `[Option<(board::Point, board::Point)>; 100]` is not an iterator
   --> src/engine.rs:214:16
    |
214 |     for mov in search_info.pv_moves {
    |                ^^^^^^^^^^^^^^^^^^^^ borrow the array with `&` or call `.iter()` on it to iterate over it
    |
    = help: the trait `Iterator` is not implemented for `[Option<(board::Point, board::Point)>; 100]`
    = note: arrays are not iterators, but slices like the following are: `&[1, 2, 3]`
    = note: required because of the requirements on the impl of `IntoIterator` for `[Option<(board::Point, board::Point)>; 100]`
    = note: required by `into_iter`

error: aborting due to previous error

For more information about this error, try `rustc --explain E0277`.
error: could not compile `walleye`

Caused by:
  process didn't exit successfully: `rustc --crate-name walleye --edition=2018 src/main.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type bin --emit=dep-info,link -C opt-level=3 -C lto -C codegen-units=1 -C metadata=c0314d45e350ab32 -C extra-filename=-c0314d45e350ab32 --out-dir /home/tissatussa/Compiled/Walleye_v1.4.0/target/release/deps -L dependency=/home/tissatussa/Compiled/Walleye_v1.4.0/target/release/deps --extern clap=/home/tissatussa/Compiled/Walleye_v1.4.0/target/release/deps/libclap-92b2ce1d83fefcb6.rlib --extern colored=/home/tissatussa/Compiled/Walleye_v1.4.0/target/release/deps/libcolored-af5d305c32b4ddbc.rlib --extern log=/home/tissatussa/Compiled/Walleye_v1.4.0/target/release/deps/liblog-f28a7c1eb8fddef7.rlib --extern simple_logging=/home/tissatussa/Compiled/Walleye_v1.4.0/target/release/deps/libsimple_logging-d9170c4c5c5a3ed5.rlib` (exit code: 1)
mvanthoor commented 3 years ago

@tissatussa

Probably the author pushed a commit that broke the build or something similar. I've just pulled the main branch (tagged 1.4.0) and it cleanly compiled and built on Debian 11 Bullseye, on Rust 1.55 (installed directly from the Rust-Lang website).

MitchelPaulin commented 3 years ago

I forced pushed a fix to the 1.4 release. Strange that it would compile on windows but not on linux, might be an issue with the cargo version because the CI also runs ubuntu-latest and it seemed to pass.

Let me know if it works for you

tissatussa commented 3 years ago

now it compiles and runs OK ! only thing is the version number : it still has 1.4.0 ..

MitchelPaulin commented 3 years ago

I decided to just update the 1.4.0 release directly rather than make a 1.4.1 since the change was so small. Happy it's working!