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

Compilation Error on Wayland for version 0.46.0 #512

Closed
EriKWDev opened this issue Oct 31, 2022 · 4 comments
Closed

Compilation Error on Wayland for version 0.46.0 #512

EriKWDev opened this issue Oct 31, 2022 · 4 comments

Comments

@EriKWDev
Copy link

EriKWDev commented Oct 31, 2022

I'm in the process of migrating egui_glfw_gl to latest version of glfw, but getting the following error when I change to 0.46.0 release on wayland (fedora).

> cargo version -v
cargo 1.64.0 (387270bc7 2022-09-16)
release: 1.64.0
commit-hash: 387270bc7f446d17869c7f208207c73231d6a252
commit-date: 2022-09-16
host: x86_64-unknown-linux-gnu
libgit2: 1.4.2 (sys:0.14.2 vendored)
libcurl: 7.83.1-DEV (sys:0.4.55+curl-7.83.1 vendored ssl:OpenSSL/1.1.1q)
os: Fedora 36.0.0 [64-bit]
error: failed to run custom build command for `glfw-sys v4.0.0+3.3.5`

Caused by:
  process didn't exit successfully: `/home/erik/Documents/GitHub/forks/egui_glfw_gl/target/debug/build/glfw-sys-ad1b1021c1502d5c/build-script-build` (exit status: 101)
  --- stdout
  CMAKE_TOOLCHAIN_FILE_x86_64-unknown-linux-gnu = None
  CMAKE_TOOLCHAIN_FILE_x86_64_unknown_linux_gnu = None
  HOST_CMAKE_TOOLCHAIN_FILE = None
  CMAKE_TOOLCHAIN_FILE = None
  CMAKE_GENERATOR_x86_64-unknown-linux-gnu = None
  CMAKE_GENERATOR_x86_64_unknown_linux_gnu = None
  HOST_CMAKE_GENERATOR = None
  CMAKE_GENERATOR = None
  CMAKE_PREFIX_PATH_x86_64-unknown-linux-gnu = None
  CMAKE_PREFIX_PATH_x86_64_unknown_linux_gnu = None
  HOST_CMAKE_PREFIX_PATH = None
  CMAKE_PREFIX_PATH = None
  CMAKE_x86_64-unknown-linux-gnu = None
  CMAKE_x86_64_unknown_linux_gnu = None
  HOST_CMAKE = None
  CMAKE = None
  running: "cmake" "/home/erik/.cargo/registry/src/github.com-1ecc6299db9ec823/glfw-sys-4.0.0+3.3.5/." "-DGLFW_BUILD_EXAMPLES=OFF" "-DGLFW_BUILD_TESTS=OFF" "-DGLFW_BUILD_DOCS=OFF" "-DCMAKE_INSTALL_LIBDIR=lib" "-DGLFW_BUILD_WAYLAND=ON" "-DCMAKE_INSTALL_PREFIX=/home/erik/Documents/GitHub/forks/egui_glfw_gl/target/debug/build/glfw-sys-3acccad1d5d4f989/out" "-DCMAKE_C_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64" "-DCMAKE_C_COMPILER=/usr/lib64/ccache/cc" "-DCMAKE_CXX_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64" "-DCMAKE_CXX_COMPILER=/usr/lib64/ccache/c++" "-DCMAKE_ASM_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64" "-DCMAKE_ASM_COMPILER=/usr/lib64/ccache/cc" "-DCMAKE_BUILD_TYPE=Debug"
  -- Using Wayland for window creation
  -- Configuring incomplete, errors occurred!
  See also "/home/erik/Documents/GitHub/forks/egui_glfw_gl/target/debug/build/glfw-sys-3acccad1d5d4f989/out/build/CMakeFiles/CMakeOutput.log".

  --- stderr
  CMake Error at CMakeLists.txt:259 (find_package):
    Could not find a package configuration file provided by "ECM" with any of
    the following names:

      ECMConfig.cmake
      ecm-config.cmake

    Add the installation prefix of "ECM" to CMAKE_PREFIX_PATH or set "ECM_DIR"
    to a directory containing one of the above files.  If "ECM" provides a
    separate development package or SDK, be sure it has been installed.


  thread 'main' panicked at '
  command did not execute successfully, got: exit status: 1

  build script failed, must exit now', /home/erik/.cargo/registry/src/github.com-1ecc6299db9ec823/cmake-0.1.48/src/lib.rs:975:5
  stack backtrace:
     0: rust_begin_unwind
               at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/std/src/panicking.rs:584:5
     1: core::panicking::panic_fmt
               at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/core/src/panicking.rs:142:14
     2: cmake::fail
               at /home/erik/.cargo/registry/src/github.com-1ecc6299db9ec823/cmake-0.1.48/src/lib.rs:975:5
     3: cmake::run
               at /home/erik/.cargo/registry/src/github.com-1ecc6299db9ec823/cmake-0.1.48/src/lib.rs:953:9
     4: cmake::Config::build
               at /home/erik/.cargo/registry/src/github.com-1ecc6299db9ec823/cmake-0.1.48/src/lib.rs:780:13
     5: build_script_build::main
               at ./build.rs:13:9
     6: core::ops::function::FnOnce::call_once
               at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/core/src/ops/function.rs:248:5
  note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
warning: build failed, waiting for other jobs to finish...

Compilation works with version 0.45.0. Also, if I turn off defualt-features for version 0.46.0 and only enable glfw-sys feature, compilation still works fine.

@EriKWDev
Copy link
Author

@Techniker123 maybe has any clues..?

@Frostie314159
Copy link
Contributor

This isn't actually a glfw_sys issue. I ran into this to while writing the patches in #507. There is a question on superuser, that explains how to solve this: here

@EriKWDev
Copy link
Author

That was it! I got a second error later which was resolved by also installing "wayland-protocols-devel".

Is there any official list anywhere for what dependencies are required and could/should we link to it in the README? Found this but not any more "official"

@EriKWDev
Copy link
Author

EriKWDev commented Oct 31, 2022

image
The border looks a bit weird though and when trying to resize or move it around I get weird results (wrong side of the window scaling and so on).

Do you guys observe this behaviour as well with other apps on wayland with glfw or does this warrant a new issue? (or is this libadwaita-related..?)

@EriKWDev EriKWDev closed this as completed Jan 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants