deltaphc / raylib-rs

Rust bindings for raylib
Other
779 stars 135 forks source link

Can not build raylib-rs on Arch+Wayland #204

Open AbduEhab opened 1 month ago

AbduEhab commented 1 month ago

I am unable to build for Arch Linux with Wayland. I have added the "wayland" feature in the Cargo.toml. What am I supposed to do here?

Here is the full thing.


   Compiling raylib-sys v5.0.2
error: failed to run custom build command for `raylib-sys v5.0.2`

Caused by:
  process didn't exit successfully: `/home/deck/Documents/Git/raylib-test/target/debug/build/raylib-sys-dd53389748cf5d15/build-script-build` (exit status: 101)
  --- stdout
  cargo:rerun-if-changed=build.rs
  cargo:rerun-if-changed=./binding/binding.h
  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: cd "/home/deck/Documents/Git/raylib-test/target/debug/build/raylib-sys-1c048e4e290b0979/out/build" && CMAKE_PREFIX_PATH="" "cmake" "/home/deck/Documents/Git/raylib-test/target/debug/build/raylib-sys-1c048e4e290b0979/out/raylib" "-DCMAKE_BUILD_TYPE=Debug" "-DBUILD_EXAMPLES=OFF" "-DCMAKE_BUILD_TYPE=Debug" "-DSUPPORT_BUSY_WAIT_LOOP=OFF" "-DSUPPORT_FILEFORMAT_JPG=ON" "-DRAYMATH_STATIC_INLINE=ON" "-DUSE_WAYLAND=ON" "-DUSE_EXTERNAL_GLFW=ON" "-DOPENGL_VERSION=OFF" "-DSUPPORT_SCREEN_CAPTURE=ON" "-DSUPPORT_GIF_RECORDING=ON" "-DPLATFORM=Desktop" "-DCMAKE_INSTALL_PREFIX=/home/deck/Documents/Git/raylib-test/target/debug/build/raylib-sys-1c048e4e290b0979/out" "-DCMAKE_C_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64" "-DCMAKE_C_COMPILER=/usr/bin/cc" "-DCMAKE_CXX_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64" "-DCMAKE_CXX_COMPILER=/usr/bin/c++" "-DCMAKE_ASM_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64" "-DCMAKE_ASM_COMPILER=/usr/bin/cc"
  -- The C compiler identification is GNU 13.1.1
  -- The CXX compiler identification is GNU 13.1.1
  -- Detecting C compiler ABI info
  -- Detecting C compiler ABI info - done
  -- Check for working C compiler: /usr/bin/cc - skipped
  -- Detecting C compile features
  -- Detecting C compile features - done
  -- Detecting CXX compiler ABI info
  -- Detecting CXX compiler ABI info - done
  -- Check for working CXX compiler: /usr/bin/c++ - skipped
  -- Detecting CXX compile features
  -- Detecting CXX compile features - done
  -- Performing Test COMPILER_HAS_THOSE_TOGGLES
  -- Performing Test COMPILER_HAS_THOSE_TOGGLES - Success
  -- Testing if -Werror=pointer-arith can be used -- compiles
  -- Testing if -Werror=implicit-function-declaration can be used -- compiles
  -- Testing if -fno-strict-aliasing can be used -- compiles
  -- Using external GLFW
  -- Audio Backend: miniaudio
  -- Building raylib static library
  -- Generated build type: Debug
  -- Compiling with the flags:
  --   PLATFORM=PLATFORM_DESKTOP
  --   GRAPHICS=GRAPHICS_API_OPENGL_33
  -- Configuring done (0.7s)
  -- Generating done (0.0s)

  --- stderr
  CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
  Please set them or make sure they are set and tested correctly in the CMake files:
  /home/deck/Documents/Git/raylib-test/target/debug/build/raylib-sys-1c048e4e290b0979/out/raylib/src/OPENGL_INCLUDE_DIR
     used as include directory in directory /home/deck/Documents/Git/raylib-test/target/debug/build/raylib-sys-1c048e4e290b0979/out/raylib/src

  CMake Warning:
    Manually-specified variables were not used by the project:

      CMAKE_ASM_COMPILER
      CMAKE_ASM_FLAGS
      RAYMATH_STATIC_INLINE

  CMake Generate step failed.  Build files cannot be regenerated correctly.
  thread 'main' panicked at /home/deck/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cmake-0.1.51/src/lib.rs:1100:5:

  command did not execute successfully, got: exit status: 1

  build script failed, must exit now
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace```
AbduEhab commented 1 month ago

I do have the mesa lib so I don't know why it cant find the opengl include dir.

Screenshot_20241011_170905

juliohq commented 3 weeks ago

Does it work to build this specific version of the raylib library on your system?

IoIxD commented 2 weeks ago

Development happens over on raylib-rs/raylib-rs now, by the way. If this is a bug you may consider opening an issue there.