alucryd / oxyromon

Rusty ROM OrgaNizer
Other
110 stars 13 forks source link

[Issue] cargo can't install oxyromon #130

Closed monyarm closed 3 months ago

monyarm commented 3 months ago
cargo install oxyromon

    Updating crates.io index
  Downloaded oxyromon v0.18.0
  Downloaded 1 crate (332.3 KB) in 0.87s
  Installing oxyromon v0.18.0
error: failed to compile `oxyromon v0.18.0`, intermediate artifacts can be found at `/tmp/cargo-installjHQLQS`

Caused by:
  failed to select a version for `env_logger`.
      ... required by package `oxyromon v0.18.0`
  versions that meet the requirements `^0.11.3` are: 0.11.3

  the package `oxyromon` depends on `env_logger`, with features: `anstream` but `env_logger` does not have these features.
   It has an optional dependency with that name, but that dependency uses the "dep:" syntax in the features table, so it does not have an implicit feature with that name.

  failed to select a version for `env_logger` which could resolve this conflict
alucryd commented 3 months ago

Strange, I can't replicate here, I don't even specify features for env_logger, it uses the default ones. Maybe a cache issue on your end?

You can easily clean your cache like so: https://stackoverflow.com/questions/25072930/how-to-clear-the-cargo-cache

monyarm commented 3 months ago

I updated to the latest rust, and cleared the cache. No dice. Same error.

alucryd commented 3 months ago

It's apparently a known issue upstream, related to cargo resolving deps before checking their MSRV: https://github.com/rust-cli/env_logger/issues/312

oxyromon itself requires rust 1.75 since 0.18 (should specify that in Cargo.toml while I'm at it), and they claim it should be working fine with rust 1.71+ so I'm not sure why you're affected :/

alucryd commented 3 months ago

On top of that, I get a different error when installing on my server, which seems weird since I specifically use sqlite instead of postgres, wonder where it's coming from:

error: no database driver found matching URL scheme "postgres"; the corresponding Cargo feature may need to be enabled
   --> /home/alucryd/.cargo/registry/src/index.crates.io-6f17d22bba15001f/oxyromon-0.18.0/src/database.rs:100:5

This works fine on my desktop and laptop... The line seems linked to the sqlx offline feature, might need to look into that.

monyarm commented 3 months ago

oxyromon itself requires rust 1.75 since 0.18 (should specify that in Cargo.toml while I'm at it), and they claim it should be working fine with rust 1.71+ so I'm not sure why you're affected :/

somehow cargo had installed an earlier version of itself to ~/.cargo/bin After deleting it (it was 1.66), I'm now using 1.75

alucryd commented 3 months ago

Are you able to install now then?

monyarm commented 3 months ago

Ya.