jD91mZM2 / xidlehook

GitLab: https://gitlab.com/jD91mZM2/xidlehook
MIT License
385 stars 33 forks source link

cargo install fails on openSUSE Tumbleweed #20

Closed MichaelAquilina closed 5 years ago

MichaelAquilina commented 5 years ago
error: failed to run custom build command for `x11 v2.18.1`
process didn't exit successfully: `/tmp/cargo-installzhYMGX/release/build/x11-89e8a677ff79890c/build-script-build` (exit code: 101)
--- stdout
cargo:rustc-link-search=native=/usr/lib64
cargo:rustc-link-lib=X11

--- stderr
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Failure { command: "\"pkg-config\" \"--libs\" \"--cflags\" \"xscrnsaver >= 1.2\"", output: Output { status: ExitStatus(ExitStatus(256)), stdout: "", stderr: "Package xscrnsaver was not found in the pkg-config search path.\nPerhaps you should add the directory containing `xscrnsaver.pc\'\nto the PKG_CONFIG_PATH environment variable\nNo package \'xscrnsaver\' found\n" } }', src/libcore/result.rs:997:5
note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.

warning: build failed, waiting for other jobs to finish...
error: failed to compile `xidlehook v0.7.0`, intermediate artifacts can be found at `/tmp/cargo-installzhYMGX`

I tried to look for a package named xscrnsaver using the opensuse package manager but I didnt find any matches:

zypper se xscrnsaver  
Loading repository data...
Reading installed packages...
No matching items found.

There is a package called xscreensaver, but its already installed:

zypper se xscreensaver 
Loading repository data...
Reading installed packages...

S | Name                    | Summary                                           | Type   
--+-------------------------+---------------------------------------------------+--------
i | xscreensaver            | A screen saver and locker for the X Window System | package
i | xscreensaver-data       | Selection of screensavers from xscreensaver       | package
  | xscreensaver-data-extra | Selection of screensavers from xscreensaver       | package
i | xscreensaver-lang       | Translations for package xscreensaver             | package

Is this just the case that opensuse has a different name for the package xidlehook is trying to look for?

jD91mZM2 commented 5 years ago

It should be called libXScrnSaver according to https://software.opensuse.org/. Let me know if this works!

MichaelAquilina commented 5 years ago

That package already seems to be installed

sudo zypper in libXScrnSaver
Loading repository data...
Reading installed packages...
'libXScrnSaver' not found in package names. Trying capabilities.
'libXss1' providing 'libXScrnSaver' is already installed.
Resolving package dependencies...

Nothing to do.

However trying to look for any file with that name fails:

find / -iname "*xscrnsaver*" 2>/dev/null
<no results>

Is there a particular file that is being looked for?

Btw if you wish to try reproduce this yourself, you could probably use docker

docker run -ti opensuse/tumbleweed
jD91mZM2 commented 5 years ago

What about libXss1? I found it in the, perhaps related, issue https://github.com/atom/atom/issues/13354.

MichaelAquilina commented 5 years ago

@jD91mZM2 yep that was it!

sudo zypper in libXss-devel

Maybe we can add this to the wiki or README?

jD91mZM2 commented 5 years ago

Hmm, I don't know. I just saw it says

Xidlehook with the default settings requires libXScrnSaver (or libxss) and libpulseaudio. On debian/ubuntu, don't forget to install the -dev versions, also.

I don't want to get too specific in the README, as there are so many distros it'd take a lot of space to list them all. Maybe I could make a wiki entry?