Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Needs absolutely latest rust to compile #1

Closed
msoos opened this issue May 20, 2019 · 9 comments
Closed

Needs absolutely latest rust to compile #1

msoos opened this issue May 20, 2019 · 9 comments

Comments

@msoos
Copy link

msoos commented May 20, 2019

The system cannot be compiled on a very recently updated (2 months?) Arch Linux system. I believe you are using very particular part of the cargo system that may not be absolutely needed? The error I am getting is:

$ cargo run --release formula.cnf proof.drat
error: failed to parse manifest at `/home/soos/development/sat_solvers/rate/Cargo.toml`

Caused by:
  the cargo feature `default-run` requires a nightly version of Cargo, but this is the `stable` channel

Note that if a very fresh Arch linux cannot compile this system then about 99.9% of systems out there can have no chance of compiling this code. Are you sure you need default-run -- it doesn't seem anything more than a convenience system?

@krobelus
Copy link
Owner

Thanks, I removed the default-run feature, it really is pure convenience.

@krobelus
Copy link
Owner

The Rust version should be fixed by the rust-toolchain file so when you run cargo build it should pull the version I'm using.

@msoos
Copy link
Author

msoos commented May 20, 2019

Hi,

I am not sure. I got this:

$ cargo build
error: failed to parse manifest at `/[....]/rate/Cargo.toml`

Caused by:
  the cargo feature `default-run` requires a nightly version of Cargo, but this is the `stable` channel

So something is off, as it's not pulling the version you are using I think?

@krobelus
Copy link
Owner

krobelus commented May 20, 2019

Sorry for the confusion, I have added a commit fixing this, so you need to git pull

@msoos
Copy link
Author

msoos commented May 21, 2019

Hi,

I am not sure this is fixed. I believe your dependencies may not be OK with this rust:

$ cargo build
    Updating crates.io index
  Downloaded clap v2.32.0
  Downloaded derive_more v0.13.0
  Downloaded bzip2 v0.3.3
  Downloaded syn v0.15.22
  Downloaded xz2 v0.1.6
  Downloaded scopeguard v0.3.3
  Downloaded atty v0.2.11
  Downloaded memmap v0.7.0
  Downloaded proc-macro2 v0.4.24
  Downloaded quote v0.6.10
  Downloaded toml v0.4.10
  Downloaded serde v1.0.80
  Downloaded lz4 v1.23.1
  Downloaded serde_derive v1.0.82
  Downloaded flate2 v1.0.7
  Downloaded zstd v0.4.22+zstd.1.3.8
  Downloaded bitfield v0.13.1
  Downloaded libc v0.2.51
  Downloaded unicode-xid v0.1.0
  Downloaded static_assertions v0.3.1
  Downloaded vec_map v0.8.1
  Downloaded bitflags v1.0.4
  Downloaded textwrap v0.10.0
  Downloaded crc32fast v1.2.0
  Downloaded ansi_term v0.11.0
  Downloaded unicode-width v0.1.5
  Downloaded strsim v0.7.0
  Downloaded zstd-safe v1.4.7+zstd.1.3.8
  Downloaded skeptic v0.13.4
  Downloaded bzip2-sys v0.1.7
  Downloaded cargo_metadata v0.6.4
  Downloaded tempdir v0.3.7
  Downloaded miniz-sys v0.1.11
  Downloaded lzma-sys v0.1.14
  Downloaded glob v0.2.11
  Downloaded cfg-if v0.1.7
  Downloaded bytecount v0.4.0
  Downloaded pulldown-cmark v0.2.0
  Downloaded walkdir v2.2.7
  Downloaded serde_json v1.0.33
  Downloaded lz4-sys v1.8.3
  Downloaded error-chain v0.12.0
  Downloaded pkg-config v0.3.14
  Downloaded remove_dir_all v0.5.1
  Downloaded same-file v1.0.4
  Downloaded semver v0.9.0
  Downloaded cc v1.0.35
  Downloaded rand v0.4.6
  Downloaded ryu v0.2.7
  Downloaded itoa v0.4.3
  Downloaded backtrace v0.3.15
  Downloaded semver-parser v0.7.0
  Downloaded rayon v1.0.3
  Downloaded rustc-demangle v0.1.13
  Downloaded zstd-sys v1.4.8+zstd.1.3.8
  Downloaded backtrace-sys v0.1.28
  Downloaded autocfg v0.1.2
  Downloaded rayon-core v1.4.1
  Downloaded either v1.5.2
  Downloaded num_cpus v1.10.0
  Downloaded crossbeam-deque v0.2.0
  Downloaded lazy_static v1.3.0
  Downloaded crossbeam-epoch v0.3.1
  Downloaded crossbeam-utils v0.2.2
  Downloaded nodrop v0.1.13
  Downloaded arrayvec v0.4.10
  Downloaded memoffset v0.2.1
  Downloaded blob v0.2.1
  Downloaded base64 v0.10.1
  Downloaded byteorder v1.3.1
   Compiling arrayvec v0.4.10
   Compiling nodrop v0.1.13
   Compiling cfg-if v0.1.7
   Compiling libc v0.2.51
   Compiling memoffset v0.2.1
   Compiling lazy_static v1.3.0
   Compiling scopeguard v0.3.3
   Compiling rayon-core v1.4.1
   Compiling rayon v1.0.3
   Compiling either v1.5.2
   Compiling proc-macro2 v0.4.24
   Compiling autocfg v0.1.2
   Compiling unicode-xid v0.1.0
   Compiling byteorder v1.3.1
   Compiling serde v1.0.80
   Compiling ryu v0.2.7
   Compiling rustc-demangle v0.1.13
   Compiling itoa v0.4.3
   Compiling semver-parser v0.7.0
   Compiling pulldown-cmark v0.2.0
   Compiling bitflags v1.0.4
   Compiling same-file v1.0.4
   Compiling remove_dir_all v0.5.1
   Compiling glob v0.2.11
   Compiling pkg-config v0.3.14
   Compiling bytecount v0.4.0
   Compiling crc32fast v1.2.0
   Compiling unicode-width v0.1.5
   Compiling rate v0.1.0 (/home/soos/development/sat_solvers/rate)
   Compiling strsim v0.7.0
   Compiling vec_map v0.8.1
   Compiling ansi_term v0.11.0
   Compiling static_assertions v0.3.1
   Compiling bitfield v0.13.1
   Compiling crossbeam-utils v0.2.2
   Compiling backtrace v0.3.15
   Compiling walkdir v2.2.7
   Compiling textwrap v0.10.0
   Compiling num_cpus v1.10.0
   Compiling rand v0.4.6
   Compiling atty v0.2.11
   Compiling memmap v0.7.0
   Compiling crossbeam-epoch v0.3.1
   Compiling base64 v0.10.1
   Compiling quote v0.6.10
   Compiling clap v2.32.0
   Compiling syn v0.15.22
   Compiling crossbeam-deque v0.2.0
   Compiling tempdir v0.3.7
   Compiling cc v1.0.35
   Compiling serde_json v1.0.33
   Compiling blob v0.2.1
   Compiling semver v0.9.0
   Compiling toml v0.4.10
   Compiling serde_derive v1.0.82
   Compiling derive_more v0.13.0
   Compiling rate-macros v0.1.0 (/home/soos/development/sat_solvers/rate/rate-macros)
   Compiling backtrace-sys v0.1.28
   Compiling miniz-sys v0.1.11
   Compiling lz4-sys v1.8.3
   Compiling lzma-sys v0.1.14
   Compiling bzip2-sys v0.1.7
   Compiling zstd-sys v1.4.8+zstd.1.3.8
   Compiling flate2 v1.0.7
   Compiling xz2 v0.1.6
   Compiling bzip2 v0.3.3
   Compiling error-chain v0.12.0
   Compiling cargo_metadata v0.6.4
   Compiling skeptic v0.13.4
   Compiling lz4 v1.23.1
   Compiling zstd-safe v1.4.7+zstd.1.3.8
   Compiling zstd v0.4.22+zstd.1.3.8
error[E0554]: #![feature] may not be used on the stable release channel
  --> src/sick-check.rs:3:1
   |
3  | / #![feature(
4  | |     try_trait,
5  | |     alloc,
6  | |     ptr_wrapping_offset_from,
...  |
14 | |     try_from
15 | | )]
   | |__^

error[E0554]: #![feature] may not be used on the stable release channel
  --> src/main.rs:4:1
   |
4  | / #![feature(
5  | |     try_trait,
6  | |     alloc,
7  | |     ptr_wrapping_offset_from,
...  |
15 | |     try_from
16 | | )]
   | |__^

error: aborting due to previous error

For more information about this error, try `rustc --explain E0554`.
error: Could not compile `rate`.
warning: build failed, waiting for other jobs to finish...
error: aborting due to previous error

For more information about this error, try `rustc --explain E0554`.
error: Could not compile `rate`.

To learn more, run the command again with --verbose.

I am sorry, I am really just trying to use your system with a now absolutely and completely up-to-date Arch linux. If I cannot compile with this system your code then about 99.999% of people cannot. Note that most SAT researchers use outdated systems, sometimes quite rationally. So I believe your target audience really needs this to compile on at least a slightly sane system, and given that i have rust 1.34.2, which I believe is the latest, I don't see the reason why I should not be able to compile it :)

@krobelus
Copy link
Owner

Ok, I will make it work with stable.

Maybe we can still find out what's the problem here.
Your cargo is using the stable version of rust and not the one specified in rust-toolchain (see https://github.com/rust-lang/rustup.rs#override-precedence).
The output of rustup show run from inside the rate directory should look something like this w.r.t. the active toolchain. I assume you're also on rustup version 1.18.2.

$ rustup show
Default host: x86_64-unknown-linux-gnu

installed toolchains
--------------------

stable-x86_64-unknown-linux-gnu
nightly-2019-02-22-x86_64-unknown-linux-gnu

active toolchain
----------------

nightly-2019-02-22-x86_64-unknown-linux-gnu (overridden by '/home/johannes/rate/rust-toolchain')
rustc 1.34.0-nightly (633d75ac1 2019-02-21)

@krobelus
Copy link
Owner

Alright, I see the issue now: the rust-toolchain file only works if rust/cargo was installed via rustup which is useful for managing multiple versions of the language.
If installed with a system package manager it's not used.
Sorry for the trouble, I'll port it to stable so it works for everyone.

@msoos
Copy link
Author

msoos commented May 21, 2019

Hi,

Ah, nice, finally managed to do it -- I needed to replace "rust" with "rustup". After that, cargo build worked :) However, I recommend you make this work with a less crazy-up-to-date setup. In my opinion, requiring people to have such a setup is usually not correct.

Also, by the way, you most likely want to have cargo build --release as the debug is super slow, as you probably know. I was about to file a bug report before I tried doing the --release thing. It make it 80x faster, so no need for bug report :) Thanks, this will now give me some work to fix my solver :)

@msoos msoos closed this as completed May 21, 2019
@krobelus
Copy link
Owner

Hi,

Ah, nice, finally managed to do it -- I needed to replace "rust" with "rustup". After that, cargo build worked :) However, I recommend you make this work with a less crazy-up-to-date setup. In my opinion, requiring people to have such a setup is usually not correct.

Yeah, I think rustup is expected to be used mostly by people developing in Rust, not users.

Also, by the way, you most likely want to have cargo build --release as the debug is super slow, as you probably know. I was about to file a bug report before I tried doing the --release thing. It make it 80x faster, so no need for bug report :)

For now the recommended way to install is cargo install --path . which does a release build by default and puts binaries in ~/.cargo/bin/ (add --force to overwrite them). At some point I will publish it as a crate.

Thanks, this will now give me some work to fix my solver :)

Good luck and let me know if I can assist!

krobelus added a commit that referenced this issue May 22, 2019
see #1

- remove remaining nightly features
- use Vec instead of RawVec
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants