Build a little orbtk example failed, please give me some help

Hi Guys,
I am a new beginner of Rust, I have run a little example of orbtk, But I have got the following errors:

Caused by:
  process didn't exit successfully: `/home/WorkZone/workspace/projects/RustProject/orbtk_demo/target/debug/build/sdl2-sys-5d6096de414466ed/build-script-build` (exit code: 101)
  --- stdout
  running: "cmake" "/home/WorkZone/workspace/projects/RustProject/orbtk_demo/target/debug/build/sdl2-sys-668e2cb3362c75f8/out/SDL2-2.0.12" "-DSDL_SHARED=OFF" "-DSDL_STATIC=ON" "-DCMAKE_INSTALL_PREFIX=/home/WorkZone/workspace/projects/RustProject/orbtk_demo/target/debug/build/sdl2-sys-668e2cb3362c75f8/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=/opt/Tools/GNU/gcc-9.3.0/bin/c++" "-DCMAKE_ASM_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64" "-DCMAKE_ASM_COMPILER=/usr/bin/cc" "-DCMAKE_BUILD_TYPE=release"
  -- dynamic libjack ->
  -- dynamic libpulse-simple ->
  -- dynamic libesd ->
  -- Checking for modules 'bcm_host;brcmegl'
  --   No package 'bcm_host' found
  --   No package 'brcmegl' found
  -- dynamic libX11 ->
  -- dynamic libXext ->
  -- dynamic libXcursor ->
  -- dynamic libXinerama ->
  -- dynamic libXi ->
  -- dynamic libXrandr ->
  -- dynamic libXrender ->
  -- dynamic libXss ->
  -- dynamic libXxf86vm ->
  -- Configuring incomplete, errors occurred!
  See also "/home/WorkZone/workspace/projects/RustProject/orbtk_demo/target/debug/build/sdl2-sys-668e2cb3362c75f8/out/build/CMakeFiles/CMakeOutput.log".
  See also "/home/WorkZone/workspace/projects/RustProject/orbtk_demo/target/debug/build/sdl2-sys-668e2cb3362c75f8/out/build/CMakeFiles/CMakeError.log".

  --- stderr
  CMake Deprecation Warning at CMakeLists.txt:5 (cmake_minimum_required):
    Compatibility with CMake < 2.8.12 will be removed from a future version of

    Update the VERSION argument <min> value or use a ...<max> suffix to tell
    CMake that the project does not need compatibility with older versions.

  CMake Error at cmake/macros.cmake:28 (message):
    *** ERROR: Missing Xext.h, maybe you need to install the libxext-dev
  Call Stack (most recent call first):
    cmake/sdlchecks.cmake:413 (message_error)
    CMakeLists.txt:1128 (CheckX11)

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

I have already installed libXext by yum, but the error is still there.

Please give me help. Thanks!

You might not have libXext-devel (which contains the header files). Try installing it with yum.

Hi Sir, I have already installed the libXext-devel.x86_64 and libXext-devel.i686, but the error is stiil there.

Some ENVs are:
Centos 7.5
RUST 1.50.0
GCC 9.3.0
CMake 3.19.3

The Xext.h is /usr/include/X11/extensions/Xext.h.

RUST run other none-gui example is ok.

And also I found some information in sdlchecks.cmake as bellow:
foreach(_LIB X11 Xext Xcursor Xinerama Xi Xrandr Xrender Xss Xxf86vm)

find_path(X_INCLUDEDIR X11/Xlib.h


check_include_file(X11/Xcursor/Xcursor.h HAVE_XCURSOR_H)
check_include_file(X11/extensions/Xinerama.h HAVE_XINERAMA_H)
check_include_file(X11/extensions/XInput2.h HAVE_XINPUT_H)
check_include_file(X11/extensions/Xrandr.h HAVE_XRANDR_H)
check_include_file(X11/extensions/Xrender.h HAVE_XRENDER_H)
check_include_file(X11/extensions/scrnsaver.h HAVE_XSS_H)
check_include_file(X11/extensions/shape.h HAVE_XSHAPE_H)
check_include_files("X11/Xlib.h;X11/extensions/xf86vmode.h" HAVE_XF86VM_H)
check_include_files("X11/Xlib.h;X11/Xproto.h;X11/extensions/Xext.h" HAVE_XEXT_H)

The X_INCLUDEDIR does not include " /usr/include/X11/extensions".

I don't know whether it is a fault, and also I don't how to do next.

It looks like a problem when building sdl2-sys specifically. There might be some luck to be had googling around that?

The log file(s) might be helpful to read.

That's a bit alarming. You should only need one of these, installing both is possibly(?) a problem. You probably want to keep libXext-devel.x86_64 as it is for 64 bit systems, which I assume you have. Could be worth double checking? - more googling to do :slight_smile:

These are just some guesses. My only other advice is to search GitHub issues on orbtk and sdl2-sys to see if this has been solved before. If not, it is probably worth raising an issue yourself