Skip to content

Commit

Permalink
Add troubleshooting for pkgconfig errors on fedora (bevyengine#5821)
Browse files Browse the repository at this point in the history
# 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>
  • Loading branch information
2 people authored and ItsDoot committed Feb 1, 2023
1 parent 505eb16 commit b436179
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions docs/linux_dependencies.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,35 @@ Add your arch to the end of the package to remove the linker error. For example:
sudo dnf install alsa-lib-devel.x86_64
```

Or if there are errors such as:

```txt
--- 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
```

Set the `PKG_CONFIG_PATH` env var to `/usr/lib/<target>/pkgconfig/`. For example on an x86_64 system:

```txt
export PKG_CONFIG_PATH="/usr/lib/x86_64-linux-gnu/pkgconfig/"
```

## Arch / Manjaro

```bash
Expand Down

0 comments on commit b436179

Please sign in to comment.