L4T 24.2 and kinect v2

libfreenect2 and iai-kinect2 used to work with the previous releases of l4t, in particular after replacing libGL.so
Current version (L4T 24.2, Ubuntu 16.04 aarch64) yields linking error for Protonect using libGL.so from both Mesa libs:

/usr/lib/gcc/aarch64-linux-gnu/5/../../../aarch64-linux-gnu/libGL.so: undefined reference to `drmMap'
/usr/lib/gcc/aarch64-linux-gnu/5/../../../aarch64-linux-gnu/libGL.so: undefined reference to `drmCloseOnce'
/usr/lib/gcc/aarch64-linux-gnu/5/../../../aarch64-linux-gnu/libGL.so: undefined reference to `drmUnmap'
/usr/lib/gcc/aarch64-linux-gnu/5/../../../aarch64-linux-gnu/libGL.so: undefined reference to `drmOpenOnce'

and tegra:

../lib/libfreenect2.so.0.2.0: undefined reference to `drmAuthMagic'
../lib/libfreenect2.so.0.2.0: undefined reference to `drmGetDeviceNameFromFd'
../lib/libfreenect2.so.0.2.0: undefined reference to `drmFreeVersion'
../lib/libfreenect2.so.0.2.0: undefined reference to `drmGetVersion'
../lib/libfreenect2.so.0.2.0: undefined reference to `drmGetClient'
../lib/libfreenect2.so.0.2.0: undefined reference to `drmGetMagic'

Has anyone succeeded in running kinect v2 with the latest setup?

You can reference to below topic comment #2 to resolve the problem.
https://devtalk.nvidia.com/default/topic/946136

Btw, those files can be checked to find out if they were overwritten by an update via this:

sha1sum -c /etc/nv_tegra_release

If you see a file issue from that, see:
https://devtalk.nvidia.com/default/topic/965192/jetson-tx1/jetpack-2-3-for-jetson-tx1-released-with-l4t-r24-2-ubuntu-16-04-64-bit-cuda-8-and-tensorrt/post/4976361/#4976361

Thanks a lot for your suggestion! Unfortunately, it doesn’t seem to help.

libGL.so in /usr/lib/aarch64-linux-gnu was already replaced with a symbolic link to /usr/lib/aarch64-linux-gnu/tegra/libGL.so

sha1sum -c /etc/nv_tegra_release

OK’d everything

But ‘undefined reference to `drm’ errors remain during protonect and kinect2_bridge linking.

Hi bnjff
Have you try it on other platform with ubuntu 16.04 like x86 platform.

it seems that your libfreenect build option is not correct. looks like contains x86 build options, please follow the readme.md again. my tx1 works well with kinect v2.

Yes, it works fine on multiple machines with 16.04

The only cmake option I use is BUILD_EXAMPLES=ON (to build protonect). And I built it successfully in the past before upgrading Jetson to 16.04. Does it work for you on 16.04?
Here’s ccmake configuration:

BUILD_EXAMPLES                   ON                                                                                                                                                                                                  
 BUILD_OPENNI2_DRIVER             ON                                                                                                                                                                                                  
 BUILD_SHARED_LIBS                ON                                                                                                                                                                                                  
 CMAKE_BUILD_TYPE                 RelWithDebInfo                                                                                                                                                                                      
 CMAKE_INSTALL_PREFIX             /usr/local                                                                                                                                                                                          
 CUDA_HOST_COMPILER               /usr/bin/cc                                                                                                                                                                                         
 CUDA_SDK_ROOT_DIR                CUDA_SDK_ROOT_DIR-NOTFOUND                                                                                                                                                                          
 CUDA_TOOLKIT_ROOT_DIR            /usr/local/cuda-8.0                                                                                                                                                                                 
 CUDA_USE_STATIC_CUDA_RUNTIME     ON                                                                                                                                                                                                  
 CUDA_rt_LIBRARY                  /usr/lib/aarch64-linux-gnu/librt.so                                                                                                                                                                 
 DEPENDS_DIR                      /home/ubuntu/lib/libfreenect2/depends                                                                                                                                                               
 ENABLE_CUDA                      ON                                                                                                                                                                                                  
 ENABLE_CXX11                     ON                                                                                                                                                                                                  
 ENABLE_OPENCL                    ON                                                                                                                                                                                                  
 ENABLE_OPENGL                    ON                                                                                                                                                                                                  
 ENABLE_PROFILING                 OFF                                                                                                                                                                                                 
 ENABLE_TEGRAJPEG                 ON                                                                                                                                                                                                  
 ENABLE_VAAPI                     ON                                                                                                                                                                                                  
 GLFW3_LIBRARY                    /home/ubuntu/lib/libfreenect2/depends/glfw/lib/libglfw.so                                                                                                                                           
 LibUSB_LIBRARY                   /usr/lib/aarch64-linux-gnu/libusb-1.0.so                                                                                                                                                            
 OpenNI2_INCLUDE_DIRS             OpenNI2_INCLUDE_DIRS-NOTFOUND                                                                                                                                                                       
 OpenNI2_LIBRARY                  OpenNI2_LIBRARY-NOTFOUND                                                                                                                                                                            
 TegraJPEG_INCLUDE_DIRS           /home/ubuntu/lib/libfreenect2/build/gstjpeg_src                                                                                                                                                     
 TegraJPEG_LIBRARIES              /usr/lib/aarch64-linux-gnu/tegra/libnvjpeg.so                                                                                                                                                       
 TurboJPEG_INCLUDE_DIRS           /usr/include                                                                                                                                                                                        
 TurboJPEG_LIBRARIES              /usr/lib/aarch64-linux-gnu/libturbojpeg.so.0

Hello, changqian9
Does your OS version is ubuntu 16.04? Could you share how you make it working.

Hi, ShaneCCC

I got this work on TX1 ubuntu 16.04, but could not remember how to fix this now:(
I found https://devtalk.nvidia.com/default/topic/946136 you mentioned works for me, please try:

cd /usr/lib/aarch64-linux-gnu
sudo rm libGL.so
sudo ln -s /usr/lib/aarch64-linux-gnu/tegra/libGL.so libGL.so

I got it working eventually after update to 2.3.1 and a clean install. Not sure which dependency was breaking it but it runs well now.

I also encountered this mistake. TX2 do not need VAAPI(libva-dev libjpeg-dev).It runs well untill I uninstalled these two libraries.