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

error: failed to run custom build command for libudev-sys v0.1.4 when running examples #2826

Open
LeSnake04 opened this issue Sep 14, 2021 · 4 comments
Labels
C-Bug An unexpected or incorrect behavior C-Dependencies A change to the crates that Bevy depends on O-Linux Specific to the Linux desktop operating system

Comments

@LeSnake04
Copy link

LeSnake04 commented Sep 14, 2021

Bevy version

The release number or commit hash of the version you're using.

Operating system & version

Artix(runit)

What you did

Tried running an example (Hello World failed too).

What you expected to happen

The example game starts.

What actually happened

The example fails to compile.

Additional information

Error log:

   Compiling libudev-sys v0.1.4
   Compiling quote v1.0.9
   Compiling memoffset v0.6.4
   Compiling getrandom v0.2.3
error: failed to run custom build command for `libudev-sys v0.1.4`

Caused by:
  process didn't exit successfully: `/home/<user>/tmp/bevy/target/debug/build/libudev-sys-50d1508ede402556/build-script-build` (exit status: 101)
  --- stdout
  cargo:rerun-if-env-changed=LIBUDEV_NO_PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG
  cargo:rerun-if-env-changed=LIBUDEV_STATIC
  cargo:rerun-if-env-changed=LIBUDEV_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
  thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: "`\"pkg-config\" \"--libs\" \"--cflags\" \"libudev\"` did not exit successfully: exit status: 1\n--- stderr\nPackage libudev was not found in the pkg-config search path.\nPerhaps you should add the directory containing `libudev.pc'\nto the PKG_CONFIG_PATH environment variable\nNo package 'libudev' found\n"', /home/<user>/.cargo/registry/src/github.com-1ecc6299db9ec823/libudev-sys-0.1.4/build.rs:38:41
  stack backtrace:
     0: rust_begin_unwind
               at /rustc/9bb77da74dac4768489127d21e32db19b59ada5b/library/std/src/panicking.rs:517:5
     1: core::panicking::panic_fmt
               at /rustc/9bb77da74dac4768489127d21e32db19b59ada5b/library/core/src/panicking.rs:96:14
     2: core::result::unwrap_failed
               at /rustc/9bb77da74dac4768489127d21e32db19b59ada5b/library/core/src/result.rs:1617:5
     3: core::result::Result<T,E>::unwrap
               at /rustc/9bb77da74dac4768489127d21e32db19b59ada5b/library/core/src/result.rs:1299:23
     4: build_script_build::main
               at ./build.rs:38:5
     5: core::ops::function::FnOnce::call_once
               at /rustc/9bb77da74dac4768489127d21e32db19b59ada5b/library/core/src/ops/function.rs:227:5
  note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
warning: build failed, waiting for other jobs to finish...
error: build failed```
@LeSnake04 LeSnake04 added C-Bug An unexpected or incorrect behavior S-Needs-Triage This issue needs to be labelled labels Sep 14, 2021
@alice-i-cecile alice-i-cecile added O-Linux Specific to the Linux desktop operating system C-Dependencies A change to the crates that Bevy depends on and removed S-Needs-Triage This issue needs to be labelled labels Sep 14, 2021
@DJMcNab
Copy link
Member

DJMcNab commented Sep 14, 2021

Have you tried installing libudev or udev from your system package manager? I do agree that this error message could be nicer.

Once you've worked out how to do so (for all the required dependencies), documenting it here would be welcome, and we can add it to https://github.com/bevyengine/bevy/blob/main/docs/linux_dependencies.md

@LeSnake04
Copy link
Author

Looks like there is no udev on Artix, they use system/eudev and system/libeudev instead.

@LeSnake04
Copy link
Author

LeSnake04 commented Sep 14, 2021

But i dont think its worth making workarounds, since gentoo stopped maintaining eudev and is switching back to udev, so its very likely artix will go to udev too.

@bjorn3
Copy link
Contributor

bjorn3 commented Sep 15, 2021

Seems like it will continue to be maintained after all:

eudev-project/eudev@4aeeabe and eudev-project/eudev@1d093c2

ADOPTION NOTICE (2021-09-14)

Currently eudev is in the process of being adopted by a newly formed project by Alpine, Devuan and Gentoo contributors (a-z order). Some of the below links and/or contacts may be outdated until the process is complete and all the infra set up.

[...]

@bjorn3 bjorn3 reopened this Sep 15, 2021
bors bot pushed a commit that referenced this issue Aug 29, 2022
# Objective

- There can be a confusing pkgconfig error on fedora.

## Solution

- Add troubleshooting guide for pkgconfig errors on fedora.

---

cc #2826
cc #5738

Co-authored-by: Carter Anderson <mcanders1@gmail.com>
james7132 pushed a commit to james7132/bevy that referenced this issue Oct 28, 2022
# Objective

- There can be a confusing pkgconfig error on fedora.

## Solution

- Add troubleshooting guide for pkgconfig errors on fedora.

---

cc bevyengine#2826
cc bevyengine#5738

Co-authored-by: Carter Anderson <mcanders1@gmail.com>
ItsDoot pushed a commit to ItsDoot/bevy that referenced this issue Feb 1, 2023
# Objective

- There can be a confusing pkgconfig error on fedora.

## Solution

- Add troubleshooting guide for pkgconfig errors on fedora.

---

cc bevyengine#2826
cc bevyengine#5738

Co-authored-by: Carter Anderson <mcanders1@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-Bug An unexpected or incorrect behavior C-Dependencies A change to the crates that Bevy depends on O-Linux Specific to the Linux desktop operating system
Projects
None yet
Development

No branches or pull requests

4 participants