ERROR with Building for the Linux Host System

Hardware Platform: [DRIVE AGX Pegasus™ Developer Kit]
Software Version: [DRIVE Software 10]
Host Machine Version: [Ubuntu 18.04]
SDK Manager Version: [1.3.1.7110]

Oct’20 - Hi, When i fllow the basic tutorials:
mkdir build cd build
cmake -DCMAKE_BUILD_TYPE=Release /path/to/driveworks/samples/folder make -j

I meet fatal error: X11/Xcursor/Xcursor.h: No such file or directory at make -j. How can i do with this?

Hi @wangmingen,

Are you referring to /usr/local/driveworks/doc/nvsdk_html/dwx_samples_building_x86.html in your host system (after installing DRIVE Software 10)?
For DRIVE Software 10, “/path/to/driveworks/samples/folder” is at “/usr/local/driveworks/samples”. You should run below command.

$ cmake -DCMAKE_BUILD_TYPE=Release  /usr/local/driveworks/samples

Hi,VickNV,
Thanks for your reply,
Yes, i have installed DRIVE Software 10 and executed this command, but the error is still here.

Do you see the same issue on other host systems?
Please run below commands and provide all the log for our checking. Thanks!

$ cmake -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DCMAKE_BUILD_TYPE=Release  /usr/local/driveworks/samples
$ make 

I executed the commands,

$ cmake -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DCMAKE_BUILD_TYPE=RELEASE /usr/local/driveworks/samples
CMake Warning at cmake/SamplesSetBuildType.cmake:15 (message):
CMAKE_BUILD_TYPE must be one of (Debug|Release). Using Release as default.
Call Stack (most recent call first):
CMakeLists.txt:9 (include)

-- Could NOT find EGL (missing:  EGL_LIBRARY EGL_INCLUDE_DIR) 
-- Building with TRT version  and cudnn version 7.5.1.14
-- Building GLFW for X11 (static)
-- Driveworks Samples install dir: /home/wang/build/install
-- Found Driveworks 
-- Configuring done
-- Generating done
-- Build files have been written to: /home/wang/build

