You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to compile librealsens SDK with the following compilation flags. The compilation breaks. cmake ../ -DBUILD_EXAMPLES=true -DENFORCE_METADATA=false -DBUILD_PYTHON_BINDINGS=true -DFORCE_RSUSB_BACKEND=OFF -DBUILD_WITH_CUDA=true -DIMPORT_DEPTH_CAM_FW=false -DBUILD_WITH_TM2=false -DCMAKE_BUILD_TYPE=Release
In file included from /home/dummy/librealsense/src/proc/cuda/cuda-pointcloud.h:5:0, from /home/dummy/librealsense/src/proc/cuda/cuda-pointcloud.cpp:3: /home/dummy/librealsense/src/proc/cuda/../pointcloud.h:11:40: error: expected initializer before โ:โ token class LRS_EXTENSION_API pointcloud : public stream_filter_processing_block ^ In file included from /home/dummy/librealsense/src/proc/cuda/../../cuda/cuda-pointcloud.cuh:15:0, from /home/dummy/librealsense/src/proc/cuda/cuda-pointcloud.cpp:6: /usr/local/cuda/include/cuda_runtime.h:56:28: error: expected โ}โ before end of line /usr/local/cuda/include/cuda_runtime.h:56:28: error: expected declaration before end of line CMakeFiles/realsense2.dir/build.make:517: recipe for target 'CMakeFiles/realsense2.dir/src/proc/cuda/cuda-pointcloud.cpp.o' failed make[2]: *** [CMakeFiles/realsense2.dir/src/proc/cuda/cuda-pointcloud.cpp.o] Error 1 make[2]: *** Waiting for unfinished jobs.... In file included from /home/dummy/librealsense/src/libusb/endpoint-libusb.h:8:0, from /home/dummy/librealsense/src/libusb/interface-libusb.h:6, from /home/dummy/librealsense/src/libusb/interface-libusb.cpp:4:
@MartyG-RealSense Did anything change from 2.34 to 2.35. Any kernel or compiler changes do i have to make? I am able to compile 2.34 and earlier without any problem.
2.35.2 introduces official L515 lidar depth camera support. The major addition for other cameras are improvements to the Viewer and to how multiple cameras are handled.
If you think there may be a kernel conflict, you could install with the backend = true flag if you have an internet connection, as it is not dependent on Linux versions or kernel versions and does not require patching.
To do so, put -DFORCE_RSUSB_BACKEND=true at the front of your CMake command in the librealsense build folder, like the example below:
There was a report that Librealsense 2.35.2 was failing to build on Jetson if -DBUILD_WITH_CUDA=true was used in the build statement. Could you try building without the CUDA flag in the build statement please and see if it makes a difference?
Re-reading the case, I noticed that it was not confirmed which computing device you are using in this case. If it is not a Jetson, or another computer that has an Nvidia GPU, then CUDA would not work because CUDA is specific to Nvidia.
For non-Nvidia GPUs, there is an alternative "vendor neutral" means in the SDK for offloading processing from the CPU onto the GPU. It is called "GLSL Processing Block", though this method may be ineffective on low-power devices.
@tispratik hello,
This is indeed a bug in the latest version.
To fix it navigate to src/proc/pointcloud.h in the source tree and add #include "synthetic-stream.h"
next to #include "../include/librealsense2/hpp/rs_frame.hpp"
Activity
malapatiravi commentedon Jun 11, 2020
@MartyG-RealSense Did anything change from 2.34 to 2.35. Any kernel or compiler changes do i have to make? I am able to compile 2.34 and earlier without any problem.
MartyG-RealSense commentedon Jun 11, 2020
2.35.0 introduced substantial bug-fixes and improvements.
#6481
2.35.2 introduces official L515 lidar depth camera support. The major addition for other cameras are improvements to the Viewer and to how multiple cameras are handled.
https://github.com/IntelRealSense/librealsense/wiki/Release-Notes#release-2352
If you think there may be a kernel conflict, you could install with the backend = true flag if you have an internet connection, as it is not dependent on Linux versions or kernel versions and does not require patching.
To do so, put -DFORCE_RSUSB_BACKEND=true at the front of your CMake command in the librealsense build folder, like the example below:
cmake ../ -DFORCE_RSUSB_BACKEND=true -DCMAKE_BUILD_TYPE=release -DBUILD_EXAMPLES=true -DBUILD_GRAPHICAL_EXAMPLES=true
malapatiravi commentedon Jun 11, 2020
I tried all the above mentioned options. I see the same problem.
MartyG-RealSense commentedon Jun 12, 2020
There was a report that Librealsense 2.35.2 was failing to build on Jetson if -DBUILD_WITH_CUDA=true was used in the build statement. Could you try building without the CUDA flag in the build statement please and see if it makes a difference?
malapatiravi commentedon Jun 12, 2020
Actually the issue is when DBUILD_WITH_CUDA=true is set. Is there any plan to fix it in near future?
MartyG-RealSense commentedon Jun 12, 2020
Re-reading the case, I noticed that it was not confirmed which computing device you are using in this case. If it is not a Jetson, or another computer that has an Nvidia GPU, then CUDA would not work because CUDA is specific to Nvidia.
For non-Nvidia GPUs, there is an alternative "vendor neutral" means in the SDK for offloading processing from the CPU onto the GPU. It is called "GLSL Processing Block", though this method may be ineffective on low-power devices.
#3654
tispratik commentedon Jun 12, 2020
Received a response from Realsense support on this topic.
Jun 11, 2020, 5:47:09 PM PDT
Hi Pratik,
The error happens when build with CUDA.
Set the -DBUILD_WITH_CUDA=false should allow the build to pass, for now...
I will be looking into this error. Thank you for informing us.
MartyG-RealSense commentedon Jun 12, 2020
@tispratik Thanks!
ev-mp commentedon Jun 14, 2020
@tispratik hello,
This is indeed a bug in the latest version.
To fix it navigate to
src/proc/pointcloud.hin the source tree and add#include "synthetic-stream.h"next to
#include "../include/librealsense2/hpp/rs_frame.hpp"Fix CUDA compilation. Fix gcc-pedantic remoarks. Addresses realsenseaโฆ
Fix CUDA compilation. Fix gcc-pedantic remarks. Addresses realsenseaiโฆ
malapatiravi commentedon Jun 15, 2020
It worked. Thanks @ev-mp