I want that my Kinect 2 is recognized as webcam on ubuntu 21.10 + nvidia driver 470.86 + cuda 11.4 :
marietto-BHYVE:/home/marietto# nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2021 NVIDIA Corporation
Built on Mon_May__3_19:15:13_PDT_2021
Cuda compilation tools, release 11.3, V11.3.109
Build cuda_11.3.r11.3/compiler.29920130_0
marietto-BHYVE:/home/marietto/Scrivania/libfreenect2# nvidia-smi
| NVIDIA-SMI 470.86 Driver Version: 470.86 CUDA Version: 11.4
To accomplish the task I’ve followed this tutorial :
https://www.notaboutmy.life/posts/run-kinect-2-on-ubuntu-20-lts/
and I have issued the following commands :
git clone https://github.com/OpenKinect/libfreenect2.git
cd libfreenect2
mkdir build && cd build
cmake ..
but at some point,I’ve got this error :
marietto-BHYVE:/home/marietto/Scrivania/libfreenect2/build# make
-- using tinythread as threading library
-- Could NOT find TegraJPEG (missing: TegraJPEG_INCLUDE_DIRS TegraJPEG_WORKS)
CMake Warning (dev) at /usr/share/cmake-3.18/Modules/FindOpenGL.cmake:305 (message):
Policy CMP0072 is not set: FindOpenGL prefers GLVND by default when
available. Run "cmake --help-policy CMP0072" for policy details. Use the
cmake_policy command to set the policy and suppress this warning.
FindOpenGL found both a legacy GL library:
OPENGL_gl_LIBRARY: /usr/lib/x86_64-linux-gnu/libGL.so
and GLVND libraries for OpenGL and GLX:
OPENGL_opengl_LIBRARY: /usr/lib/x86_64-linux-gnu/libOpenGL.so
OPENGL_glx_LIBRARY: /usr/lib/x86_64-linux-gnu/libGLX.so
OpenGL_GL_PREFERENCE has not been set to "GLVND" or "LEGACY", so for
compatibility with CMake 3.10 and below the legacy GL library will be used.
Call Stack (most recent call first):
CMakeLists.txt:269 (FIND_PACKAGE)
This warning is for project developers. Use -Wno-dev to suppress it.
-- Linking with these libraries:
/usr/lib/x86_64-linux-gnu/libusb-1.0.so
pthread
va-drm
va
/usr/lib/x86_64-linux-gnu/libjpeg.so
/usr/lib/x86_64-linux-gnu/libturbojpeg.so.0
/usr/lib/x86_64-linux-gnu/libglfw.so
/usr/lib/x86_64-linux-gnu/libGL.so
/usr/lib/x86_64-linux-gnu/libOpenCL.so
/usr/lib/x86_64-linux-gnu/libcudart_static.a
Threads::Threads
dl
/usr/lib/x86_64-linux-gnu/librt.a
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)
-- Configurating examples
-- Using in-tree freenect2 target
-- Feature list:
-- CUDA yes
-- CXX11 disabled
-- Examples yes
-- OpenCL yes
-- OpenGL yes
-- OpenNI2 yes
-- TegraJPEG no
-- Threading tinythread
-- TurboJPEG yes
-- VAAPI yes
-- VideoToolbox no (Apple only)
-- streamer_recorder disabled
-- Configuring done
-- Generating done
-- Build files have been written to: /home/marietto/Scrivania/libfreenect2/build
[ 4%] Built target generate_resources_tool
[ 7%] Building NVCC (Device) object CMakeFiles/cuda_compile_1.dir/src/cuda_compile_1_generated_cuda_kde_depth_packet_processor.cu.o
/home/marietto/Scrivania/libfreenect2/src/cuda_kde_depth_packet_processor.cu:39:10: fatal error: helper_math.h: File o directory non esistente
39 | #include <helper_math.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
CMake Error at cuda_compile_1_generated_cuda_kde_depth_packet_processor.cu.o.RelWithDebInfo.cmake:220 (message):
Error generating
/home/marietto/Scrivania/libfreenect2/build/CMakeFiles/cuda_compile_1.dir/src/./cuda_compile_1_generated_cuda_kde_depth_packet_processor.cu.o
make[2]: *** [CMakeFiles/freenect2.dir/build.make:411: CMakeFiles/cuda_compile_1.dir/src/cuda_compile_1_generated_cuda_kde_depth_packet_processor.cu.o] Errore 1
make[1]: *** [CMakeFiles/Makefile2:194: CMakeFiles/freenect2.dir/all] Errore 2
make: *** [Makefile:149: all] Errore 2
it can’t continue the compilation because It can’t find the file helper_math.h in the proper place. At this point I’m confused. I don’t know where can I get that file and where should I place it. I imagine that I should install the cuda samples and I tried,as u can see below,getting the cuda package for ubuntu 20.04 (im running 21.10,so I’ve thought that 20.04 was good,since it is the closest to my ubuntu version),and I’ve deselected everything except the samples,but it didn’t work :
marietto-BHYVE:/home/marietto/Scrivania# chmod +x cuda_11.6.0_510.39.01_linux.run
marietto-BHYVE:/home/marietto/Scrivania# ./cuda_11.6.0_510.39.01_linux.run
===========
= Summary =
===========
Driver: Not Selected
Toolkit: Installed in /usr/local/cuda-11.6/
Please make sure that
- PATH includes /usr/local/cuda-11.6/bin
- LD_LIBRARY_PATH includes /usr/local/cuda-11.6/lib64, or, add /usr/local/cuda-11.6/lib64 to /etc/ld.so.conf and run ldconfig as root
To uninstall the CUDA Toolkit, run cuda-uninstaller in /usr/local/cuda-11.6/bin
***WARNING: Incomplete installation! This installation did not install the CUDA Driver. A driver of version at least 510.00 is required for CUDA 11.6 functionality to work.
To install the driver using this installer, run the following command, replacing <CudaInstaller> with the name of this run file:
sudo <CudaInstaller>.run --silent --driver
Logfile is /var/log/cuda-installer.log
as a further experiment,I tried to install the samples from the cuda version below :
but :
[INFO]: Driver installation detected by command: apt list --installed | grep -e nvidia-driver-[0-9][0-9][0-9] -e >
[INFO]: Cleaning up window
[INFO]: Complete
[INFO]: Checking compiler version...
[INFO]: gcc location: /usr/bin/gcc
[INFO]: gcc version: gcc version 10.3.0 (Ubuntu 10.3.0-11ubuntu1)
[ERROR]: unsupported compiler version: 10.3.0. Use --override to override this check.
As further tries,I tried different versions of cuda 11.3 and 11.4 packages :
cuda-11-3_11.3.0-1_amd64.deb 4.0KB 2021-03-26 22:54
cuda-11-3_11.3.1-1_amd64.deb 4.0KB 2021-05-14 01:12
cuda-11-4_11.4.0-1_amd64.deb 4.0KB 2021-06-24 02:48
cuda-11-4_11.4.1-1_amd64.deb 4.0KB 2021-07-28 19:46
cuda-11-4_11.4.2-1_amd64.deb 4.0KB 2021-08-30 21:01
cuda-11-4_11.4.3-1_amd64.deb 4.0KB 2021-10-29 16:46
,but everytime it won't install only the samples without the driver. I don't want to reinstall the driver,since it works ; I don't want to break the system ;
At the end I've installed the cuda samples using this tutorial :
https://snapcraft.io/install/cuda-samples/ubuntu
they have been installed correctly,without giving any error,but it stills can't find the helper_math.h file , giving the same error as before.
what should I do ? thanks.
0 Answers