thenlevy / ensnano

ENSnano, a 3D graphical application for DNA nanostructures.
GNU General Public License v3.0
49 stars 7 forks source link

Compiling on Linux Mint 21 / Ubuntu 22.04 #39

Open lennart-g opened 1 year ago

lennart-g commented 1 year ago

Hi, I am new to Rust (and to ENSnano) and wanted to run it on Linux which sadly does not come with an executable.

I tried building it as described in the README but failed with the following output:

$ cargo run --features=log_after_renderer_setup --release
    Updating crates.io index
    Updating git repository `https://github.com/thenlevy/chebyshev_polynomials`
    Updating git repository `https://github.com/termhn/ultraviolet`
    Updating git repository `https://github.com/nical/lyon`
    Updating git repository `https://github.com/rust-cli/confy`
error: failed to select a version for the requirement `iced_aw = "^0.2.0"`
candidate versions found which didn't match: 0.7.0, 0.6.0, 0.5.2
location searched: crates.io index
required by package `ensnano_gui v0.4.0 (/path/to/ensnano/ensnano-gui)`
perhaps a crate was updated and forgotten to be re-vendored?

Looking at https://docs.rs/iced_aw/0.2.0/iced_aw/index.html, the required version is apparently no longer available. I tried editing ensnano-gui/Cargo.toml and ensnano-organizer/Cargo.toml to 0.7.0 (and in another attempt to 0.5.2) which both did not compile.

What ultimately allowed me to build and run ENSnano was to clone iced_aw, checkout version 0.2.0 and cargo build --release. I then updated the entries for iced_raw in ensnano-gui/Cargo.toml to iced_aw = { path="/path/to/iced_aw", features = ["tab_bar"]} and in ensnano-organizer/Cargo.toml to iced_aw = { path="/path/to/iced_aw", features=["icons", "icon_text"] }.

$ rustc --version
rustc 1.72.1 (d5c2e9c34 2023-09-13)
$ cargo --version
cargo 1.72.1 (103a7ff2e 2023-08-15)

Maybe this will be useful to others. Please let me know if this approach is flawed and what is considered the better way to build ENSnano on Linux.

siegmundbio commented 11 months ago

Thank you!! just ran into this problem and used your solution which worked for iced_aw but now have run into the same problem with aHash, did you also? or has it been yoinked since you installed.

lennart-g commented 11 months ago

I only had problems with iced_aw back then, but the provided packages might have changed in the meantime. Maybe consider sharing your error message, it might contain useful information on how to fix your problem.