jD91mZM2 / xidlehook

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

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

Closed senorsmile closed 5 years ago

senorsmile commented 5 years ago
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)
senorsmile commented 5 years ago

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

senorsmile commented 5 years ago

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.

jD91mZM2 commented 5 years ago

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

senorsmile commented 5 years ago

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:

The version in git is slightly newer than the v2.18.1 commit. 2.18.1 is this commit: https://github.com/erlepereira/x11-rs/commit/d49f4a4c06b6fca6f16dc851a5dd513f5b5e04ba

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

senorsmile commented 5 years ago

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.

jD91mZM2 commented 5 years ago

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.

mietzen commented 5 years ago
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

mietzen commented 5 years ago

I could resolve this by installing: libXScrnSaver-devel

jD91mZM2 commented 5 years ago

Perhaps these libs should be adressed by the README

Drudoo commented 5 years ago

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

jD91mZM2 commented 5 years ago

Closed by 6ecf46e03104a0ee60f8f103fc7a4502df8420bf

klover-rs commented 11 months ago

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

this ^^