diwic / dbus-rs

D-Bus binding for the Rust language
Other
585 stars 131 forks source link

pkg config failed #451

Closed thewh1teagle closed 11 months ago

thewh1teagle commented 11 months ago

I have this library as dependency in my Rust project and I'm trying to build it with github workflow but the build failed with the error:

pkg_config failed: `PKG_CONFIG_ALLOW_SYSTEM_CFLAGS="1" PKG_CONFIG_ALLOW_SYSTEM_LIBS="1" PKG_CONFIG_PATH="/usr/local/lib/pkgconfig" "pkg-config" "--libs" "--cflags" "dbus-1" "dbus-1 >= 1.6"` did not exit successfully: exit status: 1
  error: could not find system library 'dbus-1' required by the 'libdbus-sys' crate

I followed the instruction and installed the required packages:

sudo apt-get update
sudo apt-get install --no-install-recommends -y libdbus-1-dev dbus at-spi2-core

I also checked what's my dbus-1 version:

Run dbus_version
dbus-1 version: 1.12

You can see the full workflow log here: Run dbus_version=$(pkg-config --modversion dbus-1) dbus-1 version: 1.12

https://github.com/thewh1teagle/rookie/actions/runs/6409300681/job/17400201117#step:5:13

diwic commented 11 months ago

Hmm, you seem to be compiling inside a docker container, but the libdbus-1-dev package is installed on the host, not inside the container. Therefore the libdbus-1-dev package is not available to the Rust compiler.

I can't verify because it seems like the workflow has disappeared.

Feel free to reopen in case you disagree and think there is a problem with libdbus-sys.