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

Unable to run example directly from terminal, works from IDE (RustRover) #141

Closed
kinocz opened this issue Apr 22, 2024 · 3 comments
Closed
Labels
bug Something isn't working

Comments

@kinocz
Copy link

kinocz commented Apr 22, 2024

I'm a newbie to Rust, so I probably did something stupid and should have done differently.

I have cloned the project and wanted to run:

/Users/kino/.cargo/bin/cargo run --color=always --package tray-icon --example tao

If I run this through IDE (RustRover), I'm able to run it properly, and the tray icon shows as expected.

When I do the same from the terminal, I receive bus error. I was able to track down that the problem is

TrayIconBuilder::new()
. It does not matter what example I try to run. The bus error is always received when the try icon itself tries to build.

/Users/kino/.cargo/bin/cargo run --color=always --package tray-icon --example tao
    Finished dev [unoptimized + debuginfo] target(s) in 0.14s
     Running `target/debug/examples/tao`
[1]    34852 bus error  /Users/kino/.cargo/bin/cargo run --color=always --package tray-icon --example
./target/debug/examples/tao
[1]    35415 bus error  ./target/debug/examples/tao

Cargo/rust is installed with rustup

cargo --version
cargo 1.77.2 (e52e36006 2024-03-26)

rustc --version
rustc 1.77.2 (25ef9e3d8 2024-04-09)

rustup --version
rustup 1.27.0 (2024-03-08)
info: This is the version for the rustup toolchain manager, not the rustc compiler.
info: The currently active `rustc` version is `rustc 1.77.2 (25ef9e3d8 2024-04-09)`

edit: I'm using MacOS 14.4.1 with M1 cpu aarch64-apple-darwin toolchain default

@FabianLars
Copy link
Member

Are you using mac's default terminal? It works completely fine for me on the default terminal on macos 14.4.1 but with M2 pro 🤔

@FabianLars FabianLars added the bug Something isn't working label Apr 22, 2024
@kinocz
Copy link
Author

kinocz commented Apr 22, 2024

OK, the problem is ohmyzsh (probably some plugin, zsh is fine). Thx, for pointing me in the right direction. Now, one wonders WTF... If I find it I will post it here.

@kinocz kinocz closed this as completed Apr 22, 2024
@kinocz
Copy link
Author

kinocz commented Apr 22, 2024

I was able to track it down...

I had

export DYLD_LIBRARY_PATH=/opt/homebrew/lib

in my .zshrc, because of the different tools I'm using. When I removed this, all started to work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants