didzc11
didzc11

Reputation: 113

Cargo error: failed to run custom build command for `atk-sys v0.10.0`

I am trying to buld this program: https://github.com/elkowar/eww But I don't have any Rust knowledge and I was wondering if someone can explain to me what that build error means. I installed the Nightly version of Rust.

Here are the build error messages:

shell # ❯ cargo build --release
   Compiling cfg-expr v0.8.0
   Compiling glib-macros v0.14.1
   Compiling atk-sys v0.10.0
   Compiling gdk-pixbuf-sys v0.10.0
   Compiling gio v0.9.1
   Compiling cairo-rs v0.9.1
   Compiling pango v0.9.1
error: failed to run custom build command for `atk-sys v0.10.0`

Caused by:
  process didn't exit successfully: `/home/$USER/eww/target/release/build/atk-sys-1accfaa96217e653/build-script-build` (exit status: 1)
  --- stdout
  cargo:rerun-if-env-changed=ATK_NO_PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG
  cargo:rerun-if-env-changed=ATK_STATIC
  cargo:rerun-if-env-changed=ATK_DYNAMIC
  cargo:rerun-if-env-changed=PKG_CONFIG_ALL_STATIC
  cargo:rerun-if-env-changed=PKG_CONFIG_ALL_DYNAMIC
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64-unknown-linux-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64_unknown_linux_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_PATH
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64-unknown-linux-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64_unknown_linux_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_LIBDIR
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64-unknown-linux-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64_unknown_linux_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_SYSROOT_DIR
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR

  --- stderr
  `"pkg-config" "--libs" "--cflags" "atk" "atk >= 2.14"` did not exit successfully: exit status: 1
  --- stderr
  Package atk was not found in the pkg-config search path.
  Perhaps you should add the directory containing `atk.pc'
  to the PKG_CONFIG_PATH environment variable
  No package 'atk' found
  Package atk was not found in the pkg-config search path.
  Perhaps you should add the directory containing `atk.pc'
  to the PKG_CONFIG_PATH environment variable
  No package 'atk' found

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

As I can see from this error message: Package atk was not found in the pkg-config search path. I need to add it or install it, but i don't know what the PKG_CONFIG_PATH is.


Here is as well my sistem information and version of cargo:

Cargo: 1.55.0-nightly (cebef2951 2021-07-22)

OS: Ubuntu 21.04 x86_64

Kernel: 5.11.0-25-generic

Upvotes: 9

Views: 4636

Answers (1)

anilbey
anilbey

Reputation: 1977

On Ubuntu 22.10 having libatk1.0-0 package alone does not solve it. We also need the librust-atk-dev package.

❯ sudo apt-get install librust-atk-dev

In case of any doubt on the package name, best is to search for it using apt-cache.

❯ sudo apt-cache search atk-dev
                                                                                                                                                                             
libghc-gi-atk-dev - ATK bindings
librust-atk-dev - Rust bindings for the ATK library - Rust source code

Upvotes: 8

Related Questions