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

Build Error - Missing libdbus-sys dependency #194

Closed
justinmoon opened this issue Jun 2, 2018 · 2 comments
Closed

Build Error - Missing libdbus-sys dependency #194

justinmoon opened this issue Jun 2, 2018 · 2 comments

Comments

@justinmoon
Copy link

On Ubuntu 16.04 I got the following error upon running cargo build --release :

error: failed to run custom build command for `libdbus-sys v0.1.3`
process didn't exit successfully: `/home/justin/dev/clones/i3status-rust/target/release/build/libdbus-sys-00ab9bb93d8ed084/build-script-build` (exit code: 101)
--- stderr
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Failure { command: "\"pkg-config\" \"--libs\" \"--cflags\" \"dbus-1 >= 1.6\"", output: Output { status: ExitStatus(ExitStatus(256)), stdout: "", stderr: "Package dbus-1 was not found in the pkg-config search path.\nPerhaps you should add the directory containing `dbus-1.pc\'\nto the PKG_CONFIG_PATH environment variable\nNo package \'dbus-1\' found\n" } }', libcore/result.rs:945:5
note: Run with `RUST_BACKTRACE=1` for a backtrace.

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

Upon running apt search libdbus the following showed up:

dbus/xenial-updates,now 1.10.6-1ubuntu3.3 amd64 [installed]
  simple interprocess messaging system (daemon and utilities)
...
libdbus-1-3/xenial-updates,now 1.10.6-1ubuntu3.3 amd64 [installed]
  simple interprocess messaging system (library)
...

This fixed it:

sudo apt install libdbus-1-dev

I don't know much about Rust, but it seems the libdbus-sys 0.1.3 declaration in Cargo.lock isn't quite right -- since I had this dependency satisfied and the build failed, but the build succeeded when I upgraded it to libdbus-1-dev.

My 2 cents ...

@lausek
Copy link
Contributor

lausek commented Jun 2, 2018

just want to add a relation to issue #184

@svmnotn
Copy link
Contributor

svmnotn commented Jun 3, 2018

I found this in dbus-rs's Requirements section of their README, perhaps we should add it to our own requirements:

Libdbus 1.6 or higher, and latest stable release of Rust. If you run Ubuntu, this translates to Ubuntu 14.04 or later, having the libdbus-1-dev package installed while building, and the libdbus-1-3 package installed while running.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants