jD91mZM2/xidlehook

error: failed to run custom build command for `x11 v2.18.1`

senorsmile opened this issue · 12 comments

error: failed to run custom build command for `x11 v2.18.1`
process didn't exit successfully: `/tmp/cargo-installLq5Q2g/release/build/x11-a378cd41792e6b5a/build-script-build` (exit code: 101)
--- stderr
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Failure { command: "\"pkg-config\" \"--libs\" \"--cflags\" \"x11 >= 1.4.99.1\"", output: Output { status: ExitStatus(ExitStatus(256)), stdout: "", stderr: "Package x11 was not found in the pkg-config search path.\nPerhaps you should add the directory containing `x11.pc\'\nto the PKG_CONFIG_PATH environment variable\nNo package \'x11\' found\n" } }', src/libcore/result.rs:1009:5
note: Run with `RUST_BACKTRACE=1` for a backtrace.

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

Caused by:
  build failed

Rust ver:

$ rustc --version
rustc 1.32.0 (9fda7c223 2019-01-16)

I tried going down to v 1.30.0, with the same error.

I tried checking out x11 directly:
https://github.com/erlepereira/x11-rs

it seems to build just fine. I'm not sure what's going on here.

Do you have x11 installed? What version? When you tried checking x11-rs out locally, was it version v2.18.1 exactly?

I do have x11 installed. I'm running standard ubuntu 18.04, which comes with gnome 3 (which depends on x11).

I tried installing both via:

  • cargo install x11-rs
  • git checkout

The version in git is slightly newer than the v2.18.1 commit. 2.18.1 is this commit:
AltF02/x11-rs@d49f4a4

I checked out that commit and it built fine as well.

I may not have tried to rebuild xidlehook after I did cargo install x11, because it's now building just fine; both in development and release modes. I'm not sure if there's still an issue here. I may try to spin up a vagrant machine on ubuntu 18.04 to reproduce.

cargo install x11 should definitely not make a difference, only if you did something like sudo apt install x11-dev or whatever the package is called on Ubuntu.

error: failed to run custom build command for `x11 v2.18.1`
process didn't exit successfully: `/tmp/cargo-install2mRuV5/release/build/x11-2963d22565052428/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\nPackage \'xscrnsaver\', required by \'virtual:world\', not found\n" } }', src/libcore/result.rs:1009:5
note: Run with `RUST_BACKTRACE=1` for a backtrace.

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

Caused by:
  build failed

I'm getting the same error on fedora 29 xfce, libX11-devel is installed

I could resolve this by installing: libXScrnSaver-devel

Perhaps these libs should be adressed by the README

On Debian it is fixed using sudo apt-get install libxss-dev

Closed by 6ecf46e

On Debian it is fixed using sudo apt-get install libxss-dev

this ^^