librealsense: Can't compile C++ example codes e.g. rs-hello-realsense.cpp
Required Info | |
---|---|
Camera Model | D435i |
Firmware Version | 05.12.05.00 |
Operating System & Version | Linux (Ubuntu 18.04) |
Kernel Version (Linux Only) | 5.3.0-62-generic |
Platform | PC |
SDK Version | 2.0 |
Language | C++ |
Segment | others |
Issue Description
I just cloned the repo and tried to run examples/hello-realsense/rs-hello-realsense.cpp file by using following command:
cd ~/librealsense/examples/hello-realsense
mkdir build
cd build
cmake ..
but it’s giving the following error:
-- The C compiler identification is GNU 7.5.0
-- The CXX compiler identification is GNU 7.5.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at CMakeLists.txt:14 (install):
install TARGETS given no RUNTIME DESTINATION for executable target
"rs-hello-realsense".
-- Configuring incomplete, errors occurred!
See also "/home/milan/librealsense/examples/hello-realsense/build/CMakeFiles/CMakeOutput.log".
What should I do to resolve this error?
Thanks!
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 26
Commits related to this issue
- Inhibit unnecessary logs to reduce clutter. Update messages wording. Addresses #6351, #6784 Change-Id: I4831ef6303a33b5326f36f71c97409b5e410ea8f — committed to ev-mp/librealsense by ev-mp 4 years ago
- Inhibit unnecessary logs to reduce clutter. Update messages wording. Addresses #6351, #6784 Change-Id: I4831ef6303a33b5326f36f71c97409b5e410ea8f — committed to ev-mp/librealsense by ev-mp 4 years ago
- Inhibit unnecessary logs to reduce clutter. Update messages wording. Addresses #6351, #6784 Change-Id: I4831ef6303a33b5326f36f71c97409b5e410ea8f — committed to ev-mp/librealsense by ev-mp 4 years ago
Case closed due to no further comments received.
If the Viewer appears to function fine after the launch error then you can likely dismiss it as a “hiccup” during launch in which there was a problem for a second but it recovered.
Usually when the Motion Module failure error box pops up in the RealSense Viewer, it does not stop the IMU functions from working correctly, so it is more of an annoyance than a serious problem.
I suggest first trying a firmware downgrade. Please download the firmware file for version 5.12.5 from the firmware releases page.
https://dev.intelrealsense.com/docs/firmware-releases
Extract the content of the zip file. Then go to the Viewer and from the menu of the More option at the top of the Viewer’s options side panel, select the option to update firmware (not the one to update to recmmended firmware). This option will ask you to select the firmware .bin file that you extracted from the zip. It should then change the firmware to 5.12.5 (the previous version) and hopefully fix your problems, including the USB 2.1 state.
The advice in this situation is that it is okay to remove the rule in the /etc folder but not the other one.in the lib/udev folder.
https://github.com/IntelRealSense/librealsense/issues/6153#issuecomment-605687547
If all else fails, it can be easiest to use the backend method of installation from source, which requires an internet connection to perform the installation but is not dependent on Linux versions or kernel versions and does not require patching. It also automatically includes support for metadata so that you do not have to patch that in either.
https://github.com/IntelRealSense/librealsense/issues/6710#issuecomment-650611442