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

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

Open
AbduEhab opened this issue Oct 11, 2024 · 10 comments
Open

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

AbduEhab opened this issue Oct 11, 2024 · 10 comments

Comments

@AbduEhab
Copy link

AbduEhab commented Oct 11, 2024

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 AbduEhab changed the title Can not build Example on Arch+Wayland Can not build raylib-rs on Arch+Wayland Oct 11, 2024
@AbduEhab
Copy link
Author

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

Screenshot_20241011_170905

@juliohq
Copy link

juliohq commented Oct 23, 2024

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

@IoIxD
Copy link
Contributor

IoIxD commented Oct 29, 2024

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

@AbduEhab
Copy link
Author

AbduEhab commented Nov 19, 2024

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

It does not. I get this error:
image

Why would it look for x11 when I'm on Wayland? Is there a flag I can set?

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

Should I close this issue and open another one there? I'm not sure if this is an issue or if I'm just dumb.

@IoIxD
Copy link
Contributor

IoIxD commented Nov 19, 2024

It does not. I get this error [...] Why would it look for x11 when I'm on Wayland? Is there a flag I can set?

Yes, there is an appropriately named feature flag.

Should I close this issue and open another one there?

We check the other repo more but either works.
If you do close here, edit your post to say where it moved for others who have the same issue.

@AbduEhab
Copy link
Author

I have tried downloading the raylib package from the pacman and I can now compile and run the raylib cpp template project. I have added the feature 'wayland' in my cargo.toml file and am still getting the error in the original post
image

@IoIxD
Copy link
Contributor

IoIxD commented Nov 24, 2024

image

Can you tell me what version of Arch Linux you're on so I can reproduce this?

@AbduEhab
Copy link
Author

AbduEhab commented Nov 25, 2024

Here you go.

image

I have tried compiling in a distrobox with arch and it compiled normally and ran on the host machine with no problems. This seems like a steamdeck specific issue.

@IoIxD
Copy link
Contributor

IoIxD commented Nov 27, 2024

Does the version compiled on Arch work on the Steam Deck?

Furthermore, can you get SteamOS working in distrobox?

@AbduEhab
Copy link
Author

Does the version compiled on Arch work on the Steam Deck?

Do you mean the one on the arch repo?

Furthermore, can you get SteamOS working in distrobox?

Yes, SteamOS is based on arch. It comes pre-packaged with distrobox.

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

3 participants