Skip to content

Feature wayland requires wayland-sys feature dlopen #19725

Open
@Barugon

Description

@Barugon

Bevy version

v0.16.1

[Optional] Relevant system information

cargo 1.87.0
Fedora Linux 42

What you did

Add feature wayland

[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

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-BugAn unexpected or incorrect behaviorO-LinuxSpecific to the Linux desktop operating systemP-Compile-FailureA failure to compile Bevy appsS-Ready-For-ImplementationThis issue is ready for an implementation PR. Go for it!

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions