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 -> libjack.so.0
  -- dynamic libpulse-simple -> libpulse-simple.so.0
  -- dynamic libesd -> libesd.so.0
  -- Checking for modules 'bcm_host;brcmegl'
  --   No package 'bcm_host' found
  --   No package 'brcmegl' found
  -- dynamic libX11 -> libX11.so.6
  -- dynamic libXext -> libXext.so.6
  -- dynamic libXcursor -> libXcursor.so.1
  -- dynamic libXinerama -> libXinerama.so.1
  -- dynamic libXi -> libXi.so.6
  -- dynamic libXrandr -> libXrandr.so.2
  -- dynamic libXrender -> libXrender.so.1
  -- dynamic libXss -> libXss.so.1
  -- dynamic libXxf86vm -> libXxf86vm.so.1
  -- 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
    CMake.

    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
    package?
  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!

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:
macro(CheckX11)
if(VIDEO_X11)
foreach(_LIB X11 Xext Xcursor Xinerama Xi Xrandr Xrender Xss Xxf86vm)
FindLibraryAndSONAME("${_LIB}")
endforeach()

find_path(X_INCLUDEDIR X11/Xlib.h
    /usr/pkg/xorg/include
    /usr/X11R6/include
    /usr/X11R7/include
    /usr/local/include/X11
    /usr/include/X11
    /usr/openwin/include
    /usr/openwin/share/include
    /opt/graphics/OpenGL/include
    /opt/X11/include
)

if(X_INCLUDEDIR)
  list(APPEND EXTRA_CFLAGS "-I${X_INCLUDEDIR}")
  list(APPEND CMAKE_REQUIRED_INCLUDES "${X_INCLUDEDIR}")
endif()

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

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.