$ make
/usr/bin/cmake -H/usr/local/driveworks/samples -B/home/wang/build --check-build-system CMakeFiles/Makefile.cmake 0
/usr/bin/cmake -E cmake_progress_start /home/wang/build/CMakeFiles /home/wang/build/CMakeFiles/progress.marks
make -f CMakeFiles/Makefile2 all
make[1]: 进入目录“/home/wang/build”
make -f CMakeFiles/update_cuda_deps.dir/build.make CMakeFiles/update_cuda_deps.dir/depend
make[2]: 进入目录“/home/wang/build”
cd /home/wang/build && /usr/bin/cmake -E cmake_depends “Unix Makefiles” /usr/local/driveworks/samples /usr/local/driveworks/samples /home/wang/build /home/wang/build /home/wang/build/CMakeFiles/update_cuda_deps.dir/DependInfo.cmake --color=
make[2]: 离开目录“/home/wang/build”
make -f CMakeFiles/update_cuda_deps.dir/build.make CMakeFiles/update_cuda_deps.dir/build
make[2]: 进入目录“/home/wang/build”
[ 1%] Dependencies for /home/wang/build/src/imageprocessing/stereo/stereo/CMakeFiles/sample_stereo_disparity.dir//gen_utils.cu.o.depend.stamp
cd /home/wang/build/src/imageprocessing/stereo/stereo/CMakeFiles/sample_stereo_disparity.dir && /usr/bin/cmake -D verbose:BOOL=1 \ -D build_configuration:STRING=Release -P /home/wang/build/src/imageprocessing/stereo/stereo/CMakeFiles/sample_stereo_disparity.dir//gen_utils.cu.o_deps.cmake
– Generating dependency file: /home/wang/build/src/imageprocessing/stereo/stereo/CMakeFiles/sample_stereo_disparity.dir//gen_utils.cu.o.NVCC-depend
/usr/local/cuda/bin/nvcc -M -D__CUDACC__ /usr/local/driveworks/samples/src/imageprocessing/stereo/stereo/utils.cu -o /home/wang/build/src/imageprocessing/stereo/stereo/CMakeFiles/sample_stereo_disparity.dir//gen_utils.cu.o.NVCC-depend -ccbin /usr/bin/c++ -m64 -DLINUX -DLINUX -Xcompiler ,"-gsplit-dwarf","-Werror","-Wall","-Wunused","-Wunused-value","-Wunused-parameter","-O3","-DNDEBUG" -arch=sm_30 -lineinfo -std=c++11 -DNVCC -I/usr/local/cuda/include -I/usr/local/cuda/include -I/usr/include -I/home/wang/build/configured -I/usr/local/driveworks-2.2/targets/x86_64-Linux/include -I/home/wang/build/configured/samples
– Generating temporary cmake readable file: /home/wang/build/src/imageprocessing/stereo/stereo/CMakeFiles/sample_stereo_disparity.dir//gen_utils.cu.o.depend.tmp
/usr/bin/cmake -D input_file:FILEPATH=/home/wang/build/src/imageprocessing/stereo/stereo/CMakeFiles/sample_stereo_disparity.dir//gen_utils.cu.o.NVCC-depend -D output_file:FILEPATH=/home/wang/build/src/imageprocessing/stereo/stereo/CMakeFiles/sample_stereo_disparity.dir//gen_utils.cu.o.depend.tmp -P /usr/local/driveworks/samples/cmake/FindCUDA/make2cmake.cmake
– Copy if different /home/wang/build/src/imageprocessing/stereo/stereo/CMakeFiles/sample_stereo_disparity.dir//gen_utils.cu.o.depend.tmp to /home/wang/build/src/imageprocessing/stereo/stereo/CMakeFiles/sample_stereo_disparity.dir//gen_utils.cu.o.depend
/usr/bin/cmake -E copy_if_different /home/wang/build/src/imageprocessing/stereo/stereo/CMakeFiles/sample_stereo_disparity.dir//gen_utils.cu.o.depend.tmp /home/wang/build/src/imageprocessing/stereo/stereo/CMakeFiles/sample_stereo_disparity.dir//gen_utils.cu.o.depend
– Removing /home/wang/build/src/imageprocessing/stereo/stereo/CMakeFiles/sample_stereo_disparity.dir//gen_utils.cu.o.depend.tmp and /home/wang/build/src/imageprocessing/stereo/stereo/CMakeFiles/sample_stereo_disparity.dir//gen_utils.cu.o.NVCC-depend
/usr/bin/cmake -E remove /home/wang/build/src/imageprocessing/stereo/stereo/CMakeFiles/sample_stereo_disparity.dir//gen_utils.cu.o.depend.tmp /home/wang/build/src/imageprocessing/stereo/stereo/CMakeFiles/sample_stereo_disparity.dir//gen_utils.cu.o.NVCC-depend
– Updating timestamp /home/wang/build/src/imageprocessing/stereo/stereo/CMakeFiles/sample_stereo_disparity.dir//gen_utils.cu.o.depend.stamp
/usr/bin/cmake -E touch /home/wang/build/src/imageprocessing/stereo/stereo/CMakeFiles/sample_stereo_disparity.dir//gen_utils.cu.o.depend.stamp
[ 2%] Dependencies for /home/wang/build/src/image/image_common/CMakeFiles/dw_samples_image_common.dir//gen_utils.cu.o.depend.stamp
cd /home/wang/build/src/image/image_common/CMakeFiles/dw_samples_image_common.dir && /usr/bin/cmake -D verbose:BOOL=1 \ -D build_configuration:STRING=Release -P /home/wang/build/src/image/image_common/CMakeFiles/dw_samples_image_common.dir//gen_utils.cu.o_deps.cmake
– Generating dependency file: /home/wang/build/src/image/image_common/CMakeFiles/dw_samples_image_common.dir//gen_utils.cu.o.NVCC-depend
/usr/local/cuda/bin/nvcc -M -D__CUDACC__ /usr/local/driveworks/samples/src/image/image_common/utils.cu -o /home/wang/build/src/image/image_common/CMakeFiles/dw_samples_image_common.dir//gen_utils.cu.o.NVCC-depend -ccbin /usr/bin/c++ -m64 -DLINUX -DLINUX -Xcompiler ,"-gsplit-dwarf","-Werror","-Wall","-Wunused","-Wunused-value","-Wunused-parameter","-O3","-DNDEBUG" -arch=sm_30 -lineinfo -std=c++11 -DNVCC -I/usr/local/cuda/include -I/usr/local/cuda/include -I/usr/include -I/home/wang/build/configured -I/usr/local/driveworks-2.2/targets/x86_64-Linux/include -I/home/wang/build/configured/samples
– Generating temporary cmake readable file: /home/wang/build/src/image/image_common/CMakeFiles/dw_samples_image_common.dir//gen_utils.cu.o.depend.tmp
/usr/bin/cmake -D input_file:FILEPATH=/home/wang/build/src/image/image_common/CMakeFiles/dw_samples_image_common.dir//gen_utils.cu.o.NVCC-depend -D output_file:FILEPATH=/home/wang/build/src/image/image_common/CMakeFiles/dw_samples_image_common.dir//gen_utils.cu.o.depend.tmp -P /usr/local/driveworks/samples/cmake/FindCUDA/make2cmake.cmake
– Copy if different /home/wang/build/src/image/image_common/CMakeFiles/dw_samples_image_common.dir//gen_utils.cu.o.depend.tmp to /home/wang/build/src/image/image_common/CMakeFiles/dw_samples_image_common.dir//gen_utils.cu.o.depend
/usr/bin/cmake -E copy_if_different /home/wang/build/src/image/image_common/CMakeFiles/dw_samples_image_common.dir//gen_utils.cu.o.depend.tmp /home/wang/build/src/image/image_common/CMakeFiles/dw_samples_image_common.dir//gen_utils.cu.o.depend
– Removing /home/wang/build/src/image/image_common/CMakeFiles/dw_samples_image_common.dir//gen_utils.cu.o.depend.tmp and /home/wang/build/src/image/image_common/CMakeFiles/dw_samples_image_common.dir//gen_utils.cu.o.NVCC-depend
/usr/bin/cmake -E remove /home/wang/build/src/image/image_common/CMakeFiles/dw_samples_image_common.dir//gen_utils.cu.o.depend.tmp /home/wang/build/src/image/image_common/CMakeFiles/dw_samples_image_common.dir//gen_utils.cu.o.NVCC-depend
– Updating timestamp /home/wang/build/src/image/image_common/CMakeFiles/dw_samples_image_common.dir//gen_utils.cu.o.depend.stamp
/usr/bin/cmake -E touch /home/wang/build/src/image/image_common/CMakeFiles/dw_samples_image_common.dir//gen_utils.cu.o.depend.stamp
make[2]: 离开目录“/home/wang/build”
[ 2%] Built target update_cuda_deps
make -f 3rdparty/src/lodepng/CMakeFiles/lodepng-src.dir/build.make 3rdparty/src/lodepng/CMakeFiles/lodepng-src.dir/depend
make[2]: 进入目录“/home/wang/build”
cd /home/wang/build && /usr/bin/cmake -E cmake_depends “Unix Makefiles” /usr/local/driveworks/samples /usr/local/driveworks/samples/3rdparty/src/lodepng /home/wang/build /home/wang/build/3rdparty/src/lodepng /home/wang/build/3rdparty/src/lodepng/CMakeFiles/lodepng-src.dir/DependInfo.cmake --color=
make[2]: 离开目录“/home/wang/build”
make -f 3rdparty/src/lodepng/CMakeFiles/lodepng-src.dir/build.make 3rdparty/src/lodepng/CMakeFiles/lodepng-src.dir/build
make[2]: 进入目录“/home/wang/build”
[ 2%] Building CXX object 3rdparty/src/lodepng/CMakeFiles/lodepng-src.dir/src/lodepng.cpp.o
cd /home/wang/build/3rdparty/src/lodepng && /usr/bin/c++ -DLINUX -I/usr/local/cuda/include -I/home/wang/build/configured -I/usr/local/driveworks/samples/3rdparty/src/lodepng/include -gsplit-dwarf -Werror -Wall -Wunused -Wunused-value -Wunused-parameter -O3 -DNDEBUG -fPIC -std=gnu++14 -o CMakeFiles/lodepng-src.dir/src/lodepng.cpp.o -c /usr/local/driveworks/samples/3rdparty/src/lodepng/src/lodepng.cpp
[ 3%] Linking CXX static library liblodepng-src.a
cd /home/wang/build/3rdparty/src/lodepng && /usr/bin/cmake -P CMakeFiles/lodepng-src.dir/cmake_clean_target.cmake
cd /home/wang/build/3rdparty/src/lodepng && /usr/bin/cmake -E cmake_link_script CMakeFiles/lodepng-src.dir/link.txt --verbose=1
/usr/bin/ar qc liblodepng-src.a CMakeFiles/lodepng-src.dir/src/lodepng.cpp.o
/usr/bin/ranlib liblodepng-src.a
make[2]: 离开目录“/home/wang/build”
[ 3%] Built target lodepng-src
make -f 3rdparty/src/glfw/CMakeFiles/glfw-x11.dir/build.make 3rdparty/src/glfw/CMakeFiles/glfw-x11.dir/depend
make[2]: 进入目录“/home/wang/build”
cd /home/wang/build && /usr/bin/cmake -E cmake_depends “Unix Makefiles” /usr/local/driveworks/samples /usr/local/driveworks/samples/3rdparty/src/glfw /home/wang/build /home/wang/build/3rdparty/src/glfw /home/wang/build/3rdparty/src/glfw/CMakeFiles/glfw-x11.dir/DependInfo.cmake --color=
make[2]: 离开目录“/home/wang/build”
make -f 3rdparty/src/glfw/CMakeFiles/glfw-x11.dir/build.make 3rdparty/src/glfw/CMakeFiles/glfw-x11.dir/build
make[2]: 进入目录“/home/wang/build”
[ 4%] Building C object 3rdparty/src/glfw/CMakeFiles/glfw-x11.dir/3.2-screen/src/context.c.o
cd /home/wang/build/3rdparty/src/glfw && /usr/bin/cc -DLINUX -D_GLFW_USE_CONFIG_H -I/usr/local/cuda/include -I/home/wang/build/configured -I/usr/local/driveworks/samples/3rdparty/src/glfw/3.2-screen/src/…/include -I/home/wang/build/3rdparty/src/glfw/3.2-screen/src/x11 -gsplit-dwarf -O3 -DNDEBUG -fPIC -Wall -Wp,-w -std=gnu11 -o CMakeFiles/glfw-x11.dir/3.2-screen/src/context.c.o -c /usr/local/driveworks/samples/3rdparty/src/glfw/3.2-screen/src/context.c
In file included from /usr/local/driveworks/samples/3rdparty/src/glfw/3.2-screen/src/internal.h:163:0,
from /usr/local/driveworks/samples/3rdparty/src/glfw/3.2-screen/src/context.c:28:
/usr/local/driveworks/samples/3rdparty/src/glfw/3.2-screen/src/x11_platform.h:39:10: fatal error: X11/Xcursor/Xcursor.h: 没有那个文件或目录
#include <X11/Xcursor/Xcursor.h>
^~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
3rdparty/src/glfw/CMakeFiles/glfw-x11.dir/build.make:65: recipe for target ‘3rdparty/src/glfw/CMakeFiles/glfw-x11.dir/3.2-screen/src/context.c.o’ failed
make[2]: *** [3rdparty/src/glfw/CMakeFiles/glfw-x11.dir/3.2-screen/src/context.c.o] Error 1
make[2]: 离开目录“/home/wang/build”
CMakeFiles/Makefile2:221: recipe for target ‘3rdparty/src/glfw/CMakeFiles/glfw-x11.dir/all’ failed
make[1]: *** [3rdparty/src/glfw/CMakeFiles/glfw-x11.dir/all] Error 2
make[1]: 离开目录“/home/wang/build”
Makefile:132: recipe for target ‘all’ failed
make: *** [all] Error 2

hi, I installed libgles2-mesa-dev and reinstalled xrog-dev.
these solved the error
thank u for your support

1 Like

Thanks for letting us know~

Here is the related document (from /usr/local/driveworks/doc/nvsdk_html/dwx_devguide_getting_started.html on the host system with DRIVE Software installed):