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

Can't Install on MacOS #137

Open
vodkaa-gal opened this issue May 22, 2024 · 8 comments
Open

Can't Install on MacOS #137

vodkaa-gal opened this issue May 22, 2024 · 8 comments

Comments

@vodkaa-gal
Copy link

lan-mouse refuses to build on MacOS (Monterey, 12.6). Prebuilt binaries work fine, but using cargo install lan-mouse fails. This also happens when building the repository. Below is the error:

cargo install lan-mouse
    Updating crates.io index
  Downloaded lan-mouse v0.8.0
  Downloaded 1 crate (112.8 KB) in 0.47s
  Installing lan-mouse v0.8.0
error: failed to compile `lan-mouse v0.8.0`, intermediate artifacts can be found at `/var/folders/03/9yv668fx0psccvppt4fp11zm0000gp/T/cargo-installXEXw61`

Caused by:
  failed to select a version for `env_logger`.
      ... required by package `lan-mouse v0.8.0`
  versions that meet the requirements `^0.11.3` are: 0.11.3

  the package `lan-mouse` 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

Installing does not fail on Arch.

@feschber
Copy link
Owner

Sounds like an issue with your rust installation. Could you try removing the ~/.cargo/registry directory and run the install command again?

@vodkaa-gal
Copy link
Author

Unfortunately that doesn't seem to do anything. It still refuses to build with the same error.

@flashgnash
Copy link

This appears to also be the case trying to build on windows 10 with the same error

@feschber
Copy link
Owner

Could you run

rustup update
rustup toolchain install stable-x86_64-pc-windows-msvc

and try this again?

@feschber
Copy link
Owner

rust-lang/mdBook#2318

it appears to be some issue with old versions of cargo

@flashgnash
Copy link

rustup toolchain install stable-x86_64-pc-windows-msvc

Yep you're right, I'm getting a different error now but that's something unrelated

@feschber
Copy link
Owner

rustup toolchain install stable-x86_64-pc-windows-msvc

Yep you're right, I'm getting a different error now but that's something unrelated

Make sure to follow the guide in the readme. Particularly the part about adding the gtk directory to $PATH

@jswhisperer
Copy link

jswhisperer commented Aug 9, 2024

Not sure if related but this helped me, and updating rust

brew install llvm

which will output this... and you should do it

  echo 'export PATH="/opt/homebrew/opt/llvm/bin:$PATH"' >> ~/.zshrc
  export LDFLAGS="-L/opt/homebrew/opt/llvm/lib"
  export CPPFLAGS="-I/opt/homebrew/opt/llvm/include"

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

4 participants