thenlevy / ensnano

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

error: failed to get `winit` as a dependency of package `iced_winit v0.3.0 #33

Closed alyferryhalo closed 1 year ago

alyferryhalo commented 1 year ago

Hey there!

I tried to install ENSnano according to the instructions:

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
git clone https://github.com/thenlevy/ensnano.git
cd ensnano
source "$HOME/.cargo/env"
cargo run --release

But then I got an error after the last command

    Updating git repository `https://github.com/hecrj/wgpu_glyph`
    Updating crates.io index
    Updating git repository `https://github.com/termhn/ultraviolet`
    Updating git repository `https://github.com/hecrj/iced`
    Updating git repository `https://github.com/iced-rs/iced_aw`
    Updating git repository `https://github.com/thenlevy/iced_aw`
    Updating git repository `https://github.com/nical/lyon`
    Updating git repository `https://github.com/hecrj/iced`
    Updating git repository `https://github.com/iced-rs/winit`
error: failed to get `winit` as a dependency of package `iced_winit v0.3.0 (https://github.com/hecrj/iced?rev=61c747b53589d98f477fea95f85d2ea5349666d3#61c747b5)`
    ... which satisfies git dependency `iced_winit` of package `ensnano_organizer v0.1.0 (/Users/alisagorislav/ensnano/ensnano-organizer)`
    ... which satisfies path dependency `ensnano_organizer` of package `ensnano_design v0.4.0 (/Users/alisagorislav/ensnano/ensnano-design)`

Caused by:
  failed to load source for dependency `winit`

Caused by:
  Unable to update https://github.com/iced-rs/winit?rev=1e6623c4d06d110e5408dcbdf1edebd07e6a200e

Caused by:
  revspec '1e6623c4d06d110e5408dcbdf1edebd07e6a200e' not found; class=Reference (4); code=NotFound (-3)

I used macOS Monterey 12.1, the Rust version is stable 1.63.0 (bottled)

How can I fix this problem?

thenlevy commented 1 year ago

Hi, Cargo is complaining about not being able to resolve a certain commit which is apparently accessible Could you try to run cargo update at the root of the repository, and then cargo run --release again ?

Alternatively, since you are using macOS you should be able to use the compiled binaries. These are up-to-date with the current main branch of the repo https://github.com/thenlevy/ensnano/releases/tag/0.4.0

alyferryhalo commented 1 year ago

Unfortunately, the first option didn't work, but the second solved my problem. Thanks!

thenlevy commented 1 year ago

In case anyone run into the same problem and find this thread, I have been able to reproduce this problem on an other machine. The problem on that machine was that Cargo was not up to date. This can be solved by running

rustup default stable rustup update stable

Alternatively you may be able to upgrade Cargo via your package manager but I have not tried it myself.