qdot / systray-rs

Allows rust applications to show a platform specific system tray icon and menu.
BSD 3-Clause "New" or "Revised" License
171 stars 66 forks source link

Fails to build on Gentoo due to `libappindicator-sys v0.3.0` build failure #34

Closed zetok closed 4 years ago

zetok commented 5 years ago

Relevant part:

   Compiling libappindicator-sys v0.3.0
error: failed to run custom build command for `libappindicator-sys v0.3.0`
process didn't exit successfully: `/home/zetok/git/rust/tray/target/debug/build/libappindicator-sys-4dae8ec67c91a56c/build-script-build` (exit code: 101)
--- stdout
cargo:rustc-link-lib=appindicator3

--- stderr
thread 'main' panicked at 'libappindicator3 library not found!', /home/zetok/.cargo/registry/src/github.com-1ecc6299db9ec823/libappindicator-sys-0.3.0/build.rs:37:27
note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.

warning: build failed, waiting for other jobs to finish...
error: build failed

The same error happens regardless of whether libappindicator is installed or not.


Also, I'd like to say that depending on libappindicator for tray support is likely a bad idea if this library is supposed to work with all DE/WM combinations since libappindicator doesn't work in all of them (I'm assuming here that libappindicator is the only tray backend used by systray crate). The only "working" solution is to provide "all" tray backends; here's a fairly comprehensive info on the issue: https://github.com/qTox/qTox/wiki/Tray-icon

lucasfernog commented 5 years ago

I installed libappindicator-gtk3 and it fixed the error on my case.

qdot commented 4 years ago

libappindicator has been updated, so this should work now. Please refile if this becomes an issue again.

lucasfernog commented 4 years ago

I had to install clang (I'm using Arch Linux), because I was getting this:

cargo:warning=couldn't execute `llvm-config --prefix` (error: No such file or directory (os error 2))
cargo:warning=set the LLVM_CONFIG_PATH environment variable to a valid `llvm-config` executable

--- stderr
thread 'main' panicked at 'Unable to find libclang: "couldn\'t find any valid shared libraries matching: [\'libclang.so\', \'libclang-*.so\', \'libclang.so.*\'], set the `LIBCLANG_PATH` environment variable to a path where one of these files can be found (invalid: [])"', src/libcore/result.rs:1188:5

I don't know if this is documented.