bevyengine / bevyengine/bevy

Feature `wayland` requires wayland-sys feature `dlopen`

Open
#19,725 6 comments 4 reactions 0 assignees View on GitHub
C-Bug I-Compile-Failure O-Linux S-Needs-Investigation
Dominant language
Rust
Stars
48.2k
Forks
4.8k
Avg merge
3d 16h
Merged PRs (30d)
171

Description

## Bevy version

v0.16.1

## \[Optional\] Relevant system information

cargo 1.87.0
Fedora Linux 42

## What you did

Add feature `wayland`

```toml
[dependencies]
bevy = {version = "0.16.1", features = ["wayland"]}
```

## What went wrong

Build fails with
```
error: failed to run custom build command for `wayland-sys v0.31.6`

Caused by:
process didn't exit successfully: `/home/barugon/Desktop/Dev/bevy_test/target/debug/build/wayland-sys-b04fb1abe32b5ec0/build-script-build` (exit status: 101)
--- stdout
cargo:rerun-if-env-changed=WAYLAND_CLIENT_NO_PKG_CONFIG
cargo:rerun-if-env-changed=PKG_CONFIG_x86_64-unknown-linux-gnu
cargo:rerun-if-env-changed=PKG_CONFIG_x86_64_unknown_linux_gnu
cargo:rerun-if-env-changed=HOST_PKG_CONFIG
cargo:rerun-if-env-changed=PKG_CONFIG
cargo:rerun-if-env-changed=WAYLAND_CLIENT_STATIC
cargo:rerun-if-env-changed=WAYLAND_CLIENT_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 /home/barugon/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/wayland-sys-0.31.6/build.rs:10:47:
called `Result::unwrap()` on an `Err` value:
pkg-config exited with status code 1
> PKG_CONFIG_ALLOW_SYSTEM_LIBS=1 PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 pkg-config --libs --cflags wayland-client

The system library `wayland-client` required by crate `wayland-sys` was not found.
The file `wayland-client.pc` needs to be installed and the PKG_CONFIG_PATH environment variable must contain its parent directory.
The PKG_CONFIG_PATH environment variable is not set.

HINT: if you have installed the library, try setting PKG_CONFIG_PATH to the directory containing `wayland-client.pc`.

note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
```

## Additional information

`wayland-sys` must be added as a dependency with the `dlopen` feature in order to build

```toml
[dependencies]
bevy = {version = "0.16.1", features = ["wayland"]}
wayland-sys = {version = "0.31", features = ["dlopen"]}
```

Contributor guide

Open the contributing guide

Research direction

Start by tracing Bevy's `wayland` feature and its Cargo dependency declarations, using the `[dependencies]` examples in the issue as the entry point. Reproduce the build with `bevy` 0.16.1 and the `wayland` feature, then verify that enabling only Bevy's feature no longer fails because `wayland-sys` lacks `dlopen`.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
desktop
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.