Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build Failing for 2.35.2 release #6573

Closed
malapatiravi opened this issue Jun 11, 2020 · 10 comments
Closed

Build Failing for 2.35.2 release #6573

malapatiravi opened this issue Jun 11, 2020 · 10 comments

Comments

@malapatiravi
Copy link

malapatiravi commented Jun 11, 2020


Required Info
Camera Model D400
Firmware Version 5.12.3
Operating System & Version Ubuntu 16.04
Kernel Version (Linux Only) 4.15.0-101-generic
Platform PC
SDK Version 2.35.2
Language C++
Segment Robot

Issue Description

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:

@malapatiravi
Copy link
Author

malapatiravi commented 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
Copy link
Collaborator

MartyG-RealSense commented 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
Copy link
Author

I tried all the above mentioned options. I see the same problem.

@MartyG-RealSense
Copy link
Collaborator

MartyG-RealSense commented 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
Copy link
Author

Actually the issue is when DBUILD_WITH_CUDA=true is set. Is there any plan to fix it in near future?

@MartyG-RealSense
Copy link
Collaborator

MartyG-RealSense commented 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
Copy link

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
Copy link
Collaborator

@tispratik Thanks!

@ev-mp
Copy link
Collaborator

ev-mp commented Jun 14, 2020

@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"

@malapatiravi
Copy link
Author

It worked. Thanks @ev-mp

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